Gdi32GetObject Method

Retrieves information for the specified graphics object.

Definition

Namespace: DevCase.Win32.NativeMethods
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("GDI32.dll", CharSet = CharSet.Auto, BestFitMapping = false, 
	ThrowOnUnmappableChar = true, SetLastError = true)]
public static int GetObject(
	IntPtr hGdiObj,
	int bufferSize,
	IntPtr obj
)

Parameters

hGdiObj  IntPtr
A handle to the graphics object of interest.

This can be a handle to one of the following: a logical bitmap, a brush, a font, a palette, a pen, or a device independent bitmap created by calling the CreateDIBSection function.

bufferSize  Int32
The number of bytes of information to be written to the buffer.
obj  IntPtr
A pointer to a buffer that receives the information about the specified graphics object.

If the obj parameter is NULL, the function return value is the number of bytes required to store the information it writes to the buffer for the specified graphics object.

Return Value

Int32
If the function succeeds, and obj is a valid pointer, the return value is the number of bytes stored into the buffer.

If the function succeeds, and obj is NULL, the return value is the number of bytes required to hold the information the function would store into the buffer.

If the function fails, the return value is zero.

Remarks

See Also