Avoid unnecessary run-time initializations.
This commit is contained in:
parent
fb85c9e924
commit
ee4f4a05c5
|
@ -67,12 +67,12 @@ static const WCHAR szComponents[] = {
|
|||
'C','o','m','p','o','n','e','n','t','s',0 };
|
||||
|
||||
/* the UI level */
|
||||
INSTALLUILEVEL gUILevel;
|
||||
HWND gUIhwnd;
|
||||
INSTALLUI_HANDLERA gUIHandler;
|
||||
INSTALLUI_HANDLERW gUIHandlerW;
|
||||
DWORD gUIFilter;
|
||||
LPVOID gUIContext;
|
||||
INSTALLUILEVEL gUILevel = INSTALLUILEVEL_BASIC;
|
||||
HWND gUIhwnd = 0;
|
||||
INSTALLUI_HANDLERA gUIHandlerA = NULL;
|
||||
INSTALLUI_HANDLERW gUIHandlerW = NULL;
|
||||
DWORD gUIFilter = 0;
|
||||
LPVOID gUIContext = NULL;
|
||||
WCHAR gszLogFile[MAX_PATH];
|
||||
|
||||
/*
|
||||
|
@ -1012,10 +1012,10 @@ INSTALLUILEVEL WINAPI MsiSetInternalUI(INSTALLUILEVEL dwUILevel, HWND *phWnd)
|
|||
INSTALLUI_HANDLERA WINAPI MsiSetExternalUIA(INSTALLUI_HANDLERA puiHandler,
|
||||
DWORD dwMessageFilter, LPVOID pvContext)
|
||||
{
|
||||
INSTALLUI_HANDLERA prev = gUIHandler;
|
||||
INSTALLUI_HANDLERA prev = gUIHandlerA;
|
||||
|
||||
TRACE("%p %lx %p\n",puiHandler, dwMessageFilter,pvContext);
|
||||
gUIHandler = puiHandler;
|
||||
gUIHandlerA = puiHandler;
|
||||
gUIFilter = dwMessageFilter;
|
||||
gUIContext = pvContext;
|
||||
|
||||
|
@ -1729,15 +1729,6 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
|
|||
{
|
||||
case DLL_PROCESS_ATTACH:
|
||||
DisableThreadLibraryCalls(hinstDLL);
|
||||
|
||||
/* UI Initialization */
|
||||
gUILevel = INSTALLUILEVEL_BASIC;
|
||||
gUIhwnd = 0;
|
||||
gUIHandler = NULL;
|
||||
gUIFilter = 0;
|
||||
gUIContext = NULL;
|
||||
gszLogFile[0]=0;
|
||||
|
||||
break;
|
||||
case DLL_PROCESS_DETACH:
|
||||
/* FIXME: Cleanup */
|
||||
|
|
|
@ -338,7 +338,8 @@ BOOL decode_base85_guid(LPCWSTR,GUID*);
|
|||
/* UI globals */
|
||||
extern INSTALLUILEVEL gUILevel;
|
||||
extern HWND gUIhwnd;
|
||||
extern INSTALLUI_HANDLERA gUIHandler;
|
||||
extern INSTALLUI_HANDLERA gUIHandlerA;
|
||||
extern INSTALLUI_HANDLERW gUIHandlerW;
|
||||
extern DWORD gUIFilter;
|
||||
extern LPVOID gUIContext;
|
||||
extern WCHAR gszLogFile[MAX_PATH];
|
||||
|
|
|
@ -554,7 +554,7 @@ INT MSI_ProcessMessage( MSIPACKAGE *package, INSTALLMESSAGE eMessageType,
|
|||
HeapFree(GetProcessHeap(),0,tmp);
|
||||
}
|
||||
|
||||
TRACE("(%p %lx %lx %s)\n",gUIHandler, gUIFilter, log_type,
|
||||
TRACE("(%p %lx %lx %s)\n",gUIHandlerA, gUIFilter, log_type,
|
||||
debugstr_w(message));
|
||||
|
||||
/* convert it to ASCII */
|
||||
|
@ -564,9 +564,9 @@ INT MSI_ProcessMessage( MSIPACKAGE *package, INSTALLMESSAGE eMessageType,
|
|||
WideCharToMultiByte( CP_ACP, 0, message, -1,
|
||||
msg, len, NULL, NULL );
|
||||
|
||||
if (gUIHandler && (gUIFilter & log_type))
|
||||
if (gUIHandlerA && (gUIFilter & log_type))
|
||||
{
|
||||
rc = gUIHandler(gUIContext,eMessageType,msg);
|
||||
rc = gUIHandlerA(gUIContext,eMessageType,msg);
|
||||
}
|
||||
|
||||
if ((!rc) && (gszLogFile[0]) && !((eMessageType & 0xff000000) ==
|
||||
|
|
Loading…
Reference in New Issue