S
SpotNet
Hello NewsGroup,
Does anyone know where I can find a table of some sort which shows a mapping
from C++ types to C# type equivelents? This would be most helpful for API
functions, structs, enums, constants,...etc. Learning and figuring this out
the hard way is good but sometimes suicidal.
EG:
C++ | C#
-----------------------------------
HWND | IntPtr
HINSTANCE | IntPtr
DWORD | Int32
LPCTSTR | String, IntPtr //[MarshalAs(UnmanagedType.LPStr)]
LPARAM | IntPtr, Int32
LPTSTR | String, (Seen someone StringBuilder that one.)
BYTE <-----Now that one's a beauty, I've seen that one as string, string
array, char, char array. Talk about being lost in translation.
INT_PTR | IntPtr
UINT_PTR | UIntPtr, IntPtr
LONG_PTR
WPARAM | IntPtr, Int32
Not that critical but I must admitt it would be great to have such a table,
don't you think?
Thanks NewsGroup.
Regards,
- SpotNet
Does anyone know where I can find a table of some sort which shows a mapping
from C++ types to C# type equivelents? This would be most helpful for API
functions, structs, enums, constants,...etc. Learning and figuring this out
the hard way is good but sometimes suicidal.
EG:
C++ | C#
-----------------------------------
HWND | IntPtr
HINSTANCE | IntPtr
DWORD | Int32
LPCTSTR | String, IntPtr //[MarshalAs(UnmanagedType.LPStr)]
LPARAM | IntPtr, Int32
LPTSTR | String, (Seen someone StringBuilder that one.)
BYTE <-----Now that one's a beauty, I've seen that one as string, string
array, char, char array. Talk about being lost in translation.
INT_PTR | IntPtr
UINT_PTR | UIntPtr, IntPtr
LONG_PTR
WPARAM | IntPtr, Int32
Not that critical but I must admitt it would be great to have such a table,
don't you think?
Thanks NewsGroup.
Regards,
- SpotNet