The printer driver transfers the image data through this message.
Parameters:
wParam:
A handle to the TSPrnMessage structure. Use the GlobalLock WinAPI function to get a pointer to a TSPrnMessage structure:
TSPrnMessage* pPrnMsg = (TSPrnMessage*)GlobalLock((HGLOBAL)wParam);
If you do not need the TSPrnMessage structure anymore, free it using the GlobalUnlock and GlobalFree functions:
GlobalUnlock((HGLOBAL)wParam);
GlobalFree((HGLOBAL)wParam);
The definition of the TSPrnStructure is available on the following page: http://www.blackice.com/private/rtk/The_Message_Capture_Library_Reference.htm
For printer drivers 14.97 and earlier, the valid members of the TSPrnMessage structure for the “BLACKICE_MESSAGE_MEMIMAGE” messages is the dwMessage .
For printer drivers 14.98 and newer, the valid members of the TSPrnMessage structure for the “BLACKICE_MESSAGE_ MEMIMAGE” messages are the dwMessage, szDocName, szPrinterName, dwJobID fields of the TSPrnMessage structure.
lParam:
The lParam parameter of the message contains a handle to the image data.
To get the pointer to the Image data, use the GlobalLock WinAPI function:
LPBYTE pImage = GlobalLock((HGLOBAL)lParam);
To get the size of the Image data, use the GlobalSize WinAPI function:
DWORD dwSize = (DWORD)GlobalSize((HGLOBAL)lParam);
If the image data is not needed anymore, free it using the GlobalUnlock and GlobalFree functions:
GlobalUnlock((HGLOBAL)lParam);
GlobalFree((HGLOBAL)lParam);
To determine the file type such as TIF, BMP, EMF, PDF, get the DEVMODE structure of the printer driver from the BLACKICE_MESSAGE_DEVMODE message or using the the LoadBlackIceDEVMODE function and use the DEVMODE_GetFileFormat function to retrieve the file format from the structure.