Aggiunto supporto di raw.drv
git-svn-id: svn://10.65.10.50/trunk@2698 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
349683d8ea
commit
b7b9d5d29d
@ -73,8 +73,8 @@ BOOL FAR PASCAL __export _PrintFile ( LPSTR szFile,
|
|||||||
iEsc = PASSTHROUGH;
|
iEsc = PASSTHROUGH;
|
||||||
if (!Escape(hPrnDC, QUERYESCSUPPORT, sizeof(int), (LPSTR)&iEsc, NULL))
|
if (!Escape(hPrnDC, QUERYESCSUPPORT, sizeof(int), (LPSTR)&iEsc, NULL))
|
||||||
{
|
{
|
||||||
bAbort = TRUE;
|
bAbort = TRUE;
|
||||||
goto MSFCleanUp;
|
goto MSFCleanUp;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If we created the DC, install an abort procedure. We don't have
|
// If we created the DC, install an abort procedure. We don't have
|
||||||
@ -173,6 +173,7 @@ VOID SendFile(HDC hPrnDC, LPSTR szFile)
|
|||||||
HDC FAR PASCAL __export GetPrinterDC(HGLOBAL hDevNames, HGLOBAL hDevMode)
|
HDC FAR PASCAL __export GetPrinterDC(HGLOBAL hDevNames, HGLOBAL hDevMode)
|
||||||
{
|
{
|
||||||
HDC hdc;
|
HDC hdc;
|
||||||
|
int iEsc;
|
||||||
char szPrinter[64];
|
char szPrinter[64];
|
||||||
LPSTR szDevice=NULL, szDriver=NULL, szOutput=NULL;
|
LPSTR szDevice=NULL, szDriver=NULL, szOutput=NULL;
|
||||||
LPDEVMODE lpdm;
|
LPDEVMODE lpdm;
|
||||||
@ -201,6 +202,15 @@ HDC FAR PASCAL __export GetPrinterDC(HGLOBAL hDevNames, HGLOBAL hDevMode)
|
|||||||
}
|
}
|
||||||
|
|
||||||
hdc = CreateDC(szDriver, szDevice, szOutput, lpdm);
|
hdc = CreateDC(szDriver, szDevice, szOutput, lpdm);
|
||||||
|
// PASSTHROUGH is required. If driver doesn't support it, try to use raw.drv.
|
||||||
|
|
||||||
|
iEsc = PASSTHROUGH;
|
||||||
|
if (!Escape(hdc, QUERYESCSUPPORT, sizeof(int), (LPSTR)&iEsc, NULL))
|
||||||
|
{
|
||||||
|
DeleteDC(hdc);
|
||||||
|
hdc = CreateDC( "RAW", szDevice, szOutput, lpdm);
|
||||||
|
}
|
||||||
|
|
||||||
// hdc = CreateDC("RAW", NULL, szOutput, lpdm);
|
// hdc = CreateDC("RAW", NULL, szOutput, lpdm);
|
||||||
|
|
||||||
if (hDevMode && lpdm)
|
if (hDevMode && lpdm)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user