CBFilterGraphics
WORD FAR PASCAL CBFilterGraphics(LPBYTE lpdv, LPSTR lpBuf, WORD wLen)
Alters the format of raster graphic data before sending the data to the output
device. This is useful if a specific device addresses pins on the print head
in an unusual way (such as older Okidata dot matrix printers), or if the
device requires raster graphics data in an unusual format (such as the
"24 raster bits in 4 bytes" format common among Toshiba dot matrix
printers).
-
Returns the number of bytes of processed raster data.The number of bytes may
be the same as wLen, but not necessarily.
-
lpdv
-
Address of private data used by RasDD. The CBFilterGraphics function
should not change this data.
-
lpBuf
-
Address of a buffer that holds raster graphic data.
-
wLen
-
Size, in bytes, of the buffer specified by lpBuf.
After CBFilterGraphics has finished changing the raster graphic data,
it should call the WriteSpoolBuf function to pass the data to RasDD.
To implement this function, you must:
-
Set the RES_BO_OEMGRXFILTER bit flag in fBlockOut dialog box that is
accessible through the RESOLUTION dialog box.
-
Export the CBFilterGraphics function as ordinal 300 in the EXPORTS
section of the module definition (.DEF) file for your minidriver.
-
Import the WriteSpoolBuf function as ordinal 300 in the IMPORTS section
of the module definition (.DEF) file for your minidriver.
-
In the drvname.C file for your minidriver, add the function to perform
the changes upon the raster data needed by the device. Define this function as
described under “WriteSpoolBuf.”