All,

I need to call a GDI32.DLL function called GetBitmapBits, whose last
parameter is specified as void*.  To import the function, I have the
following:

[DllImport("gdi32.dll")]
static extern long GetBitmapBits(
   IntPtr hbmp,
   long cbBuffer,
   [Out] IntPtr pData
);

How do I go about calling this?  Do I use Marshal.AllocHGlobal to allocate
a memory buffer?  Do I need to resort to unsafe calls?

Any help appreciated.  Thanks.

John

You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced 
DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to