]> granicus.if.org Git - php/commitdiff
somehow the module shutdown order got reversed since 4.3.0,
authorHarald Radi <phanto@php.net>
Tue, 28 Jan 2003 23:45:02 +0000 (23:45 +0000)
committerHarald Radi <phanto@php.net>
Tue, 28 Jan 2003 23:45:02 +0000 (23:45 +0000)
thus the CoInitialize / CoUninitialize calles are more sane here
than in the basic functions module.

main/main.c

index 7c6bcb9152dcaece247b76f1ef5bde55bfe6cd82..a5415425d8dfb250cc77c26c8407d2bdf3e4f752 100644 (file)
@@ -1009,11 +1009,14 @@ int php_module_startup(sapi_module_struct *sf, zend_module_entry *additional_mod
 
        php_core_globals *core_globals;
 #endif
+
 #if defined(PHP_WIN32) || (defined(NETWARE) && defined(USE_WINSOCK))
        WORD wVersionRequested = MAKEWORD(2, 0);
        WSADATA wsaData;
 #endif
 #ifdef PHP_WIN32
+       CoInitialize(NULL);
+
        {
                DWORD dwVersion = GetVersion();
 
@@ -1233,6 +1236,10 @@ void php_module_shutdown(TSRMLS_D)
 #endif
 
        module_initialized = 0;
+       
+#ifdef PHP_WIN32
+       CoUninitialize();
+#endif
 }
 /* }}} */