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 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "msvcrt.h"
#include "winternl.h"
#include "wine/debug.h"
......@@ -100,6 +101,8 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
msvcrt_init_args();
msvcrt_init_signals();
_setmbcp(_MB_CP_LOCALE);
/* don't allow unloading msvcrt, we can't setup file handles twice */
LdrAddRefDll( 0, hinstDLL );
TRACE("finished process init\n");
break;
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