C# Programming
10-21-2009, 01:00 PM
How do I convert a ushort* to an IntPtr?
Or any primitive pointer to an IntPtr? int*, uint*, etc..
Background:
The ushort* holds the start address to a buffer from a PInvoke call:
[DllImport( "DCamLIB.dll" )]
private unsafe static extern bool DcamCapture( ushort* imageBuffer, Int32 bufferSize );
I need to then pass this ******** on complete with buffer size to a C# method that takes a IntPtr.
Thanks in advance,
Jason
Or any primitive pointer to an IntPtr? int*, uint*, etc..
Background:
The ushort* holds the start address to a buffer from a PInvoke call:
[DllImport( "DCamLIB.dll" )]
private unsafe static extern bool DcamCapture( ushort* imageBuffer, Int32 bufferSize );
I need to then pass this ******** on complete with buffer size to a C# method that takes a IntPtr.
Thanks in advance,
Jason