summaryrefslogtreecommitdiff
path: root/win32/win32.c
diff options
context:
space:
mode:
authorSteve Hay <SteveHay@planit.com>2009-11-23 23:04:41 +0000
committerSteve Hay <SteveHay@planit.com>2009-11-23 23:04:41 +0000
commitdbb3120a48c1483138e02a3fadf359e5b664ae11 (patch)
treed03c053b6cfd9f5a1999a5afcae30e2d362c81cd /win32/win32.c
parent24855dffdf07c139d331fbdd811a1a8299756ee0 (diff)
downloadperl-dbb3120a48c1483138e02a3fadf359e5b664ae11.tar.gz
Fix code-before-declaration error on Win32 with recent VC++ compilers
(We only #define SET_INVALID_PARAMETER_HANDLER for VC2005 and later, so users of earlier compilers will not have seen this error)
Diffstat (limited to 'win32/win32.c')
-rw-r--r--win32/win32.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/win32/win32.c b/win32/win32.c
index d583087d42..b9eea70535 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -4801,16 +4801,6 @@ Perl_win32_init(int *argcp, char ***argvp)
{
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;
@@ -4828,6 +4818,16 @@ Perl_win32_init(int *argcp, char ***argvp)
#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");