[2/2]wineps.drv: Import comctl32 instead of loading it

André Hentschel nerv at dawncrow.de
Fri Jun 4 09:37:19 CDT 2010


---
 dlls/wineps.drv/Makefile.in |    2 +-
 dlls/wineps.drv/driver.c    |   18 ++++--------------
 2 files changed, 5 insertions(+), 15 deletions(-)

diff --git a/dlls/wineps.drv/Makefile.in b/dlls/wineps.drv/Makefile.in
index a3951c9..60720aa 100644
--- a/dlls/wineps.drv/Makefile.in
+++ b/dlls/wineps.drv/Makefile.in
@@ -3,7 +3,7 @@ TOPOBJDIR = ../..
 SRCDIR    = @srcdir@
 VPATH     = @srcdir@
 MODULE    = wineps.drv
-IMPORTS   = user32 gdi32 winspool advapi32 kernel32
+IMPORTS   = user32 gdi32 winspool advapi32 kernel32 comctl32
 EXTRAINCL = @FREETYPEINCL@ @CUPSINCL@
 
 C_SRCS = \
diff --git a/dlls/wineps.drv/driver.c b/dlls/wineps.drv/driver.c
index d664ef6..3181c5d 100644
--- a/dlls/wineps.drv/driver.c
+++ b/dlls/wineps.drv/driver.c
@@ -285,11 +285,6 @@ static INT_PTR CALLBACK PSDRV_PaperDlgProc(HWND hwnd, UINT msg,
 }
 
 
-static void (WINAPI *pInitCommonControls) (void);
-static HPROPSHEETPAGE (WINAPI *pCreatePropertySheetPage) (LPCPROPSHEETPAGEW);
-static int (WINAPI *pPropertySheet) (LPCPROPSHEETHEADERW);
-
-
  /******************************************************************
  *         PSDRV_ExtDeviceMode
  *
@@ -342,7 +337,6 @@ INT CDECL PSDRV_ExtDeviceMode(LPSTR lpszDriver, HWND hwnd, LPDEVMODEA lpdmOutput
 
   /* If DM_PROMPT is set, present modal dialog box */
   if(dwMode & DM_PROMPT) {
-    HINSTANCE hinstComctl32;
     HPROPSHEETPAGE hpsp[1];
     PROPSHEETPAGEW psp;
     PROPSHEETHEADERW psh;
@@ -350,12 +344,6 @@ INT CDECL PSDRV_ExtDeviceMode(LPSTR lpszDriver, HWND hwnd, LPDEVMODEA lpdmOutput
     PSDRV_DEVMODEA *dlgdm;
     static const WCHAR SetupW[] = {'S','e','t','u','p','\0'};
 
-    hinstComctl32 = LoadLibraryA("comctl32.dll");
-    pInitCommonControls = (void*)GetProcAddress(hinstComctl32,
-						"InitCommonControls");
-    pCreatePropertySheetPage = (void*)GetProcAddress(hinstComctl32,
-						    "CreatePropertySheetPageW");
-    pPropertySheet = (void*)GetProcAddress(hinstComctl32, "PropertySheetW");
     memset(&psp,0,sizeof(psp));
     dlgdm = HeapAlloc( PSDRV_Heap, 0, sizeof(*dlgdm) );
     *dlgdm = *pi->Devmode;
@@ -368,7 +356,7 @@ INT CDECL PSDRV_ExtDeviceMode(LPSTR lpszDriver, HWND hwnd, LPDEVMODEA lpdmOutput
     psp.u2.pszIcon = NULL;
     psp.pfnDlgProc = PSDRV_PaperDlgProc;
     psp.lParam = (LPARAM)di;
-    hpsp[0] = pCreatePropertySheetPage(&psp);
+    hpsp[0] = CreatePropertySheetPageW(&psp);
 
     memset(&psh, 0, sizeof(psh));
     psh.dwSize = sizeof(psh);
@@ -377,7 +365,7 @@ INT CDECL PSDRV_ExtDeviceMode(LPSTR lpszDriver, HWND hwnd, LPDEVMODEA lpdmOutput
     psh.hwndParent = HWND_32(hwnd);
     psh.u3.phpage = hpsp;
 
-    pPropertySheet(&psh);
+    PropertySheetW(&psh);
 
   }
   
@@ -394,6 +382,8 @@ INT CDECL PSDRV_ExtDeviceMode(LPSTR lpszDriver, HWND hwnd, LPDEVMODEA lpdmOutput
   }
   return IDOK;
 }
+
+
 /***********************************************************************
  *	PSDRV_DeviceCapabilities	
  *
-- 

Best Regards, André Hentschel



More information about the wine-patches mailing list