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:
alex 1996-03-26 10:02:41 +00:00
parent 349683d8ea
commit b7b9d5d29d

View File

@ -73,8 +73,8 @@ BOOL FAR PASCAL __export _PrintFile ( LPSTR szFile,
iEsc = PASSTHROUGH;
if (!Escape(hPrnDC, QUERYESCSUPPORT, sizeof(int), (LPSTR)&iEsc, NULL))
{
bAbort = TRUE;
goto MSFCleanUp;
bAbort = TRUE;
goto MSFCleanUp;
}
// 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 hdc;
int iEsc;
char szPrinter[64];
LPSTR szDevice=NULL, szDriver=NULL, szOutput=NULL;
LPDEVMODE lpdm;
@ -201,6 +202,15 @@ HDC FAR PASCAL __export GetPrinterDC(HGLOBAL hDevNames, HGLOBAL hDevMode)
}
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);
if (hDevMode && lpdm)