Commit 14b3db99 authored by Alexandre Julliard's avatar Alexandre Julliard

msvcrt: Make sure msvcrt doesn't get unloaded.

We can't initialize file handles properly a second time.
parent 271f5fbd
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
#include "msvcrt.h" #include "msvcrt.h"
#include "winternl.h"
#include "wine/debug.h" #include "wine/debug.h"
...@@ -100,6 +101,8 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) ...@@ -100,6 +101,8 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
msvcrt_init_args(); msvcrt_init_args();
msvcrt_init_signals(); msvcrt_init_signals();
_setmbcp(_MB_CP_LOCALE); _setmbcp(_MB_CP_LOCALE);
/* don't allow unloading msvcrt, we can't setup file handles twice */
LdrAddRefDll( 0, hinstDLL );
TRACE("finished process init\n"); TRACE("finished process init\n");
break; break;
case DLL_THREAD_ATTACH: case DLL_THREAD_ATTACH:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment