From: Harald Radi Date: Tue, 28 Jan 2003 23:45:02 +0000 (+0000) Subject: somehow the module shutdown order got reversed since 4.3.0, X-Git-Tag: php-4.3.2RC1~384 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=309e5aacc1b73a31e62a31c3ab333e86be739142;p=php somehow the module shutdown order got reversed since 4.3.0, thus the CoInitialize / CoUninitialize calles are more sane here than in the basic functions module. --- diff --git a/main/main.c b/main/main.c index 7c6bcb9152..a5415425d8 100644 --- a/main/main.c +++ b/main/main.c @@ -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 } /* }}} */