dll: convert all initialization to the initonce pattern

This commit is contained in:
Bill Zissimopoulos
2016-06-16 12:17:38 -07:00
parent b695ef8ad8
commit 68d79b0c3b
13 changed files with 53 additions and 124 deletions

View File

@ -276,16 +276,9 @@ void wmainCRTStartup(void)
DWORD Argc;
PWSTR *Argv;
extern HANDLE ProcessHeap;
ProcessHeap = GetProcessHeap();
if (0 == ProcessHeap)
ExitProcess(GetLastError());
Argv = CommandLineToArgvW(GetCommandLineW(), &Argc);
if (0 == Argv)
ExitProcess(GetLastError());
ExitProcess(wmain(Argc, Argv));
}
HANDLE ProcessHeap;

View File

@ -981,12 +981,5 @@ int wmain(int argc, wchar_t **argv)
void wmainCRTStartup(void)
{
extern HANDLE ProcessHeap;
ProcessHeap = GetProcessHeap();
if (0 == ProcessHeap)
ExitProcess(GetLastError());
ExitProcess(wmain(0, 0));
}
HANDLE ProcessHeap;