CreateDIBPDevice
CreateDIBPDevice(LPBITMAPINFO lpInfo, LPPDEVICE lpDevice,
VOID *lpBits, WORD wFlags);
Creates a PDEVICE structure for the DIB engine using the specified BITMAPINFO structure and DIB bits.
- Returns the size in bytes of the bits buffer (based on the width, height, and bpp in the specified BITMAPINFO structure) if successful; otherwise returns zero.
- lpInfo
- Address of a BITMAPINFO structure that contains information about the DIB. The PDEVICE that is created contains a pointer to this block of memory in its deBitmapInfo field.
- lpDevice
- Address of buffer (allocated by the caller) to receive the PDEVICE structure. The size of the PDEVICE structure can be obtained from the dpDeviceSize field of the DIB engine's GDIINFO definition.
- lpBits
- Address of the DIB bits, which are stored as an array of bytes. If NULL, the function fills in the offset part of the deBits field and the minidriver must allocate a 0-based buffer and fill in the selector part of the deBits field.
- wFlags
- Value used to initialize the PDEVICE's deFlags field.
The function fails for DIB formats that the DIB engine does not support.
The deDriverUse field in the DIBENGINE structure is reserved for use by minidrivers. CreateDIBPDevice initializes this field to zero, but minidrivers can subsequently place any value in this field for their own use. The DIB engine does not use this field.
The DIB engine initializes the deBeginAccess and deEndAccess members of the PDEVICE structure to zero. The minidriver needs to initialize these fields after the call to CreateDIBPDevice.
The export ordinal for this function is 300.