int get_object(handle object, int length, void* buffer)
This function obtains information about graphics objects.
The handle of the object for which information is required. This can be a handle to one of the following:
The length of the buffer provided by the next parameter.
A pointer to a buffer that contains the requested information. If null is specified, the required buffer size is returned; otherwise, the table below defines the information that is returned for each different object type.
|A count of table entries.
If Buffer is null, the value returned is the number of bytes required to store the requested information. If the function succeeds and Buffer is non-null the value returned is the number of bytes stored in the given buffer. If the function fails, zero is returned.
The buffer pointed to by the parameter Buffer must be sufficiently large to receive the information about the graphics object.
If object identifies a bitmap created by calling create_device_independent_bitmap_section and the specified buffer is large enough, this function returns an object of the class bitmap_section. Additionally, the member Bits of the returned object contains a pointer to the bit values of the bitmap.
If object identifies a bitmap created by any other means, this function returns only the width, height, and color format information of the bitmap. The bitmap's bit values may be obtained by calling the function get_device_independent_bitmap_bits or the function get_bitmap_bits.
If object identifies a logical palette, this function obtains a 2-byte integer that specifies the number of entries in the palette. The function does not obtain an object of the class logical_palette, which defines the palette. To obtain information about palette entries, an application may call the function get_palette_entries.