From bba5423d0f27ed36b9875c0e33c08017e8ef6916 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Mon, 29 Aug 2005 15:11:37 +0000 Subject: [PATCH] Uncomment out DisableThreadLibraryCalls in DllMain and add the kernel32 imports that it requires. --- dlls/dinput8/Makefile.in | 2 +- dlls/dplay/Makefile.in | 2 +- dlls/newdev/Makefile.in | 1 + dlls/ntdll/loader.c | 10 ++++++++++ dlls/olepro32/Makefile.in | 2 +- dlls/rsabase/Makefile.in | 2 +- dlls/shfolder/Makefile.in | 2 +- dlls/stdole2.tlb/Makefile.in | 1 + dlls/stdole32.tlb/Makefile.in | 1 + dlls/winecrt0/dll_main.c | 2 +- 10 files changed, 19 insertions(+), 6 deletions(-) diff --git a/dlls/dinput8/Makefile.in b/dlls/dinput8/Makefile.in index 9d80f796a92..cd23d04a04b 100644 --- a/dlls/dinput8/Makefile.in +++ b/dlls/dinput8/Makefile.in @@ -4,7 +4,7 @@ SRCDIR = @srcdir@ VPATH = @srcdir@ MODULE = dinput8.dll IMPORTLIB = libdinput8.$(IMPLIBEXT) -IMPORTS = dinput +IMPORTS = dinput kernel32 EXTRALIBS = -luuid C_SRCS = \ diff --git a/dlls/dplay/Makefile.in b/dlls/dplay/Makefile.in index b8145ebbb09..6f02b176b7b 100644 --- a/dlls/dplay/Makefile.in +++ b/dlls/dplay/Makefile.in @@ -4,7 +4,7 @@ SRCDIR = @srcdir@ VPATH = @srcdir@ MODULE = dplay.dll IMPORTLIB = libdplay.$(IMPLIBEXT) -IMPORTS = dplayx +IMPORTS = dplayx kernel32 C_SRCS = dplay_main.c diff --git a/dlls/newdev/Makefile.in b/dlls/newdev/Makefile.in index 8bda487ef6f..59604adfba2 100644 --- a/dlls/newdev/Makefile.in +++ b/dlls/newdev/Makefile.in @@ -4,6 +4,7 @@ SRCDIR = @srcdir@ VPATH = @srcdir@ MODULE = newdev.dll IMPORTLIB = libnewdev.$(IMPLIBEXT) +IMPORTS = kernel32 C_SRCS = main.c diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c index 8e95c3935c6..eccb190e8fd 100644 --- a/dlls/ntdll/loader.c +++ b/dlls/ntdll/loader.c @@ -2087,6 +2087,16 @@ NTSTATUS WINAPI NtUnloadDriver( const UNICODE_STRING *DriverServiceName ) } +/****************************************************************** + * DllMain (NTDLL.@) + */ +BOOL WINAPI DllMain( HINSTANCE inst, DWORD reason, LPVOID reserved ) +{ + if (reason == DLL_PROCESS_ATTACH) LdrDisableThreadCalloutsForDll( inst ); + return TRUE; +} + + /****************************************************************** * __wine_init_windows_dir (NTDLL.@) * diff --git a/dlls/olepro32/Makefile.in b/dlls/olepro32/Makefile.in index bcc8cfd4acc..88be62288f5 100644 --- a/dlls/olepro32/Makefile.in +++ b/dlls/olepro32/Makefile.in @@ -4,7 +4,7 @@ SRCDIR = @srcdir@ VPATH = @srcdir@ MODULE = olepro32.dll IMPORTLIB = libolepro32.$(IMPLIBEXT) -IMPORTS = oleaut32 +IMPORTS = oleaut32 kernel32 C_SRCS = olepro32stubs.c diff --git a/dlls/rsabase/Makefile.in b/dlls/rsabase/Makefile.in index ec86156b724..a6d7b6f9040 100644 --- a/dlls/rsabase/Makefile.in +++ b/dlls/rsabase/Makefile.in @@ -5,7 +5,7 @@ SRCDIR = @srcdir@ VPATH = @srcdir@ MODULE = rsabase.dll IMPORTLIB = librsabase.$(IMPLIBEXT) -IMPORTS = rsaenh +IMPORTS = rsaenh kernel32 SUBDIRS = tests diff --git a/dlls/shfolder/Makefile.in b/dlls/shfolder/Makefile.in index 5dc0941effd..b497a221b56 100644 --- a/dlls/shfolder/Makefile.in +++ b/dlls/shfolder/Makefile.in @@ -4,7 +4,7 @@ SRCDIR = @srcdir@ VPATH = @srcdir@ MODULE = shfolder.dll IMPORTLIB = libshfolder.$(IMPLIBEXT) -IMPORTS = shell32 +IMPORTS = shell32 kernel32 C_SRCS = shfolder_main.c diff --git a/dlls/stdole2.tlb/Makefile.in b/dlls/stdole2.tlb/Makefile.in index 2ffad7cb59f..d09ab613dcb 100644 --- a/dlls/stdole2.tlb/Makefile.in +++ b/dlls/stdole2.tlb/Makefile.in @@ -3,6 +3,7 @@ TOPOBJDIR = ../.. SRCDIR = @srcdir@ VPATH = @srcdir@ MODULE = stdole2.tlb +IMPORTS = kernel32 RC_SRCS = rsrc.rc RC_TLB = std_ole_v2.tlb diff --git a/dlls/stdole32.tlb/Makefile.in b/dlls/stdole32.tlb/Makefile.in index 584ff15efa3..3ca61499049 100644 --- a/dlls/stdole32.tlb/Makefile.in +++ b/dlls/stdole32.tlb/Makefile.in @@ -3,6 +3,7 @@ TOPOBJDIR = ../.. SRCDIR = @srcdir@ VPATH = @srcdir@ MODULE = stdole32.tlb +IMPORTS = kernel32 RC_SRCS = rsrc.rc RC_TLB = std_ole_v1.tlb diff --git a/dlls/winecrt0/dll_main.c b/dlls/winecrt0/dll_main.c index 8d8db641963..7ac2e295a83 100644 --- a/dlls/winecrt0/dll_main.c +++ b/dlls/winecrt0/dll_main.c @@ -24,6 +24,6 @@ BOOL WINAPI DllMain( HINSTANCE inst, DWORD reason, LPVOID reserved ) { - /* if (reason == DLL_PROCESS_ATTACH) DisableThreadLibraryCalls( inst ); */ + if (reason == DLL_PROCESS_ATTACH) DisableThreadLibraryCalls( inst ); return TRUE; }