The BLACKICE_MESSAGE_TEXT message

 

The BLACKICE_MESSAGE_TEXT message is available since Printer Driver version 14.99.

The printer driver transfers the Text Output data through this message if the “Generate Text output in memory” option is enabled. The Text Output is generated for each printed page separately.

 

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

 

The valid members of the TSPrnMessage structure for the “BLACKICE_MESSAGE_ TEXT” messages are the dwMessage, szDocName, szPrinterName, dwJobID and nPageNumber fields of the TSPrnMessage structure.

 

lParam:

The lParam parameter of the message contains a handle to the Text data.

 

To get the pointer to the Text data, use the GlobalLock WinAPI function. The Text data is a NULL terminated Unicode string:

 

LPWSTR pTextData = GlobalLock((HGLOBAL)lParam);

           

To get the size of the Text data including the terminating NULL character, use:

 

DWORD dwSize = (DWORD)GlobalSize((HGLOBAL)lParam);

 

If the Text data is not needed anymore, free it using:    

 

GlobalUnlock((HGLOBAL)lParam);

GlobalFree((HGLOBAL)lParam);