Alexandre Julliard : msvcrt: Make sure msvcrt doesn't get unloaded.
Alexandre Julliard
julliard at winehq.org
Mon May 31 11:21:35 CDT 2010
Module: wine
Branch: master
Commit: 14b3db99c1b552c3a0d5dc8e2003122677575a81
URL: http://source.winehq.org/git/wine.git/?a=commit;h=14b3db99c1b552c3a0d5dc8e2003122677575a81
Author: Alexandre Julliard <julliard at winehq.org>
Date: Fri May 28 20:33:27 2010 +0200
msvcrt: Make sure msvcrt doesn't get unloaded.
We can't initialize file handles properly a second time.
---
dlls/msvcrt/main.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/dlls/msvcrt/main.c b/dlls/msvcrt/main.c
index a5b0961..323f8b7 100644
--- a/dlls/msvcrt/main.c
+++ b/dlls/msvcrt/main.c
@@ -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:
More information about the wine-cvs
mailing list