From bb14056c16913bbba973441fabf86fa0c05eb5d0 Mon Sep 17 00:00:00 2001 From: Huw D M Davies Date: Fri, 23 Jul 1999 19:23:49 +0000 Subject: [PATCH] EnumJobs stub. Update graphics/psdrv/README. Add warnings to DRIVER_GetDriverName. --- dlls/winspool/info.c | 27 +++++++++++ graphics/driver.c | 12 +++-- graphics/psdrv/README | 6 +-- include/winspool.h | 103 ++++++++++++++++++++++++++++++++++++++++++ relay32/winspool.spec | 4 +- 5 files changed, 143 insertions(+), 9 deletions(-) diff --git a/dlls/winspool/info.c b/dlls/winspool/info.c index c0ce6b728a8..0ed2ee442d7 100644 --- a/dlls/winspool/info.c +++ b/dlls/winspool/info.c @@ -1720,4 +1720,31 @@ BOOL WINAPI PrinterProperties(HWND hWnd, /* handle to parent window */ return FALSE; } +/***************************************************************************** + * EnumJobsA [WINSPOOL.162] + * + */ +BOOL WINAPI EnumJobsA(HANDLE hPrinter, DWORD FirstJob, DWORD NoJobs, + DWORD Level, LPBYTE pJob, DWORD cbBuf, LPDWORD pcbNeeded, + LPDWORD pcReturned) +{ + FIXME("stub\n"); + if(pcbNeeded) *pcbNeeded = 0; + if(pcReturned) *pcReturned = 0; + return TRUE; +} + +/***************************************************************************** + * EnumJobsW [WINSPOOL.163] + * + */ +BOOL WINAPI EnumJobsW(HANDLE hPrinter, DWORD FirstJob, DWORD NoJobs, + DWORD Level, LPBYTE pJob, DWORD cbBuf, LPDWORD pcbNeeded, + LPDWORD pcReturned) +{ + FIXME("stub\n"); + if(pcbNeeded) *pcbNeeded = 0; + if(pcReturned) *pcReturned = 0; + return TRUE; +} diff --git a/graphics/driver.c b/graphics/driver.c index e0d9f780471..67306da76c5 100644 --- a/graphics/driver.c +++ b/graphics/driver.c @@ -105,10 +105,16 @@ BOOL DRIVER_GetDriverName( LPCSTR device, LPSTR driver, DWORD size ) { char *p; size = GetProfileStringA("devices", device, "", driver, size); - if(!size) return FALSE; - + if(!size) { + WARN("Unable to find '%s' in [devices] section of win.ini\n", device); + return FALSE; + } p = strchr(driver, ','); - if(!p) return FALSE; + if(!p) { + WARN("'%s' entry in [devices] section of win.ini is malformed.\n", + device); + return FALSE; + } *p = '\0'; TRACE("Found '%s' for '%s'\n", driver, device); return TRUE; diff --git a/graphics/psdrv/README b/graphics/psdrv/README index 3302cb7ad23..5763da6be84 100644 --- a/graphics/psdrv/README +++ b/graphics/psdrv/README @@ -16,11 +16,11 @@ driver add device=Wine PostScript Driver,WINEPS,LPT1: -to the [windows] section of win.ini . You may prefer to add +to the [windows] section of win.ini and Wine PostScript Driver=WINEPS,LPT1: -to the [devices] section of win.ini instead. +to the [devices] section of win.ini . You will need Adobe Font Metric (AFM) files for the (type 1 PostScript) fonts that you wish to use. You can get these from @@ -81,8 +81,6 @@ Many partially implemented functions. ps.c is becoming messy. -No clipping. - Notepad often starts text too far to the left depending on the margin settings. However the win3.1 pscript.drv (under wine) also does this. diff --git a/include/winspool.h b/include/winspool.h index c2d8e28ab75..5fec8fdde4a 100644 --- a/include/winspool.h +++ b/include/winspool.h @@ -246,8 +246,103 @@ DECL_WINELIB_TYPE_AW(PRINTER_INFO_5) DECL_WINELIB_TYPE_AW(PPRINTER_INFO_5) DECL_WINELIB_TYPE_AW(LPPRINTER_INFO_5) +typedef struct _JOB_INFO_1A { + DWORD JobID; + LPSTR pPrinterName; + LPSTR pMachineName; + LPSTR pUserName; + LPSTR pDocument; + LPSTR pDatatype; + LPSTR pStatus; + DWORD Status; + DWORD Priority; + DWORD Position; + DWORD TotalPages; + DWORD PagesPrinted; + SYSTEMTIME Submitted; +} JOB_INFO_1A, *PJOB_INFO_1A, *LPJOB_INFO_1A; + +typedef struct _JOB_INFO_1W { + DWORD JobID; + LPWSTR pPrinterName; + LPWSTR pMachineName; + LPWSTR pUserName; + LPWSTR pDocument; + LPWSTR pDatatype; + LPWSTR pStatus; + DWORD Status; + DWORD Priority; + DWORD Position; + DWORD TotalPages; + DWORD PagesPrinted; + SYSTEMTIME Submitted; +} JOB_INFO_1W, *PJOB_INFO_1W, *LPJOB_INFO_1W; + +DECL_WINELIB_TYPE_AW(JOB_INFO_1) +DECL_WINELIB_TYPE_AW(PJOB_INFO_1) +DECL_WINELIB_TYPE_AW(LPJOB_INFO_1) + +typedef struct _JOB_INFO_2A { + DWORD JobID; + LPSTR pPrinterName; + LPSTR pMachineName; + LPSTR pUserName; + LPSTR pDocument; + LPSTR pNotifyName; + LPSTR pDatatype; + LPSTR pPrintProcessor; + LPSTR pParameters; + LPSTR pDriverName; + LPDEVMODEA pDevMode; + LPSTR pStatus; + PSECURITY_DESCRIPTOR pSecurityDescriptor; + DWORD Status; + DWORD Priority; + DWORD Position; + DWORD StartTime; + DWORD UntilTime; + DWORD TotalPages; + DWORD Size; + SYSTEMTIME Submitted; + DWORD Time; + DWORD PagesPrinted; +} JOB_INFO_2A, *PJOB_INFO_2A, *LPJOB_INFO_2A; + +typedef struct _JOB_INFO_2W { + DWORD JobID; + LPWSTR pPrinterName; + LPWSTR pMachineName; + LPWSTR pUserName; + LPWSTR pDocument; + LPWSTR pNotifyName; + LPWSTR pDatatype; + LPWSTR pPrintProcessor; + LPWSTR pParameters; + LPWSTR pDriverName; + LPDEVMODEW pDevMode; + LPWSTR pStatus; + PSECURITY_DESCRIPTOR pSecurityDescriptor; + DWORD Status; + DWORD Priority; + DWORD Position; + DWORD StartTime; + DWORD UntilTime; + DWORD TotalPages; + DWORD Size; + SYSTEMTIME Submitted; + DWORD Time; + DWORD PagesPrinted; +} JOB_INFO_2W, *PJOB_INFO_2W, *LPJOB_INFO_2W; + +DECL_WINELIB_TYPE_AW(JOB_INFO_2) +DECL_WINELIB_TYPE_AW(PJOB_INFO_2) +DECL_WINELIB_TYPE_AW(LPJOB_INFO_2) + + #endif /* Status */ + + /* DECLARATIONS */ INT WINAPI DeviceCapabilitiesA(LPCSTR pDevice,LPCSTR pPort,WORD fwCapability, LPSTR pOutput, LPDEVMODEA pDevMode); @@ -276,6 +371,14 @@ BOOL WINAPI OpenPrinterW(LPWSTR lpPrinterName,HANDLE *phPrinter, BOOL WINAPI ClosePrinter (HANDLE phPrinter); +BOOL WINAPI EnumJobsA(HANDLE hPrinter, DWORD FirstJob, DWORD NoJobs, + DWORD Level, LPBYTE pJob, DWORD cbBuf, LPDWORD pcbNeeded, + LPDWORD pcReturned); +BOOL WINAPI EnumJobsW(HANDLE hPrinter, DWORD FirstJob, DWORD NoJobs, + DWORD Level, LPBYTE pJob, DWORD cbBuf, LPDWORD pcbNeeded, + LPDWORD pcReturned); +#define EnumJobs WINELIB_NAME_AW(EnumJobs) + BOOL WINAPI EnumPrintersA(DWORD dwType, LPSTR lpszName, DWORD dwLevel, LPBYTE lpbPrinters, DWORD cbBuf, LPDWORD lpdwNeeded, diff --git a/relay32/winspool.spec b/relay32/winspool.spec index d6ebe205b30..53a6d064ae8 100644 --- a/relay32/winspool.spec +++ b/relay32/winspool.spec @@ -62,8 +62,8 @@ type win32 159 stub EndPagePrinter 160 stub EnumFormsA 161 stub EnumFormsW -162 stub EnumJobsA -163 stub EnumJobsW +162 stdcall EnumJobsA(long long long long ptr long ptr ptr) EnumJobsA +163 stdcall EnumJobsW(long long long long ptr long ptr ptr) EnumJobsW 164 stub EnumMonitorsA 165 stub EnumMonitorsW 166 stdcall EnumPortsA(ptr long ptr ptr ptr ptr) EnumPortsA