{
HMODULE module;
- /* When the manifest resource requests Common-Controls v6 then
- * user32.dll no longer registers all the Windows classes used for
- * standard controls but leaves some of them to be registered by
- * comctl32.dll. InitCommonControls() doesn't do anything but calling
- * it makes sure comctl32.dll gets loaded into the process and registers
- * the standard control classes. Without this even normal Windows APIs
- * like MessageBox() can fail under some versions of Windows XP.
- */
- InitCommonControls();
-
#ifdef SET_INVALID_PARAMETER_HANDLER
_invalid_parameter_handler oldHandler, newHandler;
newHandler = my_invalid_parameter_handler;
#endif
MALLOC_INIT;
+ /* When the manifest resource requests Common-Controls v6 then
+ * user32.dll no longer registers all the Windows classes used for
+ * standard controls but leaves some of them to be registered by
+ * comctl32.dll. InitCommonControls() doesn't do anything but calling
+ * it makes sure comctl32.dll gets loaded into the process and registers
+ * the standard control classes. Without this even normal Windows APIs
+ * like MessageBox() can fail under some versions of Windows XP.
+ */
+ InitCommonControls();
+
module = GetModuleHandle("ntdll.dll");
if (module) {
*(FARPROC*)&pfnZwQuerySystemInformation = GetProcAddress(module, "ZwQuerySystemInformation");