From faa1a76919a9865a19c67cff20bf0e96cd842052 Mon Sep 17 00:00:00 2001 From: Filip Navara Date: Sat, 31 Jan 2004 13:29:19 +0000 Subject: [PATCH] Call initialization of the msvcrt parts ported from Wine. svn path=/trunk/; revision=7935 --- reactos/lib/msvcrt/misc/dllmain.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/reactos/lib/msvcrt/misc/dllmain.c b/reactos/lib/msvcrt/misc/dllmain.c index 2746a00580a..630fbed904d 100644 --- a/reactos/lib/msvcrt/misc/dllmain.c +++ b/reactos/lib/msvcrt/misc/dllmain.c @@ -1,4 +1,4 @@ -/* $Id: dllmain.c,v 1.19 2003/06/01 17:08:03 hbirr Exp $ +/* $Id: dllmain.c,v 1.20 2004/01/31 13:29:19 navaraf Exp $ * * dllmain.c * @@ -14,15 +14,16 @@ * DISCLAMED. This includes but is not limited to warrenties of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * - * $Revision: 1.19 $ - * $Author: hbirr $ - * $Date: 2003/06/01 17:08:03 $ + * $Revision: 1.20 $ + * $Author: navaraf $ + * $Date: 2004/01/31 13:29:19 $ * */ #include #include #include +#include "../wine/msvcrt.h" #define NDEBUG #include @@ -61,8 +62,6 @@ DllMain(PVOID hinstDll, ULONG dwReason, PVOID reserved) switch (dwReason) { case DLL_PROCESS_ATTACH://1 -#if 0 -#else /* initialize version info */ DPRINT("Attach %d\n", nAttachCount); _osver = GetVersion(); @@ -99,9 +98,12 @@ DllMain(PVOID hinstDll, ULONG dwReason, PVOID reserved) /* FIXME: more initializations... */ + /* FIXME: Initialization of the WINE code */ + msvcrt_init_mt_locks(); + msvcrt_init_args(); + nAttachCount++; DPRINT("Attach done\n"); -#endif break; case DLL_THREAD_ATTACH://2 @@ -117,6 +119,10 @@ DllMain(PVOID hinstDll, ULONG dwReason, PVOID reserved) { nAttachCount--; + /* Deinitialization of the WINE code */ + msvcrt_free_args(); + msvcrt_free_mt_locks(); + /* FIXME: more cleanup... */ _fcloseall();