Desktop Functions: Smart Device Functions:
|
GetObject (gdi32)
C# Signature:
[DllImport("gdi32.dll")] VB.NET Signature:
<DllImport("gdi32.dll")> _ User-Defined Types:None. Notes:None. Had a terrible time getting this to work to retrieve a BITMAP object from a HBITMAP, this code finally worked. BITMAP bmpScreen; GCHandle hndl = GCHandle.Alloc(bmpScreen, GCHandleType.Pinned); IntPtr ptrToBitmap = hndl.AddrOfPinnedObject(); GDI32.GetObject(hBitmap, Marshal.SizeOf<GDI32.BITMAP>(), ptrToBitmap); bmpScreen = Marshal.PtrToStructure<GDI32.BITMAP>(ptrToBitmap); hndl.Free(); Tips & Tricks:Please add some! Sample Code:Please add some! Alternative Managed API:Do you know one? Please contribute it! Please edit this page!Do you have...
Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more). |
|