Author: jimtabor
Date: Mon Oct 20 14:33:20 2008
New Revision: 36855
URL:
http://svn.reactos.org/svn/reactos?rev=36855&view=rev
Log:
- Add driver info for psdk, update local DC and fixed eng functions so that it can support
user mode print drivers.
Modified:
trunk/reactos/dll/win32/gdi32/include/gdi32p.h
trunk/reactos/dll/win32/gdi32/objects/eng.c
trunk/reactos/include/psdk/winspool.h
trunk/reactos/include/reactos/win32k/ntgdihdl.h
Modified: trunk/reactos/dll/win32/gdi32/include/gdi32p.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/include/gd…
==============================================================================
--- trunk/reactos/dll/win32/gdi32/include/gdi32p.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/gdi32/include/gdi32p.h [iso-8859-1] Mon Oct 20 14:33:20 2008
@@ -79,6 +79,29 @@
INT planes;
} ENHMETAFILE,*PENHMETAFILE;
+
+#define PDEV_UMPD_ID 0xFEDCBA98
+// UMPDEV flags
+#define UMPDEV_NO_ESCAPE 0x0002
+#define UMPDEV_SUPPORT_ESCAPE 0x0004
+typedef struct _UMPDEV
+{
+ DWORD Sig; // Init with PDEV_UMPD_ID
+ struct _UMPDEV *pumpdNext;
+ PDRIVER_INFO_5W pdi5Info;
+ HMODULE hModule;
+ DWORD dwFlags;
+ DWORD dwDriverAttributes;
+ DWORD dwConfigVersion; // Number of times the configuration
+ // file for this driver has been upgraded
+ // or downgraded since the last spooler restart.
+ DWORD dwDriverCount; // After init should be 2
+ DWORD WOW64_UMPDev;
+ DWORD WOW64_hMod;
+ WCHAR String[188];
+} UMPDEV, *PUMPDEV;
+
+
/* FUNCTIONS *****************************************************************/
PVOID
Modified: trunk/reactos/dll/win32/gdi32/objects/eng.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/objects/en…
==============================================================================
--- trunk/reactos/dll/win32/gdi32/objects/eng.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/gdi32/objects/eng.c [iso-8859-1] Mon Oct 20 14:33:20 2008
@@ -154,16 +154,15 @@
EngGetDriverName(HDEV hdev)
{
// DHPDEV from NtGdiGetDhpdev must be from print driver.
- PDRIVER_INFO_2W pDrvInfo2 = (PDRIVER_INFO_2W)NtGdiGetDhpdev(hdev);
-
- if (!pDrvInfo2) return NULL;
+ PUMPDEV pPDev = (PUMPDEV)NtGdiGetDhpdev(hdev);
+
+ if (!pPDev) return NULL;
- if (pDrvInfo2->cVersion != 0xFEDCBA98 ) // Init mask for ver 2+
+ if (pPDev->Sig != PDEV_UMPD_ID)
{
- PDRIVER_INFO_1W pDrvInfo1 = (PDRIVER_INFO_1W) pDrvInfo2;
- return pDrvInfo1->pName;
+ pPDev = (PUMPDEV)pPDev->Sig;
}
- return pDrvInfo2->pDriverPath;
+ return pPDev->pdi5Info->pDriverPath;
}
/*
@@ -172,16 +171,15 @@
LPWSTR STDCALL
EngGetPrinterDataFileName(HDEV hdev)
{
- PDRIVER_INFO_2W pDrvInfo2 = (PDRIVER_INFO_2W)NtGdiGetDhpdev(hdev);
-
- if (!pDrvInfo2) return NULL;
-
- if (pDrvInfo2->cVersion != 0xFEDCBA98 )
+ PUMPDEV pPDev = (PUMPDEV)NtGdiGetDhpdev(hdev);
+
+ if (!pPDev) return NULL;
+
+ if (pPDev->Sig != PDEV_UMPD_ID)
{
- PDRIVER_INFO_1W pDrvInfo1 = (PDRIVER_INFO_1W) pDrvInfo2;
- return pDrvInfo1->pName;
+ pPDev = (PUMPDEV)pPDev->Sig;
}
- return pDrvInfo2->pDataFile;
+ return pPDev->pdi5Info->pDataFile;
}
/*
Modified: trunk/reactos/include/psdk/winspool.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/winspool.h?re…
==============================================================================
--- trunk/reactos/include/psdk/winspool.h [iso-8859-1] (original)
+++ trunk/reactos/include/psdk/winspool.h [iso-8859-1] Mon Oct 20 14:33:20 2008
@@ -374,6 +374,162 @@
LPWSTR pMonitorName;
LPWSTR pDefaultDataType;
} DRIVER_INFO_3W,*PDRIVER_INFO_3W,*LPDRIVER_INFO_3W;
+typedef struct _DRIVER_INFO_4A {
+ DWORD cVersion; // SDK examples:
+ LPSTR pName; // QMS 810
+ LPSTR pEnvironment; // Win32 x86
+ LPSTR pDriverPath; // c:\drivers\pscript.dll
+ LPSTR pDataFile; // c:\drivers\QMS810.PPD
+ LPSTR pConfigFile; // c:\drivers\PSCRPTUI.DLL
+ LPSTR pHelpFile; // c:\drivers\PSCRPTUI.HLP
+ LPSTR pDependentFiles; //
PSCRIPT.DLL\0QMS810.PPD\0PSCRIPTUI.DLL\0PSCRIPTUI.HLP\0PSTEST.TXT\0\0
+ LPSTR pMonitorName; // "PJL monitor"
+ LPSTR pDefaultDataType; // "EMF"
+ LPSTR pszzPreviousNames; // "OldName1\0OldName2\0\0
+} DRIVER_INFO_4A, *PDRIVER_INFO_4A, *LPDRIVER_INFO_4A;
+typedef struct _DRIVER_INFO_4W {
+ DWORD cVersion;
+ LPWSTR pName;
+ LPWSTR pEnvironment;
+ LPWSTR pDriverPath;
+ LPWSTR pDataFile;
+ LPWSTR pConfigFile;
+ LPWSTR pHelpFile;
+ LPWSTR pDependentFiles;
+ LPWSTR pMonitorName;
+ LPWSTR pDefaultDataType;
+ LPWSTR pszzPreviousNames;
+} DRIVER_INFO_4W, *PDRIVER_INFO_4W, *LPDRIVER_INFO_4W;
+typedef struct _DRIVER_INFO_5A {
+ DWORD cVersion; // SDK examples:
+ LPSTR pName; // QMS 810
+ LPSTR pEnvironment; // Win32 x86
+ LPSTR pDriverPath; // c:\drivers\pscript.dll
+ LPSTR pDataFile; // c:\drivers\QMS810.PPD
+ LPSTR pConfigFile; // c:\drivers\PSCRPTUI.DLL
+ DWORD dwDriverAttributes; // driver attributes (like UMPD/KMPD)
+ DWORD dwConfigVersion; // version number of the config file since reboot
+ DWORD dwDriverVersion; // version number of the driver file since reboot
+} DRIVER_INFO_5A, *PDRIVER_INFO_5A, *LPDRIVER_INFO_5A;
+typedef struct _DRIVER_INFO_5W {
+ DWORD cVersion;
+ LPWSTR pName;
+ LPWSTR pEnvironment;
+ LPWSTR pDriverPath;
+ LPWSTR pDataFile;
+ LPWSTR pConfigFile;
+ DWORD dwDriverAttributes;
+ DWORD dwConfigVersion;
+ DWORD dwDriverVersion;
+} DRIVER_INFO_5W, *PDRIVER_INFO_5W, *LPDRIVER_INFO_5W;
+typedef struct _DRIVER_INFO_6A {
+ DWORD cVersion;
+ LPSTR pName;
+ LPSTR pEnvironment;
+ LPSTR pDriverPath;
+ LPSTR pDataFile;
+ LPSTR pConfigFile;
+ LPSTR pHelpFile;
+ LPSTR pDependentFiles;
+ LPSTR pMonitorName;
+ LPSTR pDefaultDataType;
+ LPSTR pszzPreviousNames;
+ FILETIME ftDriverDate;
+ DWORDLONG dwlDriverVersion;
+ LPSTR pszMfgName;
+ LPSTR pszOEMUrl;
+ LPSTR pszHardwareID;
+ LPSTR pszProvider;
+} DRIVER_INFO_6A, *PDRIVER_INFO_6A, *LPDRIVER_INFO_6A;
+typedef struct _DRIVER_INFO_6W {
+ DWORD cVersion;
+ LPWSTR pName;
+ LPWSTR pEnvironment;
+ LPWSTR pDriverPath;
+ LPWSTR pDataFile;
+ LPWSTR pConfigFile;
+ LPWSTR pHelpFile;
+ LPWSTR pDependentFiles;
+ LPWSTR pMonitorName;
+ LPWSTR pDefaultDataType;
+ LPWSTR pszzPreviousNames;
+ FILETIME ftDriverDate;
+ DWORDLONG dwlDriverVersion;
+ LPWSTR pszMfgName;
+ LPWSTR pszOEMUrl;
+ LPWSTR pszHardwareID;
+ LPWSTR pszProvider;
+} DRIVER_INFO_6W, *PDRIVER_INFO_6W, *LPDRIVER_INFO_6W;
+#define PRINTER_DRIVER_PACKAGE_AWARE 0x00000001
+typedef struct _DRIVER_INFO_8A {
+ DWORD cVersion;
+ LPSTR pName;
+ LPSTR pEnvironment;
+ LPSTR pDriverPath;
+ LPSTR pDataFile;
+ LPSTR pConfigFile;
+ LPSTR pHelpFile;
+ LPSTR pDependentFiles;
+ LPSTR pMonitorName;
+ LPSTR pDefaultDataType;
+ LPSTR pszzPreviousNames;
+ FILETIME ftDriverDate;
+ DWORDLONG dwlDriverVersion;
+ LPSTR pszMfgName;
+ LPSTR pszOEMUrl;
+ LPSTR pszHardwareID;
+ LPSTR pszProvider;
+ LPSTR pszPrintProcessor;
+ LPSTR pszVendorSetup;
+ LPSTR pszzColorProfiles;
+ LPSTR pszInfPath;
+ DWORD dwPrinterDriverAttributes;
+ LPSTR pszzCoreDriverDependencies;
+ FILETIME ftMinInboxDriverVerDate;
+ DWORDLONG dwlMinInboxDriverVerVersion;
+} DRIVER_INFO_8A, *PDRIVER_INFO_8A, *LPDRIVER_INFO_8A;
+typedef struct _DRIVER_INFO_8W {
+ DWORD cVersion;
+ LPWSTR pName;
+ LPWSTR pEnvironment;
+ LPWSTR pDriverPath;
+ LPWSTR pDataFile;
+ LPWSTR pConfigFile;
+ LPWSTR pHelpFile;
+ LPWSTR pDependentFiles;
+ LPWSTR pMonitorName;
+ LPWSTR pDefaultDataType;
+ LPWSTR pszzPreviousNames;
+ FILETIME ftDriverDate;
+ DWORDLONG dwlDriverVersion;
+ LPWSTR pszMfgName;
+ LPWSTR pszOEMUrl;
+ LPWSTR pszHardwareID;
+ LPWSTR pszProvider;
+ LPWSTR pszPrintProcessor;
+ LPWSTR pszVendorSetup;
+ LPWSTR pszzColorProfiles;
+ LPWSTR pszInfPath;
+ DWORD dwPrinterDriverAttributes;
+ LPWSTR pszzCoreDriverDependencies;
+ FILETIME ftMinInboxDriverVerDate;
+ DWORDLONG dwlMinInboxDriverVerVersion;
+} DRIVER_INFO_8W, *PDRIVER_INFO_8W, *LPDRIVER_INFO_8W;
+// FLAGS for dwDriverAttributes
+#define DRIVER_KERNELMODE 0x00000001
+#define DRIVER_USERMODE 0x00000002
+// FLAGS for DeletePrinterDriverEx.
+#define DPD_DELETE_UNUSED_FILES 0x00000001
+#define DPD_DELETE_SPECIFIC_VERSION 0x00000002
+#define DPD_DELETE_ALL_FILES 0x00000004
+// FLAGS for AddPrinterDriverEx.
+#define APD_STRICT_UPGRADE 0x00000001
+#define APD_STRICT_DOWNGRADE 0x00000002
+#define APD_COPY_ALL_FILES 0x00000004
+#define APD_COPY_NEW_FILES 0x00000008
+#if(_WIN32_WINNT >= 0x0501)
+ #define APD_COPY_FROM_DIRECTORY 0x00000010
+#endif
typedef struct _MONITOR_INFO_1A{LPSTR pName;}
MONITOR_INFO_1A,*PMONITOR_INFO_1A,*LPMONITOR_INFO_1A;
typedef struct _MONITOR_INFO_1W{LPWSTR pName;}
MONITOR_INFO_1W,*PMONITOR_INFO_1W,*LPMONITOR_INFO_1W;
typedef struct _PORT_INFO_1A {LPSTR pName;} PORT_INFO_1A,*PPORT_INFO_1A,*LPPORT_INFO_1A;
@@ -666,6 +822,10 @@
typedef PORT_INFO_2W PORT_INFO_2,*PPORT_INFO_2,*LPPORT_INFO_2;
typedef PORT_INFO_3W PORT_INFO_3,*PPORT_INFO_3,*LPPORT_INFO_3;
typedef DRIVER_INFO_2W DRIVER_INFO_2,*PDRIVER_INFO_2,*LPDRIVER_INFO_2;
+typedef DRIVER_INFO_4W DRIVER_INFO_4,*PDRIVER_INFO_4,*LPDRIVER_INFO_4;
+typedef DRIVER_INFO_5W DRIVER_INFO_5,*PDRIVER_INFO_5,*LPDRIVER_INFO_5;
+typedef DRIVER_INFO_6W DRIVER_INFO_6,*PDRIVER_INFO_6,*LPDRIVER_INFO_6;
+typedef DRIVER_INFO_8W DRIVER_INFO_8,*PDRIVER_INFO_8,*LPDRIVER_INFO_8;
typedef PRINTER_INFO_1W PRINTER_INFO_1,*PPRINTER_INFO_1,*LPPRINTER_INFO_1;
typedef PRINTER_INFO_2W PRINTER_INFO_2,*PPRINTER_INFO_2,*LPPRINTER_INFO_2;
typedef PRINTER_INFO_4W PRINTER_INFO_4,*PPRINTER_INFO_4,*LPPRINTER_INFO_4;
@@ -731,6 +891,10 @@
typedef PORT_INFO_2A PORT_INFO_2,*PPORT_INFO_2,*LPPORT_INFO_2;
typedef PORT_INFO_3A PORT_INFO_3,*PPORT_INFO_3,*LPPORT_INFO_3;
typedef DRIVER_INFO_2A DRIVER_INFO_2,*PDRIVER_INFO_2,*LPDRIVER_INFO_2;
+typedef DRIVER_INFO_4A DRIVER_INFO_4,*PDRIVER_INFO_4,*LPDRIVER_INFO_4;
+typedef DRIVER_INFO_5A DRIVER_INFO_5,*PDRIVER_INFO_5,*LPDRIVER_INFO_5;
+typedef DRIVER_INFO_6A DRIVER_INFO_6,*PDRIVER_INFO_6,*LPDRIVER_INFO_6;
+typedef DRIVER_INFO_8A DRIVER_INFO_8,*PDRIVER_INFO_8,*LPDRIVER_INFO_8;
typedef PRINTER_INFO_1A PRINTER_INFO_1,*PPRINTER_INFO_1,*LPPRINTER_INFO_1;
typedef PRINTER_INFO_2A PRINTER_INFO_2,*PPRINTER_INFO_2,*LPPRINTER_INFO_2;
typedef PRINTER_INFO_4A PRINTER_INFO_4,*PPRINTER_INFO_4,*LPPRINTER_INFO_4;
Modified: trunk/reactos/include/reactos/win32k/ntgdihdl.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/win32k/ntg…
==============================================================================
--- trunk/reactos/include/reactos/win32k/ntgdihdl.h [iso-8859-1] (original)
+++ trunk/reactos/include/reactos/win32k/ntgdihdl.h [iso-8859-1] Mon Oct 20 14:33:20 2008
@@ -251,6 +251,8 @@
ABORTPROC pAbortProc; /* AbortProc for Printing */
DWORD CallBackTick;
HANDLE hPrinter; /* Local or Remote Printer driver */
+ PVOID pUMPDev;
+ PUMDHPDEV pUMdhpdev;
DEVCAPS DevCaps;
HBRUSH BrushColor;
HPEN PenColor;