For all DLLs with defined DllMain and which do not require
DLL_THREAD_ATTACH/DLL_THREAD_DETACH notifications, call DisableThreadLibraryCalls() in order to slightly improve performance on thread creation/exiting.
This commit is contained in:
parent
bf7a4d7d72
commit
4e1ef0c114
|
@ -204,15 +204,11 @@ BOOL WINAPI DllMain(HINSTANCE hInstDll, DWORD fdwReason, LPVOID lpvReserved)
|
||||||
|
|
||||||
switch (fdwReason) {
|
switch (fdwReason) {
|
||||||
case DLL_PROCESS_ATTACH:
|
case DLL_PROCESS_ATTACH:
|
||||||
if (AVIFILE_hModule == NULL)
|
DisableThreadLibraryCalls(hInstDll);
|
||||||
AVIFILE_hModule = (HMODULE)hInstDll;
|
AVIFILE_hModule = (HMODULE)hInstDll;
|
||||||
break;
|
break;
|
||||||
case DLL_PROCESS_DETACH:
|
case DLL_PROCESS_DETACH:
|
||||||
break;
|
break;
|
||||||
case DLL_THREAD_ATTACH:
|
|
||||||
break;
|
|
||||||
case DLL_THREAD_DETACH:
|
|
||||||
break;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
|
@ -145,6 +145,8 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
|
||||||
|
|
||||||
switch (fdwReason) {
|
switch (fdwReason) {
|
||||||
case DLL_PROCESS_ATTACH:
|
case DLL_PROCESS_ATTACH:
|
||||||
|
DisableThreadLibraryCalls(hinstDLL);
|
||||||
|
|
||||||
COMCTL32_hModule = (HMODULE)hinstDLL;
|
COMCTL32_hModule = (HMODULE)hinstDLL;
|
||||||
|
|
||||||
/* create private heap */
|
/* create private heap */
|
||||||
|
|
|
@ -88,6 +88,9 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL,DWORD fdwReason,LPVOID lpvReserved)
|
||||||
if (fdwReason == DLL_PROCESS_ATTACH)
|
if (fdwReason == DLL_PROCESS_ATTACH)
|
||||||
{
|
{
|
||||||
DWORD version = GetVersion();
|
DWORD version = GetVersion();
|
||||||
|
|
||||||
|
DisableThreadLibraryCalls(hinstDLL);
|
||||||
|
|
||||||
CRTDLL__basemajor_dll = (version >> 24) & 0xFF;
|
CRTDLL__basemajor_dll = (version >> 24) & 0xFF;
|
||||||
CRTDLL__baseminor_dll = (version >> 16) & 0xFF;
|
CRTDLL__baseminor_dll = (version >> 16) & 0xFF;
|
||||||
CRTDLL__baseversion_dll = (version >> 16);
|
CRTDLL__baseversion_dll = (version >> 16);
|
||||||
|
|
|
@ -63,7 +63,11 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
|
||||||
TRACE("fdwReason=%ld\n", fdwReason);
|
TRACE("fdwReason=%ld\n", fdwReason);
|
||||||
if (fdwReason == DLL_PROCESS_ATTACH)
|
if (fdwReason == DLL_PROCESS_ATTACH)
|
||||||
{
|
{
|
||||||
HMODULE mod = GetModuleHandleA( "x11drv.dll" );
|
HMODULE mod;
|
||||||
|
|
||||||
|
DisableThreadLibraryCalls(hInstDLL);
|
||||||
|
|
||||||
|
mod = GetModuleHandleA( "x11drv.dll" );
|
||||||
if (mod)
|
if (mod)
|
||||||
{
|
{
|
||||||
wine_tsx11_lock_ptr = (void *)GetProcAddress( mod, "wine_tsx11_lock" );
|
wine_tsx11_lock_ptr = (void *)GetProcAddress( mod, "wine_tsx11_lock" );
|
||||||
|
|
|
@ -579,7 +579,11 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
|
||||||
|
|
||||||
if (fdwReason == DLL_PROCESS_ATTACH)
|
if (fdwReason == DLL_PROCESS_ATTACH)
|
||||||
{
|
{
|
||||||
HMODULE mod = GetModuleHandleA( "x11drv.dll" );
|
HMODULE mod;
|
||||||
|
|
||||||
|
DisableThreadLibraryCalls(hInstDLL);
|
||||||
|
|
||||||
|
mod = GetModuleHandleA( "x11drv.dll" );
|
||||||
if (mod)
|
if (mod)
|
||||||
{
|
{
|
||||||
wine_tsx11_lock_ptr = (void *)GetProcAddress( mod, "wine_tsx11_lock" );
|
wine_tsx11_lock_ptr = (void *)GetProcAddress( mod, "wine_tsx11_lock" );
|
||||||
|
|
|
@ -60,6 +60,7 @@ BOOL WINAPI DllMain( HINSTANCE inst, DWORD reason, LPVOID reserv)
|
||||||
switch(reason)
|
switch(reason)
|
||||||
{
|
{
|
||||||
case DLL_PROCESS_ATTACH:
|
case DLL_PROCESS_ATTACH:
|
||||||
|
DisableThreadLibraryCalls(inst);
|
||||||
DINPUT_instance = inst;
|
DINPUT_instance = inst;
|
||||||
break;
|
break;
|
||||||
case DLL_PROCESS_DETACH:
|
case DLL_PROCESS_DETACH:
|
||||||
|
|
|
@ -107,6 +107,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
|
||||||
{
|
{
|
||||||
if (fdwReason == DLL_PROCESS_ATTACH)
|
if (fdwReason == DLL_PROCESS_ATTACH)
|
||||||
{
|
{
|
||||||
|
DisableThreadLibraryCalls(hinstDLL);
|
||||||
/* FIXME: Initialisation */
|
/* FIXME: Initialisation */
|
||||||
}
|
}
|
||||||
else if (fdwReason == DLL_PROCESS_DETACH)
|
else if (fdwReason == DLL_PROCESS_DETACH)
|
||||||
|
|
|
@ -38,6 +38,7 @@ BOOL WINAPI DllMain( HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved )
|
||||||
switch ( fdwReason )
|
switch ( fdwReason )
|
||||||
{
|
{
|
||||||
case DLL_PROCESS_ATTACH:
|
case DLL_PROCESS_ATTACH:
|
||||||
|
DisableThreadLibraryCalls(hinstDLL);
|
||||||
/* First instance perform construction of global processor data */
|
/* First instance perform construction of global processor data */
|
||||||
return DPLAYX_ConstructData();
|
return DPLAYX_ConstructData();
|
||||||
|
|
||||||
|
@ -45,9 +46,6 @@ BOOL WINAPI DllMain( HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved )
|
||||||
/* Last instance performs destruction of global processor data */
|
/* Last instance performs destruction of global processor data */
|
||||||
return DPLAYX_DestructData();
|
return DPLAYX_DestructData();
|
||||||
|
|
||||||
case DLL_THREAD_ATTACH: /* Do nothing */
|
|
||||||
case DLL_THREAD_DETACH: /* Do nothing */
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -35,6 +35,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
|
||||||
|
|
||||||
if (fdwReason == DLL_PROCESS_ATTACH)
|
if (fdwReason == DLL_PROCESS_ATTACH)
|
||||||
{
|
{
|
||||||
|
DisableThreadLibraryCalls(hinstDLL);
|
||||||
/* FIXME: Initialisation */
|
/* FIXME: Initialisation */
|
||||||
}
|
}
|
||||||
else if (fdwReason == DLL_PROCESS_DETACH)
|
else if (fdwReason == DLL_PROCESS_DETACH)
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD reason, LPVOID lpvReserved)
|
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD reason, LPVOID lpvReserved)
|
||||||
{
|
{
|
||||||
if (reason != DLL_PROCESS_ATTACH) return TRUE;
|
if (reason != DLL_PROCESS_ATTACH) return TRUE;
|
||||||
|
DisableThreadLibraryCalls(hinstDLL);
|
||||||
return GDI_Init();
|
return GDI_Init();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -40,16 +40,13 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
|
||||||
switch(fdwReason)
|
switch(fdwReason)
|
||||||
{
|
{
|
||||||
case DLL_PROCESS_ATTACH:
|
case DLL_PROCESS_ATTACH:
|
||||||
|
DisableThreadLibraryCalls(hinstDLL);
|
||||||
IMAGEHLP_hHeap = HeapCreate(0, 0x10000, 0);
|
IMAGEHLP_hHeap = HeapCreate(0, 0x10000, 0);
|
||||||
break;
|
break;
|
||||||
case DLL_PROCESS_DETACH:
|
case DLL_PROCESS_DETACH:
|
||||||
HeapDestroy(IMAGEHLP_hHeap);
|
HeapDestroy(IMAGEHLP_hHeap);
|
||||||
IMAGEHLP_hHeap = NULL;
|
IMAGEHLP_hHeap = NULL;
|
||||||
break;
|
break;
|
||||||
case DLL_THREAD_ATTACH:
|
|
||||||
break;
|
|
||||||
case DLL_THREAD_DETACH:
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -86,6 +86,7 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpReserved)
|
||||||
switch (fdwReason)
|
switch (fdwReason)
|
||||||
{
|
{
|
||||||
case DLL_PROCESS_ATTACH:
|
case DLL_PROCESS_ATTACH:
|
||||||
|
DisableThreadLibraryCalls(hInstDLL);
|
||||||
hImeInst = hInstDLL;
|
hImeInst = hInstDLL;
|
||||||
break;
|
break;
|
||||||
case DLL_PROCESS_DETACH:
|
case DLL_PROCESS_DETACH:
|
||||||
|
|
|
@ -44,6 +44,7 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpvReserved)
|
||||||
|
|
||||||
switch (fdwReason) {
|
switch (fdwReason) {
|
||||||
case DLL_PROCESS_ATTACH:
|
case DLL_PROCESS_ATTACH:
|
||||||
|
DisableThreadLibraryCalls(hInstDLL);
|
||||||
MSACM_hHeap = HeapCreate(0, 0x10000, 0);
|
MSACM_hHeap = HeapCreate(0, 0x10000, 0);
|
||||||
MSACM_hInstance32 = hInstDLL;
|
MSACM_hInstance32 = hInstDLL;
|
||||||
MSACM_RegisterAllDrivers();
|
MSACM_RegisterAllDrivers();
|
||||||
|
@ -54,10 +55,6 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpvReserved)
|
||||||
MSACM_hHeap = NULL;
|
MSACM_hHeap = NULL;
|
||||||
MSACM_hInstance32 = NULL;
|
MSACM_hInstance32 = NULL;
|
||||||
break;
|
break;
|
||||||
case DLL_THREAD_ATTACH:
|
|
||||||
break;
|
|
||||||
case DLL_THREAD_DETACH:
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,7 @@ TOPOBJDIR = ../..
|
||||||
SRCDIR = @srcdir@
|
SRCDIR = @srcdir@
|
||||||
VPATH = @srcdir@
|
VPATH = @srcdir@
|
||||||
MODULE = msisys.ocx
|
MODULE = msisys.ocx
|
||||||
|
IMPORTS = kernel32
|
||||||
EXTRALIBS = $(LIBUUID)
|
EXTRALIBS = $(LIBUUID)
|
||||||
|
|
||||||
LDDLLFLAGS = @LDDLLFLAGS@
|
LDDLLFLAGS = @LDDLLFLAGS@
|
||||||
|
|
|
@ -62,16 +62,13 @@ BOOL WINAPI DllMain(
|
||||||
switch ( fdwReason )
|
switch ( fdwReason )
|
||||||
{
|
{
|
||||||
case DLL_PROCESS_ATTACH:
|
case DLL_PROCESS_ATTACH:
|
||||||
|
DisableThreadLibraryCalls(hInstDLL);
|
||||||
if ( !MSISYS_InitProcess() )
|
if ( !MSISYS_InitProcess() )
|
||||||
return FALSE;
|
return FALSE;
|
||||||
break;
|
break;
|
||||||
case DLL_PROCESS_DETACH:
|
case DLL_PROCESS_DETACH:
|
||||||
MSISYS_UninitProcess();
|
MSISYS_UninitProcess();
|
||||||
break;
|
break;
|
||||||
case DLL_THREAD_ATTACH:
|
|
||||||
break;
|
|
||||||
case DLL_THREAD_DETACH:
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
|
@ -1902,13 +1902,10 @@ BOOL WINAPI DllMain(HINSTANCE hModule, DWORD dwReason, LPVOID lpReserved)
|
||||||
|
|
||||||
switch (dwReason) {
|
switch (dwReason) {
|
||||||
case DLL_PROCESS_ATTACH:
|
case DLL_PROCESS_ATTACH:
|
||||||
if (MSRLE32_hModule == 0)
|
DisableThreadLibraryCalls(hModule);
|
||||||
MSRLE32_hModule = hModule;
|
MSRLE32_hModule = hModule;
|
||||||
break;
|
|
||||||
case DLL_THREAD_ATTACH:
|
|
||||||
break;
|
|
||||||
case DLL_THREAD_DETACH:
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DLL_PROCESS_DETACH:
|
case DLL_PROCESS_DETACH:
|
||||||
break;
|
break;
|
||||||
};
|
};
|
||||||
|
|
|
@ -110,6 +110,7 @@ BOOL WINAPI DllMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
|
||||||
|
|
||||||
switch (fdwReason) {
|
switch (fdwReason) {
|
||||||
case DLL_PROCESS_ATTACH:
|
case DLL_PROCESS_ATTACH:
|
||||||
|
DisableThreadLibraryCalls(hinstDLL);
|
||||||
NETAPI32_hModule = hinstDLL;
|
NETAPI32_hModule = hinstDLL;
|
||||||
break;
|
break;
|
||||||
case DLL_PROCESS_DETACH:
|
case DLL_PROCESS_DETACH:
|
||||||
|
|
|
@ -3,6 +3,7 @@ TOPOBJDIR = ../..
|
||||||
SRCDIR = @srcdir@
|
SRCDIR = @srcdir@
|
||||||
VPATH = @srcdir@
|
VPATH = @srcdir@
|
||||||
MODULE = odbc32.dll
|
MODULE = odbc32.dll
|
||||||
|
IMPORTS = kernel32
|
||||||
|
|
||||||
LDDLLFLAGS = @LDDLLFLAGS@
|
LDDLLFLAGS = @LDDLLFLAGS@
|
||||||
SYMBOLFILE = $(MODULE).tmp.o
|
SYMBOLFILE = $(MODULE).tmp.o
|
||||||
|
|
|
@ -176,6 +176,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
|
||||||
if (fdwReason == DLL_PROCESS_ATTACH)
|
if (fdwReason == DLL_PROCESS_ATTACH)
|
||||||
{
|
{
|
||||||
TRACE("Loading ODBC...\n");
|
TRACE("Loading ODBC...\n");
|
||||||
|
DisableThreadLibraryCalls(hinstDLL);
|
||||||
if (ODBC_LoadDriverManager())
|
if (ODBC_LoadDriverManager())
|
||||||
ODBC_LoadDMFunctions();
|
ODBC_LoadDMFunctions();
|
||||||
}
|
}
|
||||||
|
|
|
@ -97,6 +97,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
|
||||||
|
|
||||||
switch(fdwReason) {
|
switch(fdwReason) {
|
||||||
case DLL_PROCESS_ATTACH:
|
case DLL_PROCESS_ATTACH:
|
||||||
|
DisableThreadLibraryCalls(hinstDLL);
|
||||||
OLE32_hInstance = hinstDLL;
|
OLE32_hInstance = hinstDLL;
|
||||||
COMPOBJ_InitProcess();
|
COMPOBJ_InitProcess();
|
||||||
if (TRACE_ON(ole)) CoRegisterMallocSpy((LPVOID)-1);
|
if (TRACE_ON(ole)) CoRegisterMallocSpy((LPVOID)-1);
|
||||||
|
|
|
@ -683,6 +683,7 @@ BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved )
|
||||||
switch(reason)
|
switch(reason)
|
||||||
{
|
{
|
||||||
case DLL_PROCESS_ATTACH:
|
case DLL_PROCESS_ATTACH:
|
||||||
|
DisableThreadLibraryCalls(hinst);
|
||||||
return process_attach();
|
return process_attach();
|
||||||
case DLL_PROCESS_DETACH:
|
case DLL_PROCESS_DETACH:
|
||||||
process_detach();
|
process_detach();
|
||||||
|
|
|
@ -34,6 +34,7 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
|
||||||
{
|
{
|
||||||
switch(fdwReason) {
|
switch(fdwReason) {
|
||||||
case DLL_PROCESS_ATTACH:
|
case DLL_PROCESS_ATTACH:
|
||||||
|
DisableThreadLibraryCalls(hInstDLL);
|
||||||
break;
|
break;
|
||||||
case DLL_PROCESS_DETACH:
|
case DLL_PROCESS_DETACH:
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -71,6 +71,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
|
||||||
switch (fdwReason)
|
switch (fdwReason)
|
||||||
{
|
{
|
||||||
case DLL_PROCESS_ATTACH:
|
case DLL_PROCESS_ATTACH:
|
||||||
|
DisableThreadLibraryCalls(hinstDLL);
|
||||||
/* create private heap */
|
/* create private heap */
|
||||||
RICHED32_hHeap = HeapCreate (0, 0x10000, 0);
|
RICHED32_hHeap = HeapCreate (0, 0x10000, 0);
|
||||||
/* register the Rich Edit class */
|
/* register the Rich Edit class */
|
||||||
|
|
|
@ -167,6 +167,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
|
||||||
{
|
{
|
||||||
switch (fdwReason) {
|
switch (fdwReason) {
|
||||||
case DLL_PROCESS_ATTACH:
|
case DLL_PROCESS_ATTACH:
|
||||||
|
DisableThreadLibraryCalls(hinstDLL);
|
||||||
master_mutex = CreateMutexA( NULL, FALSE, RPCSS_MASTER_MUTEX_NAME);
|
master_mutex = CreateMutexA( NULL, FALSE, RPCSS_MASTER_MUTEX_NAME);
|
||||||
if (!master_mutex)
|
if (!master_mutex)
|
||||||
ERR("Failed to create master mutex\n");
|
ERR("Failed to create master mutex\n");
|
||||||
|
|
|
@ -65,6 +65,7 @@ BOOL WINAPI DllMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
|
||||||
|
|
||||||
switch (fdwReason) {
|
switch (fdwReason) {
|
||||||
case DLL_PROCESS_ATTACH:
|
case DLL_PROCESS_ATTACH:
|
||||||
|
DisableThreadLibraryCalls(hinstDLL);
|
||||||
SERIALUI_hModule = hinstDLL;
|
SERIALUI_hModule = hinstDLL;
|
||||||
break;
|
break;
|
||||||
case DLL_PROCESS_DETACH:
|
case DLL_PROCESS_DETACH:
|
||||||
|
|
|
@ -65,6 +65,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
|
||||||
switch (fdwReason)
|
switch (fdwReason)
|
||||||
{
|
{
|
||||||
case DLL_PROCESS_ATTACH:
|
case DLL_PROCESS_ATTACH:
|
||||||
|
DisableThreadLibraryCalls(hinstDLL);
|
||||||
shlwapi_hInstance = hinstDLL;
|
shlwapi_hInstance = hinstDLL;
|
||||||
SHLWAPI_ThreadRef_index = TlsAlloc();
|
SHLWAPI_ThreadRef_index = TlsAlloc();
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -3,6 +3,7 @@ TOPOBJDIR = ../..
|
||||||
SRCDIR = @srcdir@
|
SRCDIR = @srcdir@
|
||||||
VPATH = @srcdir@
|
VPATH = @srcdir@
|
||||||
MODULE = snmpapi.dll
|
MODULE = snmpapi.dll
|
||||||
|
IMPORTS = kernel32
|
||||||
|
|
||||||
LDDLLFLAGS = @LDDLLFLAGS@
|
LDDLLFLAGS = @LDDLLFLAGS@
|
||||||
SYMBOLFILE = $(MODULE).tmp.o
|
SYMBOLFILE = $(MODULE).tmp.o
|
||||||
|
|
|
@ -20,8 +20,7 @@
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
#include "windef.h"
|
#include "winbase.h"
|
||||||
|
|
||||||
#include "wine/debug.h"
|
#include "wine/debug.h"
|
||||||
|
|
||||||
WINE_DEFAULT_DEBUG_CHANNEL(snmpapi);
|
WINE_DEFAULT_DEBUG_CHANNEL(snmpapi);
|
||||||
|
@ -38,13 +37,10 @@ BOOL WINAPI DllMain(
|
||||||
|
|
||||||
switch(fdwReason) {
|
switch(fdwReason) {
|
||||||
case DLL_PROCESS_ATTACH:
|
case DLL_PROCESS_ATTACH:
|
||||||
|
DisableThreadLibraryCalls(hInstDLL);
|
||||||
break;
|
break;
|
||||||
case DLL_PROCESS_DETACH:
|
case DLL_PROCESS_DETACH:
|
||||||
break;
|
break;
|
||||||
case DLL_THREAD_ATTACH:
|
|
||||||
break;
|
|
||||||
case DLL_THREAD_DETACH:
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
|
@ -76,6 +76,7 @@ BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved )
|
||||||
switch(reason)
|
switch(reason)
|
||||||
{
|
{
|
||||||
case DLL_PROCESS_ATTACH:
|
case DLL_PROCESS_ATTACH:
|
||||||
|
DisableThreadLibraryCalls(hinst);
|
||||||
process_attach();
|
process_attach();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -33,15 +33,10 @@ BOOL WINAPI DllMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
|
||||||
switch (fdwReason)
|
switch (fdwReason)
|
||||||
{
|
{
|
||||||
case DLL_PROCESS_ATTACH:
|
case DLL_PROCESS_ATTACH:
|
||||||
|
DisableThreadLibraryCalls(hinstDLL);
|
||||||
DSM_currentState = 2;
|
DSM_currentState = 2;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DLL_THREAD_ATTACH:
|
|
||||||
break;
|
|
||||||
|
|
||||||
case DLL_THREAD_DETACH:
|
|
||||||
break;
|
|
||||||
|
|
||||||
case DLL_PROCESS_DETACH:
|
case DLL_PROCESS_DETACH:
|
||||||
DSM_currentState = 1;
|
DSM_currentState = 1;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "windef.h"
|
#include "winbase.h"
|
||||||
#include "winerror.h"
|
#include "winerror.h"
|
||||||
#include "wtypes.h"
|
#include "wtypes.h"
|
||||||
|
|
||||||
|
@ -39,6 +39,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
|
||||||
|
|
||||||
switch(fdwReason) {
|
switch(fdwReason) {
|
||||||
case DLL_PROCESS_ATTACH:
|
case DLL_PROCESS_ATTACH:
|
||||||
|
DisableThreadLibraryCalls(hinstDLL);
|
||||||
URLMON_hInstance = hinstDLL;
|
URLMON_hInstance = hinstDLL;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -62,14 +62,12 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID fImpLoad)
|
||||||
switch( fdwReason )
|
switch( fdwReason )
|
||||||
{
|
{
|
||||||
case DLL_PROCESS_ATTACH:
|
case DLL_PROCESS_ATTACH:
|
||||||
|
DisableThreadLibraryCalls(hInstDLL);
|
||||||
SCSI_Init();
|
SCSI_Init();
|
||||||
break;
|
break;
|
||||||
case DLL_PROCESS_DETACH:
|
case DLL_PROCESS_DETACH:
|
||||||
DeleteCriticalSection( &ASPI_CritSection );
|
DeleteCriticalSection( &ASPI_CritSection );
|
||||||
break;
|
break;
|
||||||
case DLL_THREAD_ATTACH:
|
|
||||||
case DLL_THREAD_DETACH:
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
#endif /* defined(linux) */
|
#endif /* defined(linux) */
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
|
@ -688,6 +688,7 @@ BOOL WINAPI DllMain( HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved )
|
||||||
|
|
||||||
if (fdwReason == DLL_PROCESS_ATTACH)
|
if (fdwReason == DLL_PROCESS_ATTACH)
|
||||||
{
|
{
|
||||||
|
DisableThreadLibraryCalls(hinstDLL);
|
||||||
DOSVM_InitSegments();
|
DOSVM_InitSegments();
|
||||||
|
|
||||||
event_notifier = CreateEventA(NULL, FALSE, FALSE, NULL);
|
event_notifier = CreateEventA(NULL, FALSE, FALSE, NULL);
|
||||||
|
|
|
@ -121,6 +121,7 @@ BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved )
|
||||||
switch(reason) {
|
switch(reason) {
|
||||||
|
|
||||||
case DLL_PROCESS_ATTACH:
|
case DLL_PROCESS_ATTACH:
|
||||||
|
DisableThreadLibraryCalls(hinst);
|
||||||
|
|
||||||
PSDRV_Heap = HeapCreate(0, 0x10000, 0);
|
PSDRV_Heap = HeapCreate(0, 0x10000, 0);
|
||||||
if (PSDRV_Heap == NULL)
|
if (PSDRV_Heap == NULL)
|
||||||
|
|
|
@ -122,6 +122,7 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID fImpLoad)
|
||||||
{
|
{
|
||||||
switch (fdwReason) {
|
switch (fdwReason) {
|
||||||
case DLL_PROCESS_ATTACH:
|
case DLL_PROCESS_ATTACH:
|
||||||
|
DisableThreadLibraryCalls(hInstDLL);
|
||||||
MCIAVI_hInstance = hInstDLL;
|
MCIAVI_hInstance = hInstDLL;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -125,6 +125,8 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID fImpLoad)
|
||||||
|
|
||||||
switch (fdwReason) {
|
switch (fdwReason) {
|
||||||
case DLL_PROCESS_ATTACH:
|
case DLL_PROCESS_ATTACH:
|
||||||
|
DisableThreadLibraryCalls(hInstDLL);
|
||||||
|
|
||||||
if (!WINMM_CreateIData(hInstDLL))
|
if (!WINMM_CreateIData(hInstDLL))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (!MCI_Init() || !MMDRV_Init()) {
|
if (!MCI_Init() || !MMDRV_Init()) {
|
||||||
|
@ -141,9 +143,6 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID fImpLoad)
|
||||||
|
|
||||||
WINMM_DeleteIData();
|
WINMM_DeleteIData();
|
||||||
break;
|
break;
|
||||||
case DLL_THREAD_ATTACH:
|
|
||||||
case DLL_THREAD_DETACH:
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -444,6 +444,7 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID fImpLoad)
|
||||||
TRACE("%p 0x%lx %p\n", hInstDLL, fdwReason, fImpLoad);
|
TRACE("%p 0x%lx %p\n", hInstDLL, fdwReason, fImpLoad);
|
||||||
switch (fdwReason) {
|
switch (fdwReason) {
|
||||||
case DLL_PROCESS_ATTACH:
|
case DLL_PROCESS_ATTACH:
|
||||||
|
DisableThreadLibraryCalls(hInstDLL);
|
||||||
opentype_tls_index = TlsAlloc();
|
opentype_tls_index = TlsAlloc();
|
||||||
break;
|
break;
|
||||||
case DLL_PROCESS_DETACH:
|
case DLL_PROCESS_DETACH:
|
||||||
|
|
|
@ -41,6 +41,8 @@ BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD reason, LPVOID lpReserved)
|
||||||
{
|
{
|
||||||
case DLL_PROCESS_ATTACH: {
|
case DLL_PROCESS_ATTACH: {
|
||||||
extern void WINSPOOL_LoadSystemPrinters();
|
extern void WINSPOOL_LoadSystemPrinters();
|
||||||
|
|
||||||
|
DisableThreadLibraryCalls(hInstance);
|
||||||
WINSPOOL_LoadSystemPrinters();
|
WINSPOOL_LoadSystemPrinters();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue