CBitmap

Announcements and discussion for PInvoke

Moderators: Luke Jefferson, Robert

CBitmap

Postby dotnetfl » Fri Nov 13, 2009 4:42 am

I cannot figure out how to marshal a CBitmap to a Bitmap or Image class.

My import looks like this:

[DllImport(@"test.dll", CharSet = CharSet.Unicode)]
public static extern IntPtr GetBitmap(System.IntPtr hwnd, int nBMPWIDTH, int nBMPHEIGHT);

The H file section looks like:

Cbitmap* GetBitmap(HWND hwnd,int nBMPWIDTH,int nBMPHEIGHT);

How do I go about converting the Cbitmap into something I can display in C#?

Many thanks.
dotnetfl
 
Posts: 1
Joined: Fri Nov 13, 2009 4:38 am

Return to PInvoke.Net

Who is online

Users browsing this forum: No registered users and 0 guests