mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 08:49:15 +00:00
Store the module instance we get in DllMain to avoid extra LoadLibrary
calls.
This commit is contained in:
parent
c3116c5e61
commit
0bb4bddff4
3 changed files with 5 additions and 4 deletions
|
@ -349,7 +349,7 @@ INT PSDRV_ExtDeviceMode(LPSTR lpszDriver, HWND hwnd, LPDEVMODEA lpdmOutput,
|
|||
|
||||
/* If DM_PROMPT is set, present modal dialog box */
|
||||
if(dwMode & DM_PROMPT) {
|
||||
HINSTANCE hinstComctl32, hinstWineps32 = LoadLibraryA("WINEPS");
|
||||
HINSTANCE hinstComctl32;
|
||||
HPROPSHEETPAGE hpsp[1];
|
||||
PROPSHEETPAGEW psp;
|
||||
PROPSHEETHEADERW psh;
|
||||
|
@ -371,7 +371,7 @@ INT PSDRV_ExtDeviceMode(LPSTR lpszDriver, HWND hwnd, LPDEVMODEA lpdmOutput,
|
|||
di->pi = pi;
|
||||
di->dlgdm = dlgdm;
|
||||
psp.dwSize = sizeof(psp);
|
||||
psp.hInstance = hinstWineps32;
|
||||
psp.hInstance = PSDRV_hInstance;
|
||||
psp.u.pszTemplate = PAPERW;
|
||||
psp.u2.pszIcon = NULL;
|
||||
psp.pfnDlgProc = PSDRV_PaperDlgProc;
|
||||
|
|
|
@ -101,6 +101,7 @@ static PSDRV_DEVMODEA DefaultDevmode =
|
|||
}
|
||||
};
|
||||
|
||||
HINSTANCE PSDRV_hInstance = 0;
|
||||
HANDLE PSDRV_Heap = 0;
|
||||
|
||||
static HFONT PSDRV_DefaultFont = 0;
|
||||
|
@ -122,6 +123,7 @@ BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved )
|
|||
switch(reason) {
|
||||
|
||||
case DLL_PROCESS_ATTACH:
|
||||
PSDRV_hInstance = hinst;
|
||||
DisableThreadLibraryCalls(hinst);
|
||||
|
||||
PSDRV_Heap = HeapCreate(0, 0x10000, 0);
|
||||
|
|
|
@ -381,6 +381,7 @@ extern INT16 WINAPI PSDRV_ExtDeviceMode16(HWND16 hwnd, HANDLE16 hDriver,
|
|||
LPDEVMODEA lpdmOutput, LPSTR lpszDevice, LPSTR lpszPort,
|
||||
LPDEVMODEA lpdmInput, LPSTR lpszProfile, WORD fwMode);
|
||||
|
||||
extern HINSTANCE PSDRV_hInstance;
|
||||
extern HANDLE PSDRV_Heap;
|
||||
extern char *PSDRV_ANSIVector[256];
|
||||
|
||||
|
@ -394,8 +395,6 @@ extern BOOL PSDRV_AddAFMtoList(FONTFAMILY **head, const AFM *afm,
|
|||
BOOL *p_added);
|
||||
extern void PSDRV_FreeAFMList( FONTFAMILY *head );
|
||||
|
||||
extern BOOL WINAPI PSDRV_Init(HINSTANCE hinst, DWORD reason, LPVOID reserved);
|
||||
|
||||
extern INT PSDRV_XWStoDS( PSDRV_PDEVICE *physDev, INT width );
|
||||
extern INT PSDRV_YWStoDS( PSDRV_PDEVICE *physDev, INT height );
|
||||
|
||||
|
|
Loading…
Reference in a new issue