
SR200 & SR300 Printer SDK Guide
Page 57
How to Override Driver Settings
You can override settings in the printer driver using the Win32 ExtEscape()
function.
Tips for success
♦ You must call ExtEscape() function after StartDoc() and before StartPage()
when you change settings.
♦ The modified setting is in effect until the printer handle is removed by
DeleteDC().
Using ExtEscape() to Override a Setting
You can pass settings to the printer driver by using the ExtEscape() function of the
WIN32 API.
ExtEscape() Function
int ExtEscape (
HDC hdc
, // handle to the device context.
Int nEscape
, // Escape ID
int cbParameter
, // size of the parameter data
LPCSTR lpszParameter,
// pointer to the parameter data
int cbResult
, // size of the result area
LPSTR lpszResult
// pointer to the result area
);
Where:
♦ nEscape
Use 9100 for the escape ID.
♦ cbParameter
Set the length of the Parameter in bytes.
♦ lpszParameter
Pointer to the Parameter memory.
♦ cb
Result Set the length of Result memory in bytes.
♦ lpsz
Result Pointer to the Result memory.
Change a Setting
cbParameter
Name Command
Code
ID Size Data (New value)
Length in bytes
1 2 2 n
Value
‘S’(0x53) 1* 2* 1*
1* See cbParameter Values page 61 2* Data length in bytes.
Comentários a estes Manuais