IntPtr and Handle

  • Thread starter Thread starter erupakat
  • Start date Start date
E

erupakat

C#
using HANDLE=System.IntPtr

Can any body suggest the corresponding code in Managed C++
 
C#
using HANDLE=System.IntPtr

Can any body suggest the corresponding code in Managed C++

typedef System::IntPtr HANDLE;

.... but watch out. HANDLE is already defined by the windows header files,
so if you #include windows headers, you're going to have a conflict.

-cd
 
Thanks for the reply. How can I avoid the conflit.

1. Don't name your typedef HANDLE.

2. Put your typedef in a namespace.

-cd
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top