From 5d82baf9747b7b133cad3be77c0cc9e24cc09582 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Fri, 30 Apr 2021 13:19:22 +0200 Subject: [PATCH] winecrt0: Add a default implementation DllRegisterServer()/DllUnregisterServer(). Signed-off-by: Alexandre Julliard --- dlls/activeds/activeds.spec | 4 +- dlls/adsldp/adsldp.c | 27 -------- dlls/amsi/amsi.spec | 4 +- dlls/amstream/main.c | 30 -------- dlls/atl/atl.c | 3 - dlls/atl/atl30.c | 18 ----- dlls/avifil32/factory.c | 16 ----- dlls/browseui/browseui_main.c | 16 ----- dlls/cdosys/main.c | 26 ------- dlls/comcat/Makefile.in | 5 -- dlls/comdlg32/cdlg32.c | 16 ----- dlls/comsvcs/main.c | 30 -------- dlls/credui/credui.spec | 4 +- dlls/cryptext/cryptext.spec | 4 +- dlls/cryptui/cryptui.spec | 4 +- dlls/d3dxof/main.c | 30 -------- dlls/ddraw/main.c | 10 --- dlls/ddrawex/main.c | 34 ---------- dlls/dhtmled.ocx/main.c | 21 ------ dlls/dinput/dinput_main.c | 16 ----- dlls/directmanipulation/directmanipulation.c | 28 -------- dlls/dmband/dmband_main.c | 32 --------- dlls/dmcompos/dmcompos_main.c | 37 ---------- dlls/dmime/dmime_main.c | 32 --------- dlls/dmloader/dmloader_main.c | 29 -------- dlls/dmscript/dmscript_main.c | 33 --------- dlls/dmstyle/dmstyle_main.c | 32 --------- dlls/dmsynth/dmsynth_main.c | 32 --------- dlls/dmusic/dmusic_main.c | 32 --------- dlls/dplayx/dplayx_main.c | 21 +----- dlls/dpnet/dpnet_main.c | 19 ------ dlls/dpnhpast/main.c | 24 ------- dlls/dpvoice/main.c | 29 -------- dlls/drmclien/Makefile.in | 5 +- dlls/drmclien/drmclien.spec | 6 +- dlls/drmclien/main.c | 37 ---------- dlls/dsdmo/main.c | 27 -------- dlls/dsound/dsound_main.c | 18 ----- dlls/dsquery/main.c | 36 ---------- dlls/dssenh/main.c | 32 --------- dlls/dsuiext/dsuiext.spec | 4 +- dlls/dswave/dswave_main.c | 32 --------- dlls/dx8vb/main.c | 27 -------- dlls/dxdiagn/dxdiag_main.c | 16 ----- dlls/evr/main.c | 12 ---- dlls/explorerframe/explorerframe_main.c | 16 ----- dlls/fntcache/fntcache.spec | 4 +- dlls/gameux/Makefile.in | 3 +- dlls/gameux/factory.c | 3 +- dlls/gameux/main.c | 68 ------------------- dlls/gpkcsp/Makefile.in | 5 +- dlls/gpkcsp/main.c | 44 ------------ dlls/hhctrl.ocx/hhctrl.c | 16 ----- dlls/hlink/hlink_main.c | 32 --------- dlls/hnetcfg/hnetcfg.c | 19 ------ dlls/ieframe/ieframe_main.c | 18 ----- dlls/inetcomm/inetcomm_main.c | 19 ------ dlls/infosoft/infosoft_main.c | 31 --------- dlls/initpki/Makefile.in | 5 +- dlls/initpki/main.c | 44 ------------ dlls/inkobj/inkobj.c | 18 ----- dlls/inseng/inseng_main.c | 30 -------- dlls/itircl/Makefile.in | 5 +- dlls/itircl/itircl_main.c | 46 ------------- dlls/itss/itss.c | 28 -------- dlls/jscript/jscript_main.c | 18 ----- dlls/jsproxy/main.c | 20 ------ dlls/ksproxy.ax/ksproxy.ax.spec | 4 +- dlls/mf/main.c | 30 -------- dlls/mfplay/mfplay.spec | 4 +- dlls/mfreadwrite/reader.c | 25 ------- dlls/mmcndmgr/mmcndmgr.c | 25 ------- dlls/mmdevapi/main.c | 19 ------ dlls/msado15/main.c | 30 -------- dlls/msctf/msctf.c | 19 ------ dlls/msdrm/msdrm.spec | 4 +- dlls/msi/msi_main.c | 16 ----- dlls/msident/msident.c | 38 ----------- dlls/msimtf/main.c | 33 --------- dlls/msisip/msisip.spec | 4 +- dlls/msisys.ocx/msisys.c | 20 ------ dlls/msscript.ocx/msscript.c | 21 ------ dlls/mssign32/mssign32.spec | 4 +- dlls/mssip32/Makefile.in | 5 +- dlls/mssip32/main.c | 43 ------------ dlls/mstask/mstask_main.c | 26 ------- dlls/msxml/Makefile.in | 4 -- dlls/msxml/main.c | 55 --------------- dlls/msxml2/Makefile.in | 4 -- dlls/msxml2/main.c | 55 --------------- dlls/msxml3/main.c | 16 ----- dlls/msxml4/Makefile.in | 6 -- dlls/msxml4/main.c | 55 --------------- dlls/msxml6/Makefile.in | 6 -- dlls/msxml6/main.c | 55 --------------- dlls/netcfgx/main.c | 30 -------- dlls/netprofm/main.c | 30 -------- dlls/objsel/objsel.c | 35 ---------- dlls/oledb32/main.c | 16 ----- dlls/olepro32/olepro32stubs.c | 18 ----- dlls/opcservices/factory.c | 25 ------- dlls/packager/packager_main.c | 26 ------- .../photometadatahandler.spec | 4 +- dlls/prntvpt/prntvpt.spec | 4 +- dlls/propsys/propsys_main.c | 27 -------- dlls/pstorec/pstorec.c | 12 ---- dlls/qasf/qasf_main.c | 13 ---- dlls/qdvd/qdvd_main.c | 22 ------ dlls/qmgr/Makefile.in | 1 - dlls/qmgr/qmgr_main.c | 67 ------------------ dlls/query/query.spec | 2 +- dlls/query/query_main.c | 6 -- dlls/rpcrt4/rpcrt4_main.c | 10 --- dlls/rsaenh/rsaenh.c | 19 ------ dlls/sapi/main.c | 30 -------- dlls/sccbase/Makefile.in | 5 +- dlls/sccbase/main.c | 43 ------------ dlls/scrobj/scrobj.c | 18 ----- dlls/scrrun/scrrun.c | 21 ------ dlls/shdocvw/shdocvw_main.c | 18 ----- dlls/slbcsp/Makefile.in | 5 +- dlls/slbcsp/main.c | 43 ------------ dlls/taskschd/taskschd.c | 33 --------- dlls/uianimation/main.c | 32 --------- dlls/uiautomationcore/uiautomationcore.spec | 4 +- dlls/uiribbon/main.c | 27 -------- dlls/vbscript/vbscript_main.c | 18 ----- dlls/wbemdisp/main.c | 31 --------- dlls/wbemprox/main.c | 16 ----- dlls/wiaservc/Makefile.in | 3 +- dlls/wiaservc/wiaservc_main.c | 67 ------------------ dlls/winecrt0/Makefile.in | 1 + .../comcat_main.c => winecrt0/dll_register.c} | 29 +++++--- dlls/winhttp/main.c | 16 ----- dlls/wmiutils/main.c | 30 -------- dlls/wmp/wmp_main.c | 18 ----- dlls/wmphoto/main.c | 10 --- dlls/wmvcore/wmvcore_main.c | 7 -- dlls/wpc/wpc.c | 37 ---------- dlls/wshom.ocx/wshom_main.c | 23 +------ dlls/wuapi/main.c | 30 -------- dlls/wuaueng/wuaueng.spec | 6 +- dlls/xactengine3_7/xact_dll.c | 13 ---- dlls/xaudio2_7/x3daudio.c | 15 ---- dlls/xaudio2_7/xapofx.c | 15 ---- dlls/xaudio2_7/xaudio_dll.c | 15 ---- include/objbase.h | 7 -- include/olectl.h | 5 +- 148 files changed, 71 insertions(+), 3055 deletions(-) delete mode 100644 dlls/drmclien/main.c delete mode 100644 dlls/gameux/main.c delete mode 100644 dlls/gpkcsp/main.c delete mode 100644 dlls/initpki/main.c delete mode 100644 dlls/itircl/itircl_main.c delete mode 100644 dlls/mssip32/main.c delete mode 100644 dlls/msxml/main.c delete mode 100644 dlls/msxml2/main.c delete mode 100644 dlls/msxml4/main.c delete mode 100644 dlls/msxml6/main.c delete mode 100644 dlls/qmgr/qmgr_main.c delete mode 100644 dlls/sccbase/main.c delete mode 100644 dlls/slbcsp/main.c delete mode 100644 dlls/wiaservc/wiaservc_main.c rename dlls/{comcat/comcat_main.c => winecrt0/dll_register.c} (61%) diff --git a/dlls/activeds/activeds.spec b/dlls/activeds/activeds.spec index 641571d7aa2..59921bf7b81 100644 --- a/dlls/activeds/activeds.spec +++ b/dlls/activeds/activeds.spec @@ -24,5 +24,5 @@ 28 stub ConvertSecurityDescriptorToSecDes @ stdcall -private DllCanUnloadNow() @ stdcall -private DllGetClassObject(ptr ptr ptr) -#@ stub DllRegisterServer -#@ stub DllUnregisterServer +@ stdcall -private DllRegisterServer() +@ stdcall -private DllUnregisterServer() diff --git a/dlls/adsldp/adsldp.c b/dlls/adsldp/adsldp.c index 0efaee024ea..701f27cd969 100644 --- a/dlls/adsldp/adsldp.c +++ b/dlls/adsldp/adsldp.c @@ -53,8 +53,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(adsldp); DEFINE_GUID(CLSID_LDAP,0x228d9a81,0xc302,0x11cf,0x9a,0xa4,0x00,0xaa,0x00,0x4a,0x56,0x91); DEFINE_GUID(CLSID_LDAPNamespace,0x228d9a82,0xc302,0x11cf,0x9a,0xa4,0x00,0xaa,0x00,0x4a,0x56,0x91); -static HMODULE adsldp_hinst; - static HRESULT LDAPNamespace_create(REFIID riid, void **obj); typedef struct @@ -2114,28 +2112,3 @@ HRESULT WINAPI DllGetClassObject(REFCLSID clsid, REFIID iid, LPVOID *obj) FIXME("class %s/%s is not implemented\n", debugstr_guid(clsid), debugstr_guid(iid)); return CLASS_E_CLASSNOTAVAILABLE; } - -HRESULT WINAPI DllRegisterServer(void) -{ - return __wine_register_resources(adsldp_hinst); -} - -HRESULT WINAPI DllUnregisterServer(void) -{ - return __wine_unregister_resources(adsldp_hinst); -} - -BOOL WINAPI DllMain(HINSTANCE hinst, DWORD reason, void *reserved) -{ - TRACE("%p,%u,%p\n", hinst, reason, reserved); - - switch (reason) - { - case DLL_PROCESS_ATTACH: - adsldp_hinst = hinst; - DisableThreadLibraryCalls(hinst); - break; - } - - return TRUE; -} diff --git a/dlls/amsi/amsi.spec b/dlls/amsi/amsi.spec index f650ba94f12..3cbf1c6d121 100644 --- a/dlls/amsi/amsi.spec +++ b/dlls/amsi/amsi.spec @@ -9,5 +9,5 @@ @ stdcall AmsiUninitialize(ptr) @ stdcall -private DllCanUnloadNow() @ stub DllGetClassObject -@ stub DllRegisterServer -@ stub DllUnregisterServer +@ stdcall -private DllRegisterServer() +@ stdcall -private DllUnregisterServer() diff --git a/dlls/amstream/main.c b/dlls/amstream/main.c index 960e7a38040..c2c76069ea2 100644 --- a/dlls/amstream/main.c +++ b/dlls/amstream/main.c @@ -37,20 +37,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(amstream); -static HINSTANCE instance; - -/* For the moment, do nothing here. */ -BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv) -{ - switch(fdwReason) { - case DLL_PROCESS_ATTACH: - instance = hInstDLL; - DisableThreadLibraryCalls(hInstDLL); - break; - } - return TRUE; -} - /****************************************************************************** * Multimedia Streams ClassFactory */ @@ -198,19 +184,3 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) *ppv = &factory->IClassFactory_iface; return S_OK; } - -/*********************************************************************** - * DllRegisterServer (AMSTREAM.@) - */ -HRESULT WINAPI DllRegisterServer(void) -{ - return __wine_register_resources( instance ); -} - -/*********************************************************************** - * DllUnregisterServer (AMSTREAM.@) - */ -HRESULT WINAPI DllUnregisterServer(void) -{ - return __wine_unregister_resources( instance ); -} diff --git a/dlls/atl/atl.c b/dlls/atl/atl.c index 7529425b7ee..47a14eb2b85 100644 --- a/dlls/atl/atl.c +++ b/dlls/atl/atl.c @@ -29,8 +29,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(atl); #define ATLVer1Size FIELD_OFFSET(_ATL_MODULEW, dwAtlBuildVer) -HINSTANCE atl_instance; - typedef unsigned char cpp_bool; static ICatRegister *catreg; @@ -970,7 +968,6 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) switch(fdwReason) { case DLL_PROCESS_ATTACH: - atl_instance = hinstDLL; DisableThreadLibraryCalls(hinstDLL); break; case DLL_PROCESS_DETACH: diff --git a/dlls/atl/atl30.c b/dlls/atl/atl30.c index b7625bba7c7..f5d271fdc50 100644 --- a/dlls/atl/atl30.c +++ b/dlls/atl/atl30.c @@ -32,8 +32,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(atl); -extern HINSTANCE atl_instance; - #define ATLVer1Size FIELD_OFFSET(_ATL_MODULEW, dwAtlBuildVer) HRESULT WINAPI AtlModuleInit(_ATL_MODULEW* pM, _ATL_OBJMAP_ENTRYW* p, HINSTANCE h) @@ -528,19 +526,3 @@ HRESULT WINAPI DllGetClassObject(REFCLSID clsid, REFIID riid, LPVOID *ppvObject) FIXME("Not supported class %s\n", debugstr_guid(clsid)); return CLASS_E_CLASSNOTAVAILABLE; } - -/*********************************************************************** - * DllRegisterServer (ATL.@) - */ -HRESULT WINAPI DllRegisterServer(void) -{ - return __wine_register_resources( atl_instance ); -} - -/*********************************************************************** - * DllUnRegisterServer (ATL.@) - */ -HRESULT WINAPI DllUnregisterServer(void) -{ - return __wine_unregister_resources( atl_instance ); -} diff --git a/dlls/avifil32/factory.c b/dlls/avifil32/factory.c index 276ab1dc41f..820c882eaac 100644 --- a/dlls/avifil32/factory.c +++ b/dlls/avifil32/factory.c @@ -207,19 +207,3 @@ BOOL WINAPI DllMain(HINSTANCE hInstDll, DWORD fdwReason, LPVOID lpvReserved) return TRUE; } - -/*********************************************************************** - * DllRegisterServer (AVIFIL32.@) - */ -HRESULT WINAPI DllRegisterServer(void) -{ - return __wine_register_resources( AVIFILE_hModule ); -} - -/*********************************************************************** - * DllUnregisterServer (AVIFIL32.@) - */ -HRESULT WINAPI DllUnregisterServer(void) -{ - return __wine_unregister_resources( AVIFILE_hModule ); -} diff --git a/dlls/browseui/browseui_main.c b/dlls/browseui/browseui_main.c index 97f400d949e..d2c5ecf3622 100644 --- a/dlls/browseui/browseui_main.c +++ b/dlls/browseui/browseui_main.c @@ -237,19 +237,3 @@ HRESULT WINAPI DllInstall(BOOL bInstall, LPCWSTR cmdline) FIXME("(%s, %s): stub\n", bInstall ? "TRUE" : "FALSE", debugstr_w(cmdline)); return S_OK; } - -/*********************************************************************** - * DllRegisterServer (BROWSEUI.@) - */ -HRESULT WINAPI DllRegisterServer(void) -{ - return __wine_register_resources( BROWSEUI_hinstance ); -} - -/*********************************************************************** - * DllUnregisterServer (BROWSEUI.@) - */ -HRESULT WINAPI DllUnregisterServer(void) -{ - return __wine_unregister_resources( BROWSEUI_hinstance ); -} diff --git a/dlls/cdosys/main.c b/dlls/cdosys/main.c index 3bae7759dec..ab5c3ff998a 100644 --- a/dlls/cdosys/main.c +++ b/dlls/cdosys/main.c @@ -33,35 +33,9 @@ WINE_DEFAULT_DEBUG_CHANNEL(cdosys); -static HINSTANCE instance; - -BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD reason, LPVOID lpv) -{ - TRACE("(%p, %d, %p)\n", hInstDLL, reason, lpv); - - switch (reason) - { - case DLL_PROCESS_ATTACH: - instance = hInstDLL; - DisableThreadLibraryCalls(hInstDLL); - break; - } - return TRUE; -} - HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, void **obj) { FIXME("(%s, %s, %p) stub!\n", debugstr_guid(rclsid), debugstr_guid(riid), obj); return CLASS_E_CLASSNOTAVAILABLE; } - -HRESULT WINAPI DllRegisterServer(void) -{ - return __wine_register_resources( instance ); -} - -HRESULT WINAPI DllUnregisterServer(void) -{ - return __wine_unregister_resources( instance ); -} diff --git a/dlls/comcat/Makefile.in b/dlls/comcat/Makefile.in index 42061a13c9f..4e954f7d799 100644 --- a/dlls/comcat/Makefile.in +++ b/dlls/comcat/Makefile.in @@ -1,10 +1,5 @@ MODULE = comcat.dll IMPORTS = ole32 -EXTRADLLFLAGS = -mno-cygwin - -C_SRCS = \ - comcat_main.c - RC_SRCS = \ version.rc diff --git a/dlls/comdlg32/cdlg32.c b/dlls/comdlg32/cdlg32.c index 9997094ff03..c63d201d526 100644 --- a/dlls/comdlg32/cdlg32.c +++ b/dlls/comdlg32/cdlg32.c @@ -247,19 +247,3 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, void **ppv) return CLASS_E_CLASSNOTAVAILABLE; } - -/*********************************************************************** - * DllRegisterServer (COMMDLG32.@) - */ -HRESULT WINAPI DllRegisterServer(void) -{ - return __wine_register_resources(COMDLG32_hInstance); -} - -/*********************************************************************** - * DllUnregisterServer (COMMDLG32.@) - */ -HRESULT WINAPI DllUnregisterServer(void) -{ - return __wine_unregister_resources(COMDLG32_hInstance); -} diff --git a/dlls/comsvcs/main.c b/dlls/comsvcs/main.c index 35acfca8ab1..c95e8dad8f0 100644 --- a/dlls/comsvcs/main.c +++ b/dlls/comsvcs/main.c @@ -34,8 +34,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(comsvcs); -static HINSTANCE COMSVCS_hInstance; - typedef struct dispensermanager { IDispenserManager IDispenserManager_iface; @@ -356,18 +354,6 @@ static HRESULT WINAPI dispenser_manager_cf_CreateInstance(IClassFactory *iface, return ret; } -BOOL WINAPI DllMain(HINSTANCE hinst, DWORD reason, LPVOID lpv) -{ - switch(reason) - { - case DLL_PROCESS_ATTACH: - COMSVCS_hInstance = hinst; - DisableThreadLibraryCalls(hinst); - break; - } - return TRUE; -} - static HRESULT WINAPI comsvcscf_QueryInterface(IClassFactory *iface, REFIID riid, void **ppv ) { *ppv = NULL; @@ -1031,19 +1017,3 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, void **ppv) FIXME("%s %s %p\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv); return CLASS_E_CLASSNOTAVAILABLE; } - -/*********************************************************************** - * DllRegisterServer (comsvcs.@) - */ -HRESULT WINAPI DllRegisterServer(void) -{ - return __wine_register_resources( COMSVCS_hInstance ); -} - -/*********************************************************************** - * DllUnregisterServer (comsvcs.@) - */ -HRESULT WINAPI DllUnregisterServer(void) -{ - return __wine_unregister_resources( COMSVCS_hInstance ); -} diff --git a/dlls/credui/credui.spec b/dlls/credui/credui.spec index ed3e6435fa0..474d2ee7b52 100644 --- a/dlls/credui/credui.spec +++ b/dlls/credui/credui.spec @@ -16,6 +16,6 @@ @ stdcall CredUnPackAuthenticationBufferW(long ptr long ptr ptr ptr ptr ptr ptr) @ stdcall -private DllCanUnloadNow() @ stub DllGetClassObject -@ stub DllRegisterServer -@ stub DllUnregisterServer +@ stdcall -private DllRegisterServer() +@ stdcall -private DllUnregisterServer() @ stdcall SspiPromptForCredentialsW(wstr ptr long wstr ptr ptr ptr long) diff --git a/dlls/cryptext/cryptext.spec b/dlls/cryptext/cryptext.spec index d5aaef0f9a6..ee3e155f457 100644 --- a/dlls/cryptext/cryptext.spec +++ b/dlls/cryptext/cryptext.spec @@ -26,5 +26,5 @@ @ stub CryptExtOpenSTRW @ stdcall -private DllCanUnloadNow() @ stub DllGetClassObject -@ stub DllRegisterServer -@ stub DllUnregisterServer +@ stdcall -private DllRegisterServer() +@ stdcall -private DllUnregisterServer() diff --git a/dlls/cryptui/cryptui.spec b/dlls/cryptui/cryptui.spec index dfdc5a48f10..173451a45aa 100644 --- a/dlls/cryptui/cryptui.spec +++ b/dlls/cryptui/cryptui.spec @@ -37,8 +37,8 @@ 37 stdcall CryptUIWizImport(long ptr wstr ptr ptr) 38 stub CryptUIWizQueryCertRequestNoDS 39 stub CryptUIWizSubmitCertRequestNoDS -40 stub DllRegisterServer -41 stub DllUnregisterServer +40 stdcall -private DllRegisterServer() +41 stdcall -private DllUnregisterServer() 42 stub EnrollmentCOMObjectFactory_getInstance 43 stub I_CryptUIProtect 44 stub I_CryptUIProtectFailure diff --git a/dlls/d3dxof/main.c b/dlls/d3dxof/main.c index 83ad62de9e3..080545c4387 100644 --- a/dlls/d3dxof/main.c +++ b/dlls/d3dxof/main.c @@ -40,20 +40,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3dxof); -static HINSTANCE instance; - -/* For the moment, do nothing here. */ -BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv) -{ - switch(fdwReason) { - case DLL_PROCESS_ATTACH: - instance = hInstDLL; - DisableThreadLibraryCalls(hInstDLL); - break; - } - return TRUE; -} - /****************************************************************************** * DirectX File ClassFactory */ @@ -218,19 +204,3 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) *ppv = &(factory->IClassFactory_iface); return S_OK; } - -/*********************************************************************** - * DllRegisterServer (D3DXOF.@) - */ -HRESULT WINAPI DllRegisterServer(void) -{ - return __wine_register_resources( instance ); -} - -/*********************************************************************** - * DllUnregisterServer (D3DXOF.@) - */ -HRESULT WINAPI DllUnregisterServer(void) -{ - return __wine_unregister_resources( instance ); -} diff --git a/dlls/ddraw/main.c b/dlls/ddraw/main.c index c4a7223a0a9..b75676a6941 100644 --- a/dlls/ddraw/main.c +++ b/dlls/ddraw/main.c @@ -778,16 +778,6 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, void **out) } -HRESULT WINAPI DllRegisterServer(void) -{ - return __wine_register_resources( instance ); -} - -HRESULT WINAPI DllUnregisterServer(void) -{ - return __wine_unregister_resources( instance ); -} - /*********************************************************************** * DllMain (DDRAW.0) * diff --git a/dlls/ddrawex/main.c b/dlls/ddrawex/main.c index dc8d7b8190c..8ecc24f824c 100644 --- a/dlls/ddrawex/main.c +++ b/dlls/ddrawex/main.c @@ -34,8 +34,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(ddrawex); -static HINSTANCE instance; - struct ddrawex_class_factory { IClassFactory IClassFactory_iface; @@ -237,35 +235,3 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, void **out) return S_OK; } - - -/*********************************************************************** - * DllMain - */ -BOOL WINAPI DllMain(HINSTANCE inst, DWORD reason, void *reserved) -{ - switch (reason) - { - case DLL_PROCESS_ATTACH: - instance = inst; - DisableThreadLibraryCalls( inst ); - break; - } - return TRUE; -} - -/*********************************************************************** - * DllRegisterServer (DDRAWEX.@) - */ -HRESULT WINAPI DllRegisterServer(void) -{ - return __wine_register_resources( instance ); -} - -/*********************************************************************** - * DllUnregisterServer (DDRAWEX.@) - */ -HRESULT WINAPI DllUnregisterServer(void) -{ - return __wine_unregister_resources( instance ); -} diff --git a/dlls/dhtmled.ocx/main.c b/dlls/dhtmled.ocx/main.c index 5f8a56468f9..a0acd8b620b 100644 --- a/dlls/dhtmled.ocx/main.c +++ b/dlls/dhtmled.ocx/main.c @@ -96,8 +96,6 @@ static const IClassFactoryVtbl ClassFactoryVtbl = { ClassFactory_LockServer }; -static HINSTANCE dhtmled_instance; - /****************************************************************** * DllMain (dhtmled.ocx.@) */ @@ -109,7 +107,6 @@ BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, VOID *reserved) { case DLL_PROCESS_ATTACH: DisableThreadLibraryCalls(instance); - dhtmled_instance = instance; break; case DLL_PROCESS_DETACH: if (reserved) break; @@ -135,21 +132,3 @@ HRESULT WINAPI DllGetClassObject(REFCLSID clsid, REFIID iid, LPVOID *out) FIXME("no class for %s\n", debugstr_guid(clsid)); return CLASS_E_CLASSNOTAVAILABLE; } - -/*********************************************************************** - * DllRegisterServer (dhtmled.ocx.@) - */ -HRESULT WINAPI DllRegisterServer(void) -{ - TRACE("()\n"); - return __wine_register_resources(dhtmled_instance); -} - -/*********************************************************************** - * DllUnregisterServer (dhtmled.ocx.@) - */ -HRESULT WINAPI DllUnregisterServer(void) -{ - TRACE("()\n"); - return __wine_unregister_resources(dhtmled_instance); -} diff --git a/dlls/dinput/dinput_main.c b/dlls/dinput/dinput_main.c index 3877597675b..7301b66cb6d 100644 --- a/dlls/dinput/dinput_main.c +++ b/dlls/dinput/dinput_main.c @@ -1680,22 +1680,6 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) return CLASS_E_CLASSNOTAVAILABLE; } -/*********************************************************************** - * DllRegisterServer (DINPUT.@) - */ -HRESULT WINAPI DllRegisterServer(void) -{ - return __wine_register_resources( DINPUT_instance ); -} - -/*********************************************************************** - * DllUnregisterServer (DINPUT.@) - */ -HRESULT WINAPI DllUnregisterServer(void) -{ - return __wine_unregister_resources( DINPUT_instance ); -} - /****************************************************************************** * DInput hook thread */ diff --git a/dlls/directmanipulation/directmanipulation.c b/dlls/directmanipulation/directmanipulation.c index b79242b593e..28fe52ac0fc 100644 --- a/dlls/directmanipulation/directmanipulation.c +++ b/dlls/directmanipulation/directmanipulation.c @@ -30,34 +30,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(manipulation); -static HINSTANCE dm_instance; - -BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, void *reserved) -{ - TRACE("(%p, %u, %p)\n", instance, reason, reserved); - - switch (reason) - { - case DLL_PROCESS_ATTACH: - dm_instance = instance; - DisableThreadLibraryCalls(instance); - break; - } - - return TRUE; -} - -HRESULT WINAPI DllRegisterServer(void) -{ - return __wine_register_resources( dm_instance ); -} - -HRESULT WINAPI DllUnregisterServer(void) -{ - return __wine_unregister_resources( dm_instance ); -} - - struct directmanipulation { IDirectManipulationManager2 IDirectManipulationManager2_iface; diff --git a/dlls/dmband/dmband_main.c b/dlls/dmband/dmband_main.c index baf36a3d6a9..93553c88ca1 100644 --- a/dlls/dmband/dmband_main.c +++ b/dlls/dmband/dmband_main.c @@ -23,7 +23,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(dmband); -static HINSTANCE instance; LONG DMBAND_refCount = 0; typedef struct { @@ -111,21 +110,6 @@ static const IClassFactoryVtbl classfactory_vtbl = { static IClassFactoryImpl Band_CF = {{&classfactory_vtbl}, create_dmband}; static IClassFactoryImpl BandTrack_CF = {{&classfactory_vtbl}, create_dmbandtrack}; -/****************************************************************** - * DllMain - * - * - */ -BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { - if (fdwReason == DLL_PROCESS_ATTACH) { - instance = hinstDLL; - DisableThreadLibraryCalls(hinstDLL); - } - - return TRUE; -} - - /****************************************************************** * DllCanUnloadNow (DMBAND.@) * @@ -154,19 +138,3 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) WARN("(%s, %s, %p): no interface found.\n", debugstr_dmguid(rclsid), debugstr_dmguid(riid), ppv); return CLASS_E_CLASSNOTAVAILABLE; } - -/*********************************************************************** - * DllRegisterServer (DMBAND.@) - */ -HRESULT WINAPI DllRegisterServer(void) -{ - return __wine_register_resources( instance ); -} - -/*********************************************************************** - * DllUnregisterServer (DMBAND.@) - */ -HRESULT WINAPI DllUnregisterServer(void) -{ - return __wine_unregister_resources( instance ); -} diff --git a/dlls/dmcompos/dmcompos_main.c b/dlls/dmcompos/dmcompos_main.c index b8b3c5d6d23..eee94a20f48 100644 --- a/dlls/dmcompos/dmcompos_main.c +++ b/dlls/dmcompos/dmcompos_main.c @@ -38,7 +38,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(dmcompos); -static HINSTANCE instance; LONG DMCOMPOS_refCount = 0; typedef struct { @@ -136,20 +135,6 @@ static IClassFactoryImpl ChordMapTrack_CF = {{&classfactory_vtbl}, create_dmchor static IClassFactoryImpl Template_CF = {{&classfactory_vtbl}, create_direct_music_template}; static IClassFactoryImpl SignPostTrack_CF = {{&classfactory_vtbl}, create_dmsignposttrack}; -/****************************************************************** - * DllMain - * - * - */ -BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { - if (fdwReason == DLL_PROCESS_ATTACH) { - instance = hinstDLL; - DisableThreadLibraryCalls(hinstDLL); - } - return TRUE; -} - - /****************************************************************** * DllCanUnloadNow (DMCOMPOS.@) * @@ -192,25 +177,3 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) { WARN("(%s, %s, %p): no interface found.\n", debugstr_dmguid(rclsid), debugstr_dmguid(riid), ppv); return CLASS_E_CLASSNOTAVAILABLE; } - -/*********************************************************************** - * DllRegisterServer (DMCOMPOS.@) - */ -HRESULT WINAPI DllRegisterServer(void) -{ - return __wine_register_resources( instance ); -} - -/*********************************************************************** - * DllUnregisterServer (DMCOMPOS.@) - */ -HRESULT WINAPI DllUnregisterServer(void) -{ - return __wine_unregister_resources( instance ); -} - -/****************************************************************** - * Helper functions - * - * - */ diff --git a/dlls/dmime/dmime_main.c b/dlls/dmime/dmime_main.c index 1749bbe69d6..0842517452c 100644 --- a/dlls/dmime/dmime_main.c +++ b/dlls/dmime/dmime_main.c @@ -38,7 +38,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(dmime); -static HINSTANCE instance; LONG DMIME_refCount = 0; typedef struct { @@ -137,21 +136,6 @@ static IClassFactoryImpl SegTriggerTrack_CF = {{&classfactory_vtbl}, create_dmse static IClassFactoryImpl AudioPath_CF = {{&classfactory_vtbl}, create_dmaudiopath}; static IClassFactoryImpl WaveTrack_CF = {{&classfactory_vtbl}, create_dmwavetrack}; -/****************************************************************** - * DllMain - * - * - */ -BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { - if (fdwReason == DLL_PROCESS_ATTACH) { - instance = hinstDLL; - DisableThreadLibraryCalls(hinstDLL); - } - - return TRUE; -} - - /****************************************************************** * DllCanUnloadNow (DMIME.1) * @@ -233,19 +217,3 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) WARN("(%s, %s, %p): no interface found.\n", debugstr_dmguid(rclsid), debugstr_dmguid(riid), ppv); return CLASS_E_CLASSNOTAVAILABLE; } - -/*********************************************************************** - * DllRegisterServer (DMIME.@) - */ -HRESULT WINAPI DllRegisterServer(void) -{ - return __wine_register_resources( instance ); -} - -/*********************************************************************** - * DllUnregisterServer (DMIME.@) - */ -HRESULT WINAPI DllUnregisterServer(void) -{ - return __wine_unregister_resources( instance ); -} diff --git a/dlls/dmloader/dmloader_main.c b/dlls/dmloader/dmloader_main.c index f02e523ab09..04e30fc791d 100644 --- a/dlls/dmloader/dmloader_main.c +++ b/dlls/dmloader/dmloader_main.c @@ -36,7 +36,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(dmloader); -static HINSTANCE instance; LONG module_ref = 0; typedef struct { @@ -124,18 +123,6 @@ static const IClassFactoryVtbl classfactory_vtbl = { static IClassFactoryImpl dm_loader_CF = {{&classfactory_vtbl}, create_dmloader}; static IClassFactoryImpl dm_container_CF = {{&classfactory_vtbl}, create_dmcontainer}; -/****************************************************************** - * DllMain - */ -BOOL WINAPI DllMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { - if (fdwReason == DLL_PROCESS_ATTACH) { - instance = hinstDLL; - DisableThreadLibraryCalls(hinstDLL); - } - return TRUE; -} - - /****************************************************************** * DllCanUnloadNow (DMLOADER.@) */ @@ -165,19 +152,3 @@ HRESULT WINAPI DllGetClassObject (REFCLSID rclsid, REFIID riid, LPVOID *ppv) WARN(": no class found\n"); return CLASS_E_CLASSNOTAVAILABLE; } - -/*********************************************************************** - * DllRegisterServer (DMLOADER.@) - */ -HRESULT WINAPI DllRegisterServer(void) -{ - return __wine_register_resources( instance ); -} - -/*********************************************************************** - * DllUnregisterServer (DMLOADER.@) - */ -HRESULT WINAPI DllUnregisterServer(void) -{ - return __wine_unregister_resources( instance ); -} diff --git a/dlls/dmscript/dmscript_main.c b/dlls/dmscript/dmscript_main.c index 163dd671858..7191129f96d 100644 --- a/dlls/dmscript/dmscript_main.c +++ b/dlls/dmscript/dmscript_main.c @@ -38,7 +38,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(dmscript); -static HINSTANCE instance; LONG DMSCRIPT_refCount = 0; typedef struct { @@ -141,21 +140,6 @@ static IClassFactoryImpl ScriptAutoImplAudioPath_CF = {{&classfactory_vtbl}, create_unimpl_instance}; static IClassFactoryImpl ScriptAutoImplSong_CF = {{&classfactory_vtbl}, create_unimpl_instance}; -/****************************************************************** - * DllMain - * - * - */ -BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { - if (fdwReason == DLL_PROCESS_ATTACH) { - instance = hinstDLL; - DisableThreadLibraryCalls(hinstDLL); - } - - return TRUE; -} - - /****************************************************************** * DllCanUnloadNow (DMSCRIPT.@) * @@ -220,20 +204,3 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) WARN("(%s, %s, %p): no interface found.\n", debugstr_dmguid(rclsid), debugstr_dmguid(riid), ppv); return CLASS_E_CLASSNOTAVAILABLE; } - - -/*********************************************************************** - * DllRegisterServer (DMSCRIPT.@) - */ -HRESULT WINAPI DllRegisterServer(void) -{ - return __wine_register_resources( instance ); -} - -/*********************************************************************** - * DllUnregisterServer (DMSCRIPT.@) - */ -HRESULT WINAPI DllUnregisterServer(void) -{ - return __wine_unregister_resources( instance ); -} diff --git a/dlls/dmstyle/dmstyle_main.c b/dlls/dmstyle/dmstyle_main.c index 60f7c3bfbf2..cdee2fefc10 100644 --- a/dlls/dmstyle/dmstyle_main.c +++ b/dlls/dmstyle/dmstyle_main.c @@ -37,7 +37,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(dmstyle); -static HINSTANCE instance; LONG DMSTYLE_refCount = 0; typedef struct { @@ -138,21 +137,6 @@ static IClassFactoryImpl MotifTrack_CF = {{&classfactory_vtbl}, create_dmmotiftr static IClassFactoryImpl AuditionTrack_CF = {{&classfactory_vtbl}, create_dmauditiontrack}; static IClassFactoryImpl MuteTrack_CF = {{&classfactory_vtbl}, create_dmmutetrack}; -/****************************************************************** - * DllMain - * - * - */ -BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { - if (fdwReason == DLL_PROCESS_ATTACH) { - instance = hinstDLL; - DisableThreadLibraryCalls(hinstDLL); - } - - return TRUE; -} - - /****************************************************************** * DllCanUnloadNow (DMSTYLE.1) * @@ -208,19 +192,3 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) { WARN("(%s, %s, %p): no interface found.\n", debugstr_dmguid(rclsid), debugstr_dmguid(riid), ppv); return CLASS_E_CLASSNOTAVAILABLE; } - -/*********************************************************************** - * DllRegisterServer (DMSTYLE.@) - */ -HRESULT WINAPI DllRegisterServer(void) -{ - return __wine_register_resources( instance ); -} - -/*********************************************************************** - * DllUnregisterServer (DMSTYLE.@) - */ -HRESULT WINAPI DllUnregisterServer(void) -{ - return __wine_unregister_resources( instance ); -} diff --git a/dlls/dmsynth/dmsynth_main.c b/dlls/dmsynth/dmsynth_main.c index d6718a27213..014eb0eb6f1 100644 --- a/dlls/dmsynth/dmsynth_main.c +++ b/dlls/dmsynth/dmsynth_main.c @@ -25,7 +25,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(dmsynth); -static HINSTANCE instance; LONG DMSYNTH_refCount = 0; typedef struct { @@ -112,21 +111,6 @@ static IClassFactoryImpl Synth_CF = {{&classfactory_vtbl}, DMUSIC_CreateDirectMu static IClassFactoryImpl SynthSink_CF = {{&classfactory_vtbl}, DMUSIC_CreateDirectMusicSynthSinkImpl}; -/****************************************************************** - * DllMain - * - * - */ -BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { - if (fdwReason == DLL_PROCESS_ATTACH) { - instance = hinstDLL; - DisableThreadLibraryCalls(hinstDLL); - } - - return TRUE; -} - - /****************************************************************** * DllCanUnloadNow (DMSYNTH.@) * @@ -161,22 +145,6 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) return CLASS_E_CLASSNOTAVAILABLE; } -/*********************************************************************** - * DllRegisterServer (DMSYNTH.@) - */ -HRESULT WINAPI DllRegisterServer(void) -{ - return __wine_register_resources( instance ); -} - -/*********************************************************************** - * DllUnregisterServer (DMSYNTH.@) - */ -HRESULT WINAPI DllUnregisterServer(void) -{ - return __wine_unregister_resources( instance ); -} - /****************************************************************** * Helper functions * diff --git a/dlls/dmusic/dmusic_main.c b/dlls/dmusic/dmusic_main.c index b7b1a8bc2d2..2446dc18852 100644 --- a/dlls/dmusic/dmusic_main.c +++ b/dlls/dmusic/dmusic_main.c @@ -39,7 +39,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(dmusic); -static HINSTANCE instance; LONG DMUSIC_refCount = 0; typedef struct { @@ -123,21 +122,6 @@ static IClassFactoryImpl DirectMusic_CF = {{&classfactory_vtbl}, DMUSIC_CreateDi static IClassFactoryImpl Collection_CF = {{&classfactory_vtbl}, DMUSIC_CreateDirectMusicCollectionImpl}; -/****************************************************************** - * DllMain - * - * - */ -BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { - if (fdwReason == DLL_PROCESS_ATTACH) { - instance = hinstDLL; - DisableThreadLibraryCalls(hinstDLL); - } - - return TRUE; -} - - /****************************************************************** * DllCanUnloadNow (DMUSIC.@) * @@ -171,22 +155,6 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) return CLASS_E_CLASSNOTAVAILABLE; } -/*********************************************************************** - * DllRegisterServer (DMUSIC.@) - */ -HRESULT WINAPI DllRegisterServer(void) -{ - return __wine_register_resources( instance ); -} - -/*********************************************************************** - * DllUnregisterServer (DMUSIC.@) - */ -HRESULT WINAPI DllUnregisterServer(void) -{ - return __wine_unregister_resources( instance ); -} - /****************************************************************** * Helper functions * diff --git a/dlls/dplayx/dplayx_main.c b/dlls/dplayx/dplayx_main.c index b1076ff2f64..768294c5e21 100644 --- a/dlls/dplayx/dplayx_main.c +++ b/dlls/dplayx/dplayx_main.c @@ -68,10 +68,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(dplay); -static HINSTANCE instance; - /* This is a globally exported variable at ordinal 6 of DPLAYX.DLL */ -DWORD gdwDPlaySPRefCount = 0; /* FIXME: Should it be initialized here? */ +DWORD gdwDPlaySPRefCount = 0; BOOL WINAPI DllMain( HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved ) @@ -82,7 +80,6 @@ BOOL WINAPI DllMain( HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved ) switch ( fdwReason ) { case DLL_PROCESS_ATTACH: - instance = hinstDLL; DisableThreadLibraryCalls(hinstDLL); /* First instance perform construction of global processor data */ return DPLAYX_ConstructData(); @@ -114,19 +111,3 @@ HRESULT WINAPI DllCanUnloadNow(void) return hr; } - -/*********************************************************************** - * DllRegisterServer (DPLAYX.@) - */ -HRESULT WINAPI DllRegisterServer(void) -{ - return __wine_register_resources( instance ); -} - -/*********************************************************************** - * DllUnregisterServer (DPLAYX.@) - */ -HRESULT WINAPI DllUnregisterServer(void) -{ - return __wine_unregister_resources( instance ); -} diff --git a/dlls/dpnet/dpnet_main.c b/dlls/dpnet/dpnet_main.c index f83b7163afd..1ba3d20f6e5 100644 --- a/dlls/dpnet/dpnet_main.c +++ b/dlls/dpnet/dpnet_main.c @@ -37,8 +37,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(dpnet); -static HINSTANCE instance; - static BOOL winsock_loaded = FALSE; static BOOL WINAPI winsock_startup(INIT_ONCE *once, void *param, void **context) @@ -68,7 +66,6 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpvReserved) switch(fdwReason) { case DLL_PROCESS_ATTACH: - instance = hInstDLL; DisableThreadLibraryCalls(hInstDLL); break; @@ -184,19 +181,3 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) FIXME("(%s,%s,%p): no interface found.\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv); return CLASS_E_CLASSNOTAVAILABLE; } - -/*********************************************************************** - * DllRegisterServer (DPNET.@) - */ -HRESULT WINAPI DllRegisterServer(void) -{ - return __wine_register_resources( instance ); -} - -/*********************************************************************** - * DllUnregisterServer (DPNET.@) - */ -HRESULT WINAPI DllUnregisterServer(void) -{ - return __wine_unregister_resources( instance ); -} diff --git a/dlls/dpnhpast/main.c b/dlls/dpnhpast/main.c index 0aa6b3cce79..d8f5c223e70 100644 --- a/dlls/dpnhpast/main.c +++ b/dlls/dpnhpast/main.c @@ -38,18 +38,6 @@ HRESULT WINAPI DirectPlayNATHelpCreate(LPCGUID pIID, PVOID *ppvInterface) } -/****************************************************************** - * DllRegisterServer (DPNHPAST.@) - * - * - */ -HRESULT WINAPI DllRegisterServer(void) -{ - FIXME(":stub\n"); - return S_OK; -} - - /****************************************************************** * DllGetClassObject (DPNHPAST.@) * @@ -60,15 +48,3 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) FIXME(":stub\n"); return E_FAIL; } - - -/****************************************************************** - * DllUnregisterServer (DPNHPAST.@) - * - * - */ -HRESULT WINAPI DllUnregisterServer(void) -{ - FIXME(":stub\n"); - return S_OK; -} diff --git a/dlls/dpvoice/main.c b/dlls/dpvoice/main.c index 5a5b99c3fc6..6a7d6b96dd0 100644 --- a/dlls/dpvoice/main.c +++ b/dlls/dpvoice/main.c @@ -32,8 +32,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(dpvoice); -static HINSTANCE DPVOICE_hInstance; - typedef struct { IClassFactory IClassFactory_iface; @@ -105,23 +103,6 @@ HRESULT WINAPI DirectPlayVoiceCreate(LPCGUID pIID, void **ppvInterface) return E_NOTIMPL; } -BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) -{ - TRACE("(0x%p, %d, %p)\n", hinstDLL, fdwReason, lpvReserved); - - switch (fdwReason) - { - case DLL_PROCESS_ATTACH: - DPVOICE_hInstance = hinstDLL; - DisableThreadLibraryCalls(hinstDLL); - break; - default: - break; - } - - return TRUE; -} - HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, void **ppv) { int i = 0; @@ -142,13 +123,3 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, void **ppv) FIXME("(%s,%s,%p): no interface found.\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv); return CLASS_E_CLASSNOTAVAILABLE; } - -HRESULT WINAPI DllRegisterServer(void) -{ - return __wine_register_resources( DPVOICE_hInstance ); -} - -HRESULT WINAPI DllUnregisterServer(void) -{ - return __wine_unregister_resources( DPVOICE_hInstance ); -} diff --git a/dlls/drmclien/Makefile.in b/dlls/drmclien/Makefile.in index f0644668bc8..d6a91ffc6ef 100644 --- a/dlls/drmclien/Makefile.in +++ b/dlls/drmclien/Makefile.in @@ -1,6 +1,3 @@ MODULE = drmclien.dll -EXTRADLLFLAGS = -mno-cygwin -Wb,--prefer-native - -C_SRCS = \ - main.c +EXTRADLLFLAGS = -Wb,--prefer-native diff --git a/dlls/drmclien/drmclien.spec b/dlls/drmclien/drmclien.spec index 3a2f6e669ec..fd9afcbb3f6 100644 --- a/dlls/drmclien/drmclien.spec +++ b/dlls/drmclien/drmclien.spec @@ -1,4 +1,4 @@ -@ stub DllMain +@ stdcall -private DllMain(long long ptr) @ stub CanDecrypt @ stub Decrypt @ stub RequestLicense @@ -27,5 +27,5 @@ @ stub ?GetPublicKey@CDRMLiteCrypto@@QAEJPAUPKCERT@@@Z @ stub ?QueryXferToPMEx@CDRMLiteCrypto@@QAEJPBDKPAKPAEK2K12@Z @ stub ?RestoreLicenses@CDRMLiteCrypto@@QAEJKPAEPAGPAUIUnknown@@PAHPAX@Z -@ stdcall DllRegisterServer() -@ stub DllUnregisterServer +@ stdcall -private DllRegisterServer() +@ stdcall -private DllUnregisterServer() diff --git a/dlls/drmclien/main.c b/dlls/drmclien/main.c deleted file mode 100644 index f60b9cbf26f..00000000000 --- a/dlls/drmclien/main.c +++ /dev/null @@ -1,37 +0,0 @@ -/* - * - * Copyright 2009 Austin English - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - - -#include - -#include "windef.h" -#include "winbase.h" -#include "wine/debug.h" - -WINE_DEFAULT_DEBUG_CHANNEL(drmclien); - -/*********************************************************************** - * DllRegisterServer (drmclien.@) - */ -HRESULT WINAPI DllRegisterServer(void) -{ - FIXME("Stub!\n"); - - return S_OK; -} diff --git a/dlls/dsdmo/main.c b/dlls/dsdmo/main.c index 4e01d18d1dd..fa39c28abd7 100644 --- a/dlls/dsdmo/main.c +++ b/dlls/dsdmo/main.c @@ -29,8 +29,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(dsdmo); -static HINSTANCE dsdmo_instance; - struct effect { IMediaObject IMediaObject_iface; @@ -799,19 +797,6 @@ static HRESULT waves_reverb_create(IUnknown *outer, IUnknown **out) return S_OK; } -BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, void *reserved) -{ - switch(reason) - { - case DLL_PROCESS_ATTACH: - dsdmo_instance = instance; - DisableThreadLibraryCalls(dsdmo_instance); - break; - } - - return TRUE; -} - struct class_factory { IClassFactory IClassFactory_iface; @@ -913,15 +898,3 @@ HRESULT WINAPI DllGetClassObject(REFCLSID clsid, REFIID iid, void **out) FIXME("%s not available, returning CLASS_E_CLASSNOTAVAILABLE.\n", debugstr_guid(clsid)); return CLASS_E_CLASSNOTAVAILABLE; } - -HRESULT WINAPI DllRegisterServer(void) -{ - TRACE("()\n"); - return __wine_register_resources(dsdmo_instance); -} - -HRESULT WINAPI DllUnregisterServer(void) -{ - TRACE("()\n"); - return __wine_unregister_resources(dsdmo_instance); -} diff --git a/dlls/dsound/dsound_main.c b/dlls/dsound/dsound_main.c index 80976c8aec7..f3bce6062fe 100644 --- a/dlls/dsound/dsound_main.c +++ b/dlls/dsound/dsound_main.c @@ -92,7 +92,6 @@ const WCHAR wine_vxd_drv[] = L"winemm.vxd"; /* All default settings, you most likely don't want to touch these, see wiki on UsefulRegistryKeys */ int ds_hel_buflen = 32768 * 2; -static HINSTANCE instance; /* * Get a config key from either the app-specific or the default config @@ -775,7 +774,6 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpvReserved) switch (fdwReason) { case DLL_PROCESS_ATTACH: - instance = hInstDLL; DisableThreadLibraryCalls(hInstDLL); /* Increase refcount on dsound by 1 */ GetModuleHandleExW(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS, (LPCWSTR)hInstDLL, &hInstDLL); @@ -788,19 +786,3 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpvReserved) } return TRUE; } - -/*********************************************************************** - * DllRegisterServer (DSOUND.@) - */ -HRESULT WINAPI DllRegisterServer(void) -{ - return __wine_register_resources( instance ); -} - -/*********************************************************************** - * DllUnregisterServer (DSOUND.@) - */ -HRESULT WINAPI DllUnregisterServer(void) -{ - return __wine_unregister_resources( instance ); -} diff --git a/dlls/dsquery/main.c b/dlls/dsquery/main.c index 0d95de8129e..545ec36f321 100644 --- a/dlls/dsquery/main.c +++ b/dlls/dsquery/main.c @@ -31,8 +31,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(dsquery); -static HINSTANCE instance; - /****************************************************************** * IClassFactory implementation */ @@ -196,24 +194,6 @@ static HRESULT CommonQuery_create(IUnknown *outer, REFIID riid, void **out) return ICommonQuery_QueryInterface(&query->ICommonQuery_iface, riid, out); } -/*********************************************************************** - * DllMain - */ -BOOL WINAPI DllMain(HINSTANCE inst, DWORD reason, void *reserved) -{ - TRACE("(%p, %u, %p)\n", inst, reason, reserved); - - switch (reason) - { - case DLL_PROCESS_ATTACH: - instance = inst; - DisableThreadLibraryCalls(inst); - break; - } - - return TRUE; -} - /*********************************************************************** * DllGetClassObject (DSQUERY.@) */ @@ -245,19 +225,3 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, void **out) *out = NULL; return CLASS_E_CLASSNOTAVAILABLE; } - -/*********************************************************************** - * DllRegisterServer (DSQUERY.@) - */ -HRESULT WINAPI DllRegisterServer(void) -{ - return __wine_register_resources( instance ); -} - -/*********************************************************************** - * DllUnregisterServer (DSQUERY.@) - */ -HRESULT WINAPI DllUnregisterServer(void) -{ - return __wine_unregister_resources( instance ); -} diff --git a/dlls/dssenh/main.c b/dlls/dssenh/main.c index 82822e4daec..6cfa04393fd 100644 --- a/dlls/dssenh/main.c +++ b/dlls/dssenh/main.c @@ -33,8 +33,6 @@ #include "wine/debug.h" #include "wine/heap.h" -static HINSTANCE instance; - WINE_DEFAULT_DEBUG_CHANNEL(dssenh); #define MAGIC_KEY (('K' << 24) | ('E' << 16) | ('Y' << 8) | '0') @@ -1031,33 +1029,3 @@ BOOL WINAPI CPVerifySignature( HCRYPTPROV hprov, HCRYPTHASH hhash, const BYTE *s return !BCryptVerifySignature( key->handle, NULL, hash->value, hash->len, (UCHAR *)sig, siglen, 0 ); } - -BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) -{ - TRACE("(0x%p, %d, %p)\n", hinstDLL, fdwReason, lpvReserved); - - switch (fdwReason) - { - case DLL_PROCESS_ATTACH: - instance = hinstDLL; - DisableThreadLibraryCalls(hinstDLL); - break; - } - return TRUE; -} - -/***************************************************** - * DllRegisterServer (DSSENH.@) - */ -HRESULT WINAPI DllRegisterServer(void) -{ - return __wine_register_resources( instance ); -} - -/***************************************************** - * DllUnregisterServer (DSSENH.@) - */ -HRESULT WINAPI DllUnregisterServer(void) -{ - return __wine_unregister_resources( instance ); -} diff --git a/dlls/dsuiext/dsuiext.spec b/dlls/dsuiext/dsuiext.spec index 86925ec750b..5b1ac2a5596 100644 --- a/dlls/dsuiext/dsuiext.spec +++ b/dlls/dsuiext/dsuiext.spec @@ -1,8 +1,8 @@ @ stdcall -private DllCanUnloadNow() @ stdcall -private DllGetClassObject(ptr ptr ptr) @ stub DllInstall -@ stub DllRegisterServer -@ stub DllUnregisterServer +@ stdcall -private DllRegisterServer() +@ stdcall -private DllUnregisterServer() @ stub DsBrowseForContainerA @ stub DsBrowseForContainerW @ stub DsGetFriendlyClassName diff --git a/dlls/dswave/dswave_main.c b/dlls/dswave/dswave_main.c index 12df6da8618..81dcc73de85 100644 --- a/dlls/dswave/dswave_main.c +++ b/dlls/dswave/dswave_main.c @@ -39,7 +39,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(dswave); -static HINSTANCE instance; LONG DSWAVE_refCount = 0; typedef struct { @@ -118,21 +117,6 @@ static const IClassFactoryVtbl WaveCF_Vtbl = { static IClassFactoryImpl Wave_CF = {{&WaveCF_Vtbl}}; -/****************************************************************** - * DllMain - * - * - */ -BOOL WINAPI DllMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { - if (fdwReason == DLL_PROCESS_ATTACH) { - instance = hinstDLL; - DisableThreadLibraryCalls(hinstDLL); - } - - return TRUE; -} - - /****************************************************************** * DllCanUnloadNow (DSWAVE.@) * @@ -161,19 +145,3 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) WARN("(%s, %s, %p): no interface found.\n", debugstr_dmguid(rclsid), debugstr_dmguid(riid), ppv); return CLASS_E_CLASSNOTAVAILABLE; } - -/*********************************************************************** - * DllRegisterServer (DSWAVE.@) - */ -HRESULT WINAPI DllRegisterServer(void) -{ - return __wine_register_resources( instance ); -} - -/*********************************************************************** - * DllUnregisterServer (DSWAVE.@) - */ -HRESULT WINAPI DllUnregisterServer(void) -{ - return __wine_unregister_resources( instance ); -} diff --git a/dlls/dx8vb/main.c b/dlls/dx8vb/main.c index a53570ba03a..2fc7402a220 100644 --- a/dlls/dx8vb/main.c +++ b/dlls/dx8vb/main.c @@ -36,23 +36,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(dx8vb); -static HINSTANCE instance_dx8vb; - -BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID reserved) -{ - TRACE("(0x%p, %d, %p)\n", instance, reason, reserved); - - switch (reason) - { - case DLL_PROCESS_ATTACH: - DisableThreadLibraryCalls(instance); - instance_dx8vb = instance; - break; - } - - return TRUE; -} - typedef struct { IClassFactory IClassFactory_iface; @@ -178,13 +161,3 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, void **ppv) *ppv = &factory->IClassFactory_iface; return S_OK; } - -HRESULT WINAPI DllRegisterServer(void) -{ - return __wine_register_resources(instance_dx8vb); -} - -HRESULT WINAPI DllUnregisterServer(void) -{ - return __wine_unregister_resources(instance_dx8vb); -} diff --git a/dlls/dxdiagn/dxdiag_main.c b/dlls/dxdiagn/dxdiag_main.c index 719984f4e7d..0f57b94281f 100644 --- a/dlls/dxdiagn/dxdiag_main.c +++ b/dlls/dxdiagn/dxdiag_main.c @@ -151,19 +151,3 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) FIXME("(%s,%s,%p): no interface found.\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv); return CLASS_E_CLASSNOTAVAILABLE; } - -/*********************************************************************** - * DllRegisterServer (DXDIAGN.@) - */ -HRESULT WINAPI DllRegisterServer(void) -{ - return __wine_register_resources( dxdiagn_instance ); -} - -/*********************************************************************** - * DllUnregisterServer (DXDIAGN.@) - */ -HRESULT WINAPI DllUnregisterServer(void) -{ - return __wine_unregister_resources( dxdiagn_instance ); -} diff --git a/dlls/evr/main.c b/dlls/evr/main.c index b6389ea8a89..e843f15c04f 100644 --- a/dlls/evr/main.c +++ b/dlls/evr/main.c @@ -32,8 +32,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(evr); -static HINSTANCE instance_evr; - BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID reserved) { switch (reason) @@ -181,16 +179,6 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, void **ppv) return S_OK; } -HRESULT WINAPI DllRegisterServer(void) -{ - return __wine_register_resources(instance_evr); -} - -HRESULT WINAPI DllUnregisterServer(void) -{ - return __wine_unregister_resources(instance_evr); -} - HRESULT WINAPI MFCreateVideoMixerAndPresenter(IUnknown *mixer_outer, IUnknown *presenter_outer, REFIID riid_mixer, void **mixer, REFIID riid_presenter, void **presenter) { diff --git a/dlls/explorerframe/explorerframe_main.c b/dlls/explorerframe/explorerframe_main.c index 8f32c2c2d62..d0d8fd19e9b 100644 --- a/dlls/explorerframe/explorerframe_main.c +++ b/dlls/explorerframe/explorerframe_main.c @@ -207,19 +207,3 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, void **ppv) return CLASS_E_CLASSNOTAVAILABLE; } - -/************************************************************************* - * DllRegisterServer (ExplorerFrame.@) - */ -HRESULT WINAPI DllRegisterServer(void) -{ - return __wine_register_resources( explorerframe_hinstance ); -} - -/************************************************************************* - * DllUnregisterServer (ExplorerFrame.@) - */ -HRESULT WINAPI DllUnregisterServer(void) -{ - return __wine_unregister_resources( explorerframe_hinstance ); -} diff --git a/dlls/fntcache/fntcache.spec b/dlls/fntcache/fntcache.spec index cd309949287..2431c63a94d 100644 --- a/dlls/fntcache/fntcache.spec +++ b/dlls/fntcache/fntcache.spec @@ -1,3 +1,3 @@ -@ stub DllRegisterServer -@ stub DllUnregisterServer +@ stdcall -private DllRegisterServer() +@ stdcall -private DllUnregisterServer() @ stdcall -private ServiceMain(long ptr) diff --git a/dlls/gameux/Makefile.in b/dlls/gameux/Makefile.in index b423c8687c7..c32cd8da39c 100644 --- a/dlls/gameux/Makefile.in +++ b/dlls/gameux/Makefile.in @@ -6,8 +6,7 @@ EXTRADLLFLAGS = -mno-cygwin C_SRCS = \ factory.c \ gameexplorer.c \ - gamestatistics.c \ - main.c + gamestatistics.c IDL_SRCS = gameux_tlb.idl diff --git a/dlls/gameux/factory.c b/dlls/gameux/factory.c index d9ac6de70f7..3ead6ac9dd2 100644 --- a/dlls/gameux/factory.c +++ b/dlls/gameux/factory.c @@ -25,7 +25,8 @@ #include "windef.h" #include "winbase.h" #include "ole2.h" - +#include "shobjidl.h" +#include "initguid.h" #include "gameux.h" #include "gameux_private.h" diff --git a/dlls/gameux/main.c b/dlls/gameux/main.c deleted file mode 100644 index d336cb96596..00000000000 --- a/dlls/gameux/main.c +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Gameux library main file - * - * Copyright (C) 2010 Mariusz PluciƄski - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - - -#define COBJMACROS - -#include -#include "windef.h" -#include "winbase.h" - -#include "ole2.h" -#include "rpcproxy.h" -#include "shobjidl.h" -#include "initguid.h" -#include "gameux.h" - -#include "wine/debug.h" - -WINE_DEFAULT_DEBUG_CHANNEL(gameux); - -static HINSTANCE instance; - -BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv) -{ - TRACE("(%p, %d, %p)\n", hInstDLL, fdwReason, lpv); - - switch(fdwReason) - { - case DLL_PROCESS_ATTACH: - instance = hInstDLL; - DisableThreadLibraryCalls(hInstDLL); - break; - } - return TRUE; -} - -/*********************************************************************** - * DllRegisterServer (GAMEUX.@) - */ -HRESULT WINAPI DllRegisterServer(void) -{ - return __wine_register_resources( instance ); -} - -/*********************************************************************** - * DllUnregisterServer (GAMEUX.@) - */ -HRESULT WINAPI DllUnregisterServer(void) -{ - return __wine_unregister_resources( instance ); -} diff --git a/dlls/gpkcsp/Makefile.in b/dlls/gpkcsp/Makefile.in index 49efda4ebd1..f3c0e716d0c 100644 --- a/dlls/gpkcsp/Makefile.in +++ b/dlls/gpkcsp/Makefile.in @@ -1,6 +1,3 @@ MODULE = gpkcsp.dll -EXTRADLLFLAGS = -mno-cygwin -Wb,--prefer-native - -C_SRCS = \ - main.c +EXTRADLLFLAGS = -Wb,--prefer-native diff --git a/dlls/gpkcsp/main.c b/dlls/gpkcsp/main.c deleted file mode 100644 index 4e890fafbe7..00000000000 --- a/dlls/gpkcsp/main.c +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2008 Maarten Lankhorst - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - - -#include - -#include "windef.h" -#include "winbase.h" -#include "wine/debug.h" - -WINE_DEFAULT_DEBUG_CHANNEL(gpkcsp); - -/***************************************************** - * DllRegisterServer (GPKCSP.@) - */ -HRESULT WINAPI DllRegisterServer(void) -{ - FIXME("Not implemented.\n"); - return E_UNEXPECTED; -} - -/***************************************************** - * DllUnregisterServer (GPKCSP.@) - */ -HRESULT WINAPI DllUnregisterServer(void) -{ - FIXME("Not implemented.\n"); - return E_UNEXPECTED; -} diff --git a/dlls/hhctrl.ocx/hhctrl.c b/dlls/hhctrl.ocx/hhctrl.c index 893cdde6ea7..b1ccabb2c0e 100644 --- a/dlls/hhctrl.ocx/hhctrl.c +++ b/dlls/hhctrl.ocx/hhctrl.c @@ -588,19 +588,3 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) FIXME("(%s %s %p)\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv); return CLASS_E_CLASSNOTAVAILABLE; } - -/*********************************************************************** - * DllRegisterServer (HHCTRL.OCX.@) - */ -HRESULT WINAPI DllRegisterServer(void) -{ - return __wine_register_resources( hhctrl_hinstance ); -} - -/*********************************************************************** - * DllUnregisterServer (HHCTRL.OCX.@) - */ -HRESULT WINAPI DllUnregisterServer(void) -{ - return __wine_unregister_resources( hhctrl_hinstance ); -} diff --git a/dlls/hlink/hlink_main.c b/dlls/hlink/hlink_main.c index 29ea11a80c6..c730616fbe6 100644 --- a/dlls/hlink/hlink_main.c +++ b/dlls/hlink/hlink_main.c @@ -28,8 +28,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(hlink); -static HINSTANCE instance; - typedef HRESULT (*LPFNCREATEINSTANCE)(IUnknown*, REFIID, LPVOID*); typedef struct @@ -43,20 +41,6 @@ static inline CFImpl *impl_from_IClassFactory(IClassFactory *iface) return CONTAINING_RECORD(iface, CFImpl, IClassFactory_iface); } -BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) -{ - TRACE("%p %d %p\n", hinstDLL, fdwReason, lpvReserved); - - switch (fdwReason) - { - case DLL_PROCESS_ATTACH: - instance = hinstDLL; - DisableThreadLibraryCalls(hinstDLL); - break; - } - return TRUE; -} - /*********************************************************************** * HlinkCreateFromMoniker (HLINK.@) */ @@ -579,19 +563,3 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID iid, LPVOID *ppv) return IClassFactory_QueryInterface(pcf, iid, ppv); } - -/*********************************************************************** - * DllRegisterServer (HLINK.@) - */ -HRESULT WINAPI DllRegisterServer(void) -{ - return __wine_register_resources( instance ); -} - -/*********************************************************************** - * DllUnregisterServer (HLINK.@) - */ -HRESULT WINAPI DllUnregisterServer(void) -{ - return __wine_unregister_resources( instance ); -} diff --git a/dlls/hnetcfg/hnetcfg.c b/dlls/hnetcfg/hnetcfg.c index f92c4eaa983..96b86e690e8 100644 --- a/dlls/hnetcfg/hnetcfg.c +++ b/dlls/hnetcfg/hnetcfg.c @@ -32,8 +32,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(hnetcfg); -static HINSTANCE instance; - typedef HRESULT (*fnCreateInstance)( IUnknown *pUnkOuter, LPVOID *ppObj ); typedef struct @@ -124,7 +122,6 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID reserved) switch(fdwReason) { case DLL_PROCESS_ATTACH: - instance = hInstDLL; DisableThreadLibraryCalls(hInstDLL); break; case DLL_PROCESS_DETACH: @@ -165,19 +162,3 @@ HRESULT WINAPI DllGetClassObject( REFCLSID rclsid, REFIID iid, LPVOID *ppv ) if (!cf) return CLASS_E_CLASSNOTAVAILABLE; return IClassFactory_QueryInterface( cf, iid, ppv ); } - -/*********************************************************************** - * DllRegisterServer (HNETCFG.@) - */ -HRESULT WINAPI DllRegisterServer(void) -{ - return __wine_register_resources( instance ); -} - -/*********************************************************************** - * DllUnregisterServer (HNETCFG.@) - */ -HRESULT WINAPI DllUnregisterServer(void) -{ - return __wine_unregister_resources( instance ); -} diff --git a/dlls/ieframe/ieframe_main.c b/dlls/ieframe/ieframe_main.c index b05686f24f9..ca976175e69 100644 --- a/dlls/ieframe/ieframe_main.c +++ b/dlls/ieframe/ieframe_main.c @@ -259,24 +259,6 @@ HRESULT WINAPI DllCanUnloadNow(void) return module_ref ? S_FALSE : S_OK; } -/*********************************************************************** - * DllRegisterServer (ieframe.@) - */ -HRESULT WINAPI DllRegisterServer(void) -{ - TRACE("()\n"); - return __wine_register_resources(ieframe_instance); -} - -/*********************************************************************** - * DllUnregisterServer (ieframe.@) - */ -HRESULT WINAPI DllUnregisterServer(void) -{ - TRACE("()\n"); - return __wine_unregister_resources(ieframe_instance); -} - /*********************************************************************** * IEGetWriteableHKCU (ieframe.@) */ diff --git a/dlls/inetcomm/inetcomm_main.c b/dlls/inetcomm/inetcomm_main.c index 2e8554af5e5..61c408220ec 100644 --- a/dlls/inetcomm/inetcomm_main.c +++ b/dlls/inetcomm/inetcomm_main.c @@ -38,8 +38,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(inetcomm); -static HINSTANCE instance; - BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { static IMimeInternational *international; @@ -50,7 +48,6 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { case DLL_PROCESS_ATTACH: DisableThreadLibraryCalls(hinstDLL); - instance = hinstDLL; if (!InternetTransport_RegisterClass(hinstDLL)) return FALSE; MimeInternational_Construct(&international); @@ -208,19 +205,3 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID iid, LPVOID *ppv) return IClassFactory_QueryInterface( cf, iid, ppv ); } - -/*********************************************************************** - * DllRegisterServer (INETCOMM.@) - */ -HRESULT WINAPI DllRegisterServer(void) -{ - return __wine_register_resources( instance ); -} - -/*********************************************************************** - * DllUnregisterServer (INETCOMM.@) - */ -HRESULT WINAPI DllUnregisterServer(void) -{ - return __wine_unregister_resources( instance ); -} diff --git a/dlls/infosoft/infosoft_main.c b/dlls/infosoft/infosoft_main.c index 4d283682e56..04f631d7efc 100644 --- a/dlls/infosoft/infosoft_main.c +++ b/dlls/infosoft/infosoft_main.c @@ -37,20 +37,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(infosoft); -static HINSTANCE instance; - -BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv) -{ - switch(fdwReason) - { - case DLL_PROCESS_ATTACH: - instance = hInstDLL; - DisableThreadLibraryCalls(hInstDLL); - break; - } - return TRUE; -} - DECLSPEC_HIDDEN extern HRESULT WINAPI wb_Constructor(IUnknown*, REFIID, LPVOID *); typedef HRESULT (CALLBACK *LPFNCREATEINSTANCE)(IUnknown*, REFIID, LPVOID*); @@ -145,20 +131,3 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID iid, LPVOID *ppv) return IClassFactory_QueryInterface(pcf, iid, ppv); } - - -/*********************************************************************** - * DllRegisterServer (INFOSOFT.@) - */ -HRESULT WINAPI DllRegisterServer(void) -{ - return __wine_register_resources( instance ); -} - -/*********************************************************************** - * DllUnregisterServer (INFOSOFT.@) - */ -HRESULT WINAPI DllUnregisterServer(void) -{ - return __wine_unregister_resources( instance ); -} diff --git a/dlls/initpki/Makefile.in b/dlls/initpki/Makefile.in index c578820e7f6..6fe32d70ee4 100644 --- a/dlls/initpki/Makefile.in +++ b/dlls/initpki/Makefile.in @@ -1,6 +1,3 @@ MODULE = initpki.dll -EXTRADLLFLAGS = -mno-cygwin -Wb,--prefer-native - -C_SRCS = \ - main.c +EXTRADLLFLAGS = -Wb,--prefer-native diff --git a/dlls/initpki/main.c b/dlls/initpki/main.c deleted file mode 100644 index b4f5f486cd8..00000000000 --- a/dlls/initpki/main.c +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2008 Maarten Lankhorst - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - - -#include - -#include "windef.h" -#include "winbase.h" -#include "wine/debug.h" - -WINE_DEFAULT_DEBUG_CHANNEL(initpki); - -/***************************************************** - * DllRegisterServer (INITPKI.@) - */ -HRESULT WINAPI DllRegisterServer(void) -{ - FIXME("Not implemented.\n"); - return E_UNEXPECTED; -} - -/***************************************************** - * DllUnregisterServer (INITPKI.@) - */ -HRESULT WINAPI DllUnregisterServer(void) -{ - FIXME("Not implemented.\n"); - return E_UNEXPECTED; -} diff --git a/dlls/inkobj/inkobj.c b/dlls/inkobj/inkobj.c index 37faddd9611..1ee6125e4ee 100644 --- a/dlls/inkobj/inkobj.c +++ b/dlls/inkobj/inkobj.c @@ -27,21 +27,3 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv) FIXME("Not implemented. Requested class was:%s\n", debugstr_guid(rclsid)); return CLASS_E_CLASSNOTAVAILABLE; } - -/***************************************************** - * DllRegisterServer (INKOBJ.@) - */ -HRESULT WINAPI DllRegisterServer(void) -{ - FIXME("Not implemented.\n"); - return E_UNEXPECTED; /* unable to register */ -} - -/***************************************************** - * DllUnregisterServer (INKOBJ.@) - */ -HRESULT WINAPI DllUnregisterServer(void) -{ - FIXME("Not implemented.\n"); - return E_UNEXPECTED; /* unable to register */ -} diff --git a/dlls/inseng/inseng_main.c b/dlls/inseng/inseng_main.c index 7416d247b93..2c95a2e72bd 100644 --- a/dlls/inseng/inseng_main.c +++ b/dlls/inseng/inseng_main.c @@ -36,8 +36,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(inseng); -static HINSTANCE instance; - struct InstallEngine { IInstallEngine2 IInstallEngine2_iface; LONG ref; @@ -358,18 +356,6 @@ static const IClassFactoryVtbl InstallEngineCFVtbl = { static IClassFactory InstallEngineCF = { &InstallEngineCFVtbl }; -BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv) -{ - switch(fdwReason) - { - case DLL_PROCESS_ATTACH: - instance = hInstDLL; - DisableThreadLibraryCalls(hInstDLL); - break; - } - return TRUE; -} - /*********************************************************************** * DllGetClassObject (INSENG.@) */ @@ -384,22 +370,6 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID iid, LPVOID *ppv) return CLASS_E_CLASSNOTAVAILABLE; } -/*********************************************************************** - * DllRegisterServer (INSENG.@) - */ -HRESULT WINAPI DllRegisterServer(void) -{ - return __wine_register_resources( instance ); -} - -/*********************************************************************** - * DllUnregisterServer (INSENG.@) - */ -HRESULT WINAPI DllUnregisterServer(void) -{ - return __wine_unregister_resources( instance ); -} - BOOL WINAPI CheckTrustEx( LPVOID a, LPVOID b, LPVOID c, LPVOID d, LPVOID e ) { FIXME("%p %p %p %p %p\n", a, b, c, d, e ); diff --git a/dlls/itircl/Makefile.in b/dlls/itircl/Makefile.in index 11eff81d3e0..266a1b900b9 100644 --- a/dlls/itircl/Makefile.in +++ b/dlls/itircl/Makefile.in @@ -1,6 +1,3 @@ MODULE = itircl.dll -EXTRADLLFLAGS = -mno-cygwin -Wb,--prefer-native - -C_SRCS = \ - itircl_main.c +EXTRADLLFLAGS = -Wb,--prefer-native diff --git a/dlls/itircl/itircl_main.c b/dlls/itircl/itircl_main.c deleted file mode 100644 index e540acc6d5f..00000000000 --- a/dlls/itircl/itircl_main.c +++ /dev/null @@ -1,46 +0,0 @@ -/* - * itircl main - * - * Copyright 2008 James Hawkins - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - - -#include - -#include "windef.h" -#include "winbase.h" -#include "wine/debug.h" - -WINE_DEFAULT_DEBUG_CHANNEL(itircl); - -/*********************************************************************** - * DllRegisterServer (ITIRCL.@) - */ -HRESULT WINAPI DllRegisterServer(void) -{ - FIXME("stub\n"); - return S_FALSE; -} - -/*********************************************************************** - * DllUnregisterServer (ITIRCL.@) - */ -HRESULT WINAPI DllUnregisterServer(void) -{ - FIXME("stub\n"); - return S_FALSE; -} diff --git a/dlls/itss/itss.c b/dlls/itss/itss.c index e284400cf11..6d41ef38c38 100644 --- a/dlls/itss/itss.c +++ b/dlls/itss/itss.c @@ -47,18 +47,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(itss); static HRESULT ITSS_create(IUnknown *pUnkOuter, LPVOID *ppObj); LONG dll_count = 0; -static HINSTANCE hInst; - -BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv) -{ - switch(fdwReason) { - case DLL_PROCESS_ATTACH: - DisableThreadLibraryCalls(hInstDLL); - hInst = hInstDLL; - break; - } - return TRUE; -} /****************************************************************************** * ITSS ClassFactory @@ -394,19 +382,3 @@ HRESULT WINAPI DllCanUnloadNow(void) TRACE("dll_count = %u\n", dll_count); return dll_count ? S_FALSE : S_OK; } - -/*********************************************************************** - * DllRegisterServer (ITSS.@) - */ -HRESULT WINAPI DllRegisterServer(void) -{ - return __wine_register_resources( hInst ); -} - -/*********************************************************************** - * DllUnregisterServer (ITSS.@) - */ -HRESULT WINAPI DllUnregisterServer(void) -{ - return __wine_unregister_resources( hInst ); -} diff --git a/dlls/jscript/jscript_main.c b/dlls/jscript/jscript_main.c index 532cdf96d94..50ffd67521b 100644 --- a/dlls/jscript/jscript_main.c +++ b/dlls/jscript/jscript_main.c @@ -204,21 +204,3 @@ HRESULT WINAPI DllCanUnloadNow(void) return module_ref ? S_FALSE : S_OK; } - -/*********************************************************************** - * DllRegisterServer (jscript.@) - */ -HRESULT WINAPI DllRegisterServer(void) -{ - TRACE("()\n"); - return __wine_register_resources(jscript_hinstance); -} - -/*********************************************************************** - * DllUnregisterServer (jscript.@) - */ -HRESULT WINAPI DllUnregisterServer(void) -{ - TRACE("()\n"); - return __wine_unregister_resources(jscript_hinstance); -} diff --git a/dlls/jsproxy/main.c b/dlls/jsproxy/main.c index 1fbaa5cccce..bf8a2624920 100644 --- a/dlls/jsproxy/main.c +++ b/dlls/jsproxy/main.c @@ -33,8 +33,6 @@ #include "wine/debug.h" #include "wine/heap.h" -static HINSTANCE instance; - WINE_DEFAULT_DEBUG_CHANNEL(jsproxy); static CRITICAL_SECTION cs_jsproxy; @@ -46,24 +44,6 @@ static CRITICAL_SECTION_DEBUG critsect_debug = }; static CRITICAL_SECTION cs_jsproxy = { &critsect_debug, -1, 0, 0, 0, 0 }; -/****************************************************************** - * DllMain (jsproxy.@) - */ -BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved ) -{ - switch (reason) - { - case DLL_PROCESS_ATTACH: - instance = hinst; - DisableThreadLibraryCalls( hinst ); - break; - - case DLL_PROCESS_DETACH: - break; - } - return TRUE; -} - static inline WCHAR *strdupAW( const char *src, int len ) { WCHAR *dst = NULL; diff --git a/dlls/ksproxy.ax/ksproxy.ax.spec b/dlls/ksproxy.ax/ksproxy.ax.spec index 7bba1c4ac15..6e4cea6b58c 100644 --- a/dlls/ksproxy.ax/ksproxy.ax.spec +++ b/dlls/ksproxy.ax/ksproxy.ax.spec @@ -1,7 +1,7 @@ @ stdcall -private DllCanUnloadNow() @ stub DllGetClassObject -@ stub DllRegisterServer -@ stub DllUnregisterServer +@ stdcall -private DllRegisterServer() +@ stdcall -private DllUnregisterServer() @ stub KsGetMediaType @ stub KsGetMediaTypeCount @ stub KsGetMultiplePinFactoryItems diff --git a/dlls/mf/main.c b/dlls/mf/main.c index c922ce13f88..236bc45c9ec 100644 --- a/dlls/mf/main.c +++ b/dlls/mf/main.c @@ -34,7 +34,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(mfplat); -static HINSTANCE mf_instance; extern const GUID CLSID_FileSchemePlugin; struct activate_object @@ -1048,35 +1047,6 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, void **obj) return CLASS_E_CLASSNOTAVAILABLE; } -/*********************************************************************** - * DllRegisterServer (mf.@) - */ -HRESULT WINAPI DllRegisterServer(void) -{ - return __wine_register_resources( mf_instance ); -} - -/*********************************************************************** - * DllUnregisterServer (mf.@) - */ -HRESULT WINAPI DllUnregisterServer(void) -{ - return __wine_unregister_resources( mf_instance ); -} - -BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID reserved) -{ - switch (reason) - { - case DLL_PROCESS_ATTACH: - mf_instance = instance; - DisableThreadLibraryCalls(instance); - break; - } - - return TRUE; -} - static HRESULT prop_string_vector_append(PROPVARIANT *vector, unsigned int *capacity, BOOL unique, const WCHAR *str) { WCHAR *ptrW; diff --git a/dlls/mfplay/mfplay.spec b/dlls/mfplay/mfplay.spec index 9715a332bdb..493835bb0b8 100644 --- a/dlls/mfplay/mfplay.spec +++ b/dlls/mfplay/mfplay.spec @@ -1,6 +1,6 @@ @ stdcall -private DllCanUnloadNow() @ stub DllGetClassObject -@ stub DllRegisterServer -@ stub DllUnregisterServer +@ stdcall -private DllRegisterServer() +@ stdcall -private DllUnregisterServer() @ stdcall MFPCreateMediaPlayer(wstr long long ptr long ptr) @ stub MFPCreateMediaPlayerEx diff --git a/dlls/mfreadwrite/reader.c b/dlls/mfreadwrite/reader.c index 24e7f72df6a..62e4f2d9bdb 100644 --- a/dlls/mfreadwrite/reader.c +++ b/dlls/mfreadwrite/reader.c @@ -44,31 +44,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(mfplat); -static HINSTANCE mfinstance; - -BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID reserved) -{ - switch (reason) - { - case DLL_PROCESS_ATTACH: - mfinstance = instance; - DisableThreadLibraryCalls(instance); - break; - } - - return TRUE; -} - -HRESULT WINAPI DllRegisterServer(void) -{ - return __wine_register_resources( mfinstance ); -} - -HRESULT WINAPI DllUnregisterServer(void) -{ - return __wine_unregister_resources( mfinstance ); -} - struct stream_response { struct list entry; diff --git a/dlls/mmcndmgr/mmcndmgr.c b/dlls/mmcndmgr/mmcndmgr.c index a0d31af1182..f5d35e2c43c 100644 --- a/dlls/mmcndmgr/mmcndmgr.c +++ b/dlls/mmcndmgr/mmcndmgr.c @@ -33,8 +33,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(mmc); -static HINSTANCE MMC_hInstance; - static HRESULT WINAPI mmcversion_QueryInterface(IMMCVersionInfo *iface, REFIID riid, void **ppv) { TRACE("(%p)->(%s %p)\n", iface, debugstr_guid(riid), ppv); @@ -154,27 +152,4 @@ HRESULT WINAPI DllGetClassObject( REFCLSID riid, REFIID iid, LPVOID *ppv ) FIXME("Unsupported interface %s\n", debugstr_guid(riid)); return CLASS_E_CLASSNOTAVAILABLE; - } - -HRESULT WINAPI DllRegisterServer(void) -{ - return __wine_register_resources( MMC_hInstance ); -} - -HRESULT WINAPI DllUnregisterServer(void) -{ - return __wine_unregister_resources( MMC_hInstance ); -} - -BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) -{ - TRACE("(%p, %d, %p)\n", hinstDLL, fdwReason, lpvReserved); - - switch (fdwReason) - { - case DLL_PROCESS_ATTACH: - MMC_hInstance = hinstDLL; - break; - } - return TRUE; } diff --git a/dlls/mmdevapi/main.c b/dlls/mmdevapi/main.c index 95b95522599..15270e76d61 100644 --- a/dlls/mmdevapi/main.c +++ b/dlls/mmdevapi/main.c @@ -44,8 +44,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(mmdevapi); -static HINSTANCE instance; - DriverFuncs drvs; const WCHAR drv_keyW[] = L"Software\\Wine\\Drivers"; @@ -160,7 +158,6 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) switch (fdwReason) { case DLL_PROCESS_ATTACH: - instance = hinstDLL; DisableThreadLibraryCalls(hinstDLL); break; case DLL_PROCESS_DETACH: @@ -292,22 +289,6 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) return CLASS_E_CLASSNOTAVAILABLE; } -/*********************************************************************** - * DllRegisterServer (MMDEVAPI.@) - */ -HRESULT WINAPI DllRegisterServer(void) -{ - return __wine_register_resources( instance ); -} - -/*********************************************************************** - * DllUnregisterServer (MMDEVAPI.@) - */ -HRESULT WINAPI DllUnregisterServer(void) -{ - return __wine_unregister_resources( instance ); -} - struct activate_async_op { IActivateAudioInterfaceAsyncOperation IActivateAudioInterfaceAsyncOperation_iface; LONG ref; diff --git a/dlls/msado15/main.c b/dlls/msado15/main.c index a6aa03a2e23..1b1d4509c1a 100644 --- a/dlls/msado15/main.c +++ b/dlls/msado15/main.c @@ -32,20 +32,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(msado15); -static HINSTANCE hinstance; - -BOOL WINAPI DllMain( HINSTANCE dll, DWORD reason, LPVOID reserved ) -{ - switch (reason) - { - case DLL_PROCESS_ATTACH: - hinstance = dll; - DisableThreadLibraryCalls( dll ); - break; - } - return TRUE; -} - typedef HRESULT (*fnCreateInstance)( void **obj ); struct msadocf @@ -151,22 +137,6 @@ HRESULT WINAPI DllGetClassObject( REFCLSID clsid, REFIID iid, void **obj ) return IClassFactory_QueryInterface( cf, iid, obj ); } -/*********************************************************************** - * DllRegisterServer - */ -HRESULT WINAPI DllRegisterServer( void ) -{ - return __wine_register_resources( hinstance ); -} - -/*********************************************************************** - * DllUnregisterServer - */ -HRESULT WINAPI DllUnregisterServer( void ) -{ - return __wine_unregister_resources( hinstance ); -} - static ITypeLib *typelib; static ITypeInfo *typeinfos[LAST_tid]; diff --git a/dlls/msctf/msctf.c b/dlls/msctf/msctf.c index 5b44447502f..4ae9e16d453 100644 --- a/dlls/msctf/msctf.c +++ b/dlls/msctf/msctf.c @@ -39,8 +39,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(msctf); -static HINSTANCE MSCTF_hinstance; - typedef struct { DWORD id; @@ -557,7 +555,6 @@ BOOL WINAPI DllMain(HINSTANCE hinst, DWORD fdwReason, LPVOID fImpLoad) switch (fdwReason) { case DLL_PROCESS_ATTACH: - MSCTF_hinstance = hinst; tlsIndex = TlsAlloc(); break; case DLL_PROCESS_DETACH: @@ -587,22 +584,6 @@ HRESULT WINAPI DllGetClassObject(REFCLSID clsid, REFIID iid, LPVOID *ppvOut) return CLASS_E_CLASSNOTAVAILABLE; } -/*********************************************************************** - * DllRegisterServer (MSCTF.@) - */ -HRESULT WINAPI DllRegisterServer(void) -{ - return __wine_register_resources( MSCTF_hinstance ); -} - -/*********************************************************************** - * DllUnregisterServer (MSCTF.@) - */ -HRESULT WINAPI DllUnregisterServer(void) -{ - return __wine_unregister_resources( MSCTF_hinstance ); -} - /*********************************************************************** * TF_CreateThreadMgr (MSCTF.@) */ diff --git a/dlls/msdrm/msdrm.spec b/dlls/msdrm/msdrm.spec index 5a4243ca84e..8b85f3b53a4 100644 --- a/dlls/msdrm/msdrm.spec +++ b/dlls/msdrm/msdrm.spec @@ -84,6 +84,6 @@ @ stub DRMVerify @ stdcall -private DllCanUnloadNow() @ stub DllGetClassObject -@ stub DllRegisterServer -@ stub DllUnregisterServer +@ stdcall -private DllRegisterServer() +@ stdcall -private DllUnregisterServer() @ stub __AddMachineCertToLicenseStore diff --git a/dlls/msi/msi_main.c b/dlls/msi/msi_main.c index 0e436b09e59..738d9272cd9 100644 --- a/dlls/msi/msi_main.c +++ b/dlls/msi/msi_main.c @@ -216,19 +216,3 @@ HRESULT WINAPI DllCanUnloadNow(void) { return dll_count == 0 ? S_OK : S_FALSE; } - -/*********************************************************************** - * DllRegisterServer (MSI.@) - */ -HRESULT WINAPI DllRegisterServer(void) -{ - return __wine_register_resources( msi_hInstance ); -} - -/*********************************************************************** - * DllUnregisterServer (MSI.@) - */ -HRESULT WINAPI DllUnregisterServer(void) -{ - return __wine_unregister_resources( msi_hInstance ); -} diff --git a/dlls/msident/msident.c b/dlls/msident/msident.c index 2036241e7ef..44a65c3e477 100644 --- a/dlls/msident/msident.c +++ b/dlls/msident/msident.c @@ -28,8 +28,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(msident); -static HINSTANCE msident_instance; - typedef struct { IEnumUserIdentity IEnumUserIdentity_iface; LONG ref; @@ -274,24 +272,6 @@ static const IClassFactoryVtbl UserIdentityManagerCFVtbl = { static IClassFactory UserIdentityManagerCF = { &UserIdentityManagerCFVtbl }; -/****************************************************************** - * DllMain (msident.@) - */ -BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv) -{ - TRACE("(%p %d %p)\n", hInstDLL, fdwReason, lpv); - - switch(fdwReason) - { - case DLL_PROCESS_ATTACH: - msident_instance = hInstDLL; - DisableThreadLibraryCalls(hInstDLL); - break; - } - - return TRUE; -} - /*********************************************************************** * DllGetClassObject (msident.@) */ @@ -305,21 +285,3 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) FIXME("%s %s %p\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv); return CLASS_E_CLASSNOTAVAILABLE; } - -/*********************************************************************** - * DllRegisterServer (msident.@) - */ -HRESULT WINAPI DllRegisterServer(void) -{ - TRACE("()\n"); - return __wine_register_resources(msident_instance); -} - -/*********************************************************************** - * DllUnregisterServer (msident.@) - */ -HRESULT WINAPI DllUnregisterServer(void) -{ - TRACE("()\n"); - return __wine_unregister_resources(msident_instance); -} diff --git a/dlls/msimtf/main.c b/dlls/msimtf/main.c index 82c30fcaddc..8fc1a50dd0a 100644 --- a/dlls/msimtf/main.c +++ b/dlls/msimtf/main.c @@ -35,23 +35,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(msimtf); extern HRESULT ActiveIMMApp_Constructor(IUnknown *punkOuter, IUnknown **ppOut); -static HINSTANCE msimtf_instance; - -/****************************************************************** - * DllMain (msimtf.@) - */ -BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv) -{ - switch(fdwReason) - { - case DLL_PROCESS_ATTACH: - msimtf_instance = hInstDLL; - DisableThreadLibraryCalls(hInstDLL); - break; - } - return TRUE; -} - typedef struct { IClassFactory IClassFactory_iface; @@ -143,19 +126,3 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) FIXME("(%s %s %p)\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv); return CLASS_E_CLASSNOTAVAILABLE; } - -/*********************************************************************** - * DllRegisterServer (msimtf.@) - */ -HRESULT WINAPI DllRegisterServer(void) -{ - return __wine_register_resources( msimtf_instance ); -} - -/*********************************************************************** - * DllUnregisterServer (msimtf.@) - */ -HRESULT WINAPI DllUnregisterServer(void) -{ - return __wine_unregister_resources( msimtf_instance ); -} diff --git a/dlls/msisip/msisip.spec b/dlls/msisip/msisip.spec index cfe829249cb..dda78c544d4 100644 --- a/dlls/msisip/msisip.spec +++ b/dlls/msisip/msisip.spec @@ -4,5 +4,5 @@ 8 stub MsiSIPRemoveSignedDataMsg 9 stub MsiSIPCreateIndirectData 10 stub MsiSIPVerifyIndirectData -11 stdcall DllRegisterServer() -12 stdcall DllUnregisterServer() +11 stdcall -private DllRegisterServer() +12 stdcall -private DllUnregisterServer() diff --git a/dlls/msisys.ocx/msisys.c b/dlls/msisys.ocx/msisys.c index 4d3b8390fdb..e97263bde86 100644 --- a/dlls/msisys.ocx/msisys.c +++ b/dlls/msisys.ocx/msisys.c @@ -41,23 +41,3 @@ HRESULT WINAPI DllGetClassObject(REFCLSID pclsid, REFIID piid, LPVOID *ppv) return CLASS_E_CLASSNOTAVAILABLE; } - -/*********************************************************************** - * DllRegisterServer (MSISYS.@) - */ - -HRESULT WINAPI DllRegisterServer( void ) -{ - FIXME( "(): stub\n" ); - return E_FAIL; -} - -/*********************************************************************** - * DllUnregisterServer (MSISYS.@) - */ - -HRESULT WINAPI DllUnregisterServer( void ) -{ - FIXME( "(): stub\n" ); - return E_FAIL; -} diff --git a/dlls/msscript.ocx/msscript.c b/dlls/msscript.ocx/msscript.c index 29b3c374abc..a760af23016 100644 --- a/dlls/msscript.ocx/msscript.c +++ b/dlls/msscript.ocx/msscript.c @@ -189,8 +189,6 @@ struct ScriptControl { ScriptError *error; }; -static HINSTANCE msscript_instance; - typedef enum tid_t { IScriptControl_tid, IScriptError_tid, @@ -4014,7 +4012,6 @@ BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, void *reserved) switch(reason) { case DLL_PROCESS_ATTACH: - msscript_instance = instance; DisableThreadLibraryCalls(instance); break; case DLL_PROCESS_DETACH: @@ -4088,21 +4085,3 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) FIXME("%s %s %p\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv); return CLASS_E_CLASSNOTAVAILABLE; } - -/*********************************************************************** - * DllRegisterServer (msscript.ocx.@) - */ -HRESULT WINAPI DllRegisterServer(void) -{ - TRACE("()\n"); - return __wine_register_resources(msscript_instance); -} - -/*********************************************************************** - * DllUnregisterServer (msscript.ocx.@) - */ -HRESULT WINAPI DllUnregisterServer(void) -{ - TRACE("()\n"); - return __wine_unregister_resources(msscript_instance); -} diff --git a/dlls/mssign32/mssign32.spec b/dlls/mssign32/mssign32.spec index d4ea5a25caf..ea54dca459f 100644 --- a/dlls/mssign32/mssign32.spec +++ b/dlls/mssign32/mssign32.spec @@ -1,5 +1,5 @@ -@ stub DllRegisterServer -@ stub DllUnregisterServer +@ stdcall -private DllRegisterServer() +@ stdcall -private DllUnregisterServer() @ stub FreeCryptProvFromCert @ stub GetCryptProvFromCert @ stdcall PvkFreeCryptProv(ptr wstr long wstr) diff --git a/dlls/mssip32/Makefile.in b/dlls/mssip32/Makefile.in index 02ba8071ef2..3ab53d6f6fb 100644 --- a/dlls/mssip32/Makefile.in +++ b/dlls/mssip32/Makefile.in @@ -1,6 +1,3 @@ MODULE = mssip32.dll -EXTRADLLFLAGS = -mno-cygwin -Wb,--prefer-native - -C_SRCS = \ - main.c +EXTRADLLFLAGS = -Wb,--prefer-native diff --git a/dlls/mssip32/main.c b/dlls/mssip32/main.c deleted file mode 100644 index a4d21b7cdd3..00000000000 --- a/dlls/mssip32/main.c +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2008 Maarten Lankhorst - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include - -#include "windef.h" -#include "winbase.h" -#include "wine/debug.h" - -WINE_DEFAULT_DEBUG_CHANNEL(mssip32); - -/***************************************************** - * DllRegisterServer (MSSIP32.@) - */ -HRESULT WINAPI DllRegisterServer(void) -{ - FIXME("Not implemented.\n"); - return E_UNEXPECTED; -} - -/***************************************************** - * DllUnregisterServer (MSSIP32.@) - */ -HRESULT WINAPI DllUnregisterServer(void) -{ - FIXME("Not implemented.\n"); - return E_UNEXPECTED; -} diff --git a/dlls/mstask/mstask_main.c b/dlls/mstask/mstask_main.c index b028b151e8f..481c26e9c2e 100644 --- a/dlls/mstask/mstask_main.c +++ b/dlls/mstask/mstask_main.c @@ -32,24 +32,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(mstask); -static HINSTANCE hInst; LONG dll_ref = 0; -BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) -{ - TRACE("(%p, %d, %p)\n", hinstDLL, fdwReason, lpvReserved); - - switch (fdwReason) - { - case DLL_PROCESS_ATTACH: - DisableThreadLibraryCalls(hinstDLL); - hInst = hinstDLL; - break; - } - - return TRUE; -} - HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID iid, LPVOID *ppv) { TRACE("(%s %s %p)\n", debugstr_guid(rclsid), debugstr_guid(iid), ppv); @@ -67,16 +51,6 @@ HRESULT WINAPI DllCanUnloadNow(void) return dll_ref != 0 ? S_FALSE : S_OK; } -HRESULT WINAPI DllRegisterServer(void) -{ - return __wine_register_resources( hInst ); -} - -HRESULT WINAPI DllUnregisterServer(void) -{ - return __wine_unregister_resources( hInst ); -} - DWORD WINAPI NetrJobAdd_wrapper(ATSVC_HANDLE server_name, LPAT_INFO info, LPDWORD jobid) { return NetrJobAdd(server_name, info, jobid); diff --git a/dlls/msxml/Makefile.in b/dlls/msxml/Makefile.in index 5ac35ccace8..b43593d5629 100644 --- a/dlls/msxml/Makefile.in +++ b/dlls/msxml/Makefile.in @@ -1,9 +1,5 @@ MODULE = msxml.dll -EXTRADLLFLAGS = -mno-cygwin - -C_SRCS = main.c - IDL_SRCS = msxml_tlb.idl RC_SRCS = rsrc.rc diff --git a/dlls/msxml/main.c b/dlls/msxml/main.c deleted file mode 100644 index c4d6862b526..00000000000 --- a/dlls/msxml/main.c +++ /dev/null @@ -1,55 +0,0 @@ -/* - * MSXML implementation - * - * Copyright 2010 Alexandre Julliard - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include -#include "windef.h" -#include "winbase.h" -#include "objbase.h" -#include "rpcproxy.h" - -static HINSTANCE instance; - -BOOL WINAPI DllMain(HINSTANCE hinstance, DWORD reason, LPVOID reserved) -{ - switch (reason) - { - case DLL_PROCESS_ATTACH: - instance = hinstance; - DisableThreadLibraryCalls(hinstance); - break; - } - return TRUE; -} - -/*********************************************************************** - * DllRegisterServer (MSXML.@) - */ -HRESULT WINAPI DllRegisterServer(void) -{ - return __wine_register_resources( instance ); -} - -/*********************************************************************** - * DllUnregisterServer (MSXML.@) - */ -HRESULT WINAPI DllUnregisterServer(void) -{ - return __wine_unregister_resources( instance ); -} diff --git a/dlls/msxml2/Makefile.in b/dlls/msxml2/Makefile.in index bdbc834a42f..b3fefc35507 100644 --- a/dlls/msxml2/Makefile.in +++ b/dlls/msxml2/Makefile.in @@ -1,7 +1,3 @@ MODULE = msxml2.dll -EXTRADLLFLAGS = -mno-cygwin - -C_SRCS = main.c - IDL_SRCS = msxml2_tlb.idl diff --git a/dlls/msxml2/main.c b/dlls/msxml2/main.c deleted file mode 100644 index f96d4b57002..00000000000 --- a/dlls/msxml2/main.c +++ /dev/null @@ -1,55 +0,0 @@ -/* - * MSXML2 implementation - * - * Copyright 2010 Alexandre Julliard - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include -#include "windef.h" -#include "winbase.h" -#include "objbase.h" -#include "rpcproxy.h" - -static HINSTANCE instance; - -BOOL WINAPI DllMain(HINSTANCE hinstance, DWORD reason, LPVOID reserved) -{ - switch (reason) - { - case DLL_PROCESS_ATTACH: - instance = hinstance; - DisableThreadLibraryCalls(hinstance); - break; - } - return TRUE; -} - -/*********************************************************************** - * DllRegisterServer (MSXML2.@) - */ -HRESULT WINAPI DllRegisterServer(void) -{ - return __wine_register_resources( instance ); -} - -/*********************************************************************** - * DllUnregisterServer (MSXML2.@) - */ -HRESULT WINAPI DllUnregisterServer(void) -{ - return __wine_unregister_resources( instance ); -} diff --git a/dlls/msxml3/main.c b/dlls/msxml3/main.c index 7ae04fa12e6..11781a1ca2d 100644 --- a/dlls/msxml3/main.c +++ b/dlls/msxml3/main.c @@ -467,19 +467,3 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID reserved) } return TRUE; } - -/*********************************************************************** - * DllRegisterServer (MSXML3.@) - */ -HRESULT WINAPI DllRegisterServer(void) -{ - return __wine_register_resources( MSXML_hInstance ); -} - -/*********************************************************************** - * DllUnregisterServer (MSXML3.@) - */ -HRESULT WINAPI DllUnregisterServer(void) -{ - return __wine_unregister_resources( MSXML_hInstance ); -} diff --git a/dlls/msxml4/Makefile.in b/dlls/msxml4/Makefile.in index 2952910b8b0..8abf6683a03 100644 --- a/dlls/msxml4/Makefile.in +++ b/dlls/msxml4/Makefile.in @@ -1,11 +1,5 @@ MODULE = msxml4.dll IMPORTS = ole32 advapi32 -EXTRADLLFLAGS = -mno-cygwin - -C_SRCS = \ - main.c - IDL_SRCS = msxml4_tlb.idl - RC_SRCS = rsrc.rc diff --git a/dlls/msxml4/main.c b/dlls/msxml4/main.c deleted file mode 100644 index d90684d5f05..00000000000 --- a/dlls/msxml4/main.c +++ /dev/null @@ -1,55 +0,0 @@ -/* - * MSXML4 entry point - * - * Copyright 2010 Nikolay Sivov - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include -#include "windef.h" -#include "winbase.h" -#include "objbase.h" -#include "rpcproxy.h" - -static HINSTANCE instance; - -BOOL WINAPI DllMain(HINSTANCE hinstance, DWORD reason, LPVOID reserved) -{ - switch (reason) - { - case DLL_PROCESS_ATTACH: - instance = hinstance; - DisableThreadLibraryCalls(hinstance); - break; - } - return TRUE; -} - -/*********************************************************************** - * DllRegisterServer (MSXML4.@) - */ -HRESULT WINAPI DllRegisterServer(void) -{ - return __wine_register_resources( instance ); -} - -/*********************************************************************** - * DllUnregisterServer (MSXML4.@) - */ -HRESULT WINAPI DllUnregisterServer(void) -{ - return __wine_unregister_resources( instance ); -} diff --git a/dlls/msxml6/Makefile.in b/dlls/msxml6/Makefile.in index da4c212cac0..6cbe43af743 100644 --- a/dlls/msxml6/Makefile.in +++ b/dlls/msxml6/Makefile.in @@ -1,11 +1,5 @@ MODULE = msxml6.dll IMPORTS = oleaut32 ole32 advapi32 -EXTRADLLFLAGS = -mno-cygwin - -C_SRCS = \ - main.c - RC_SRCS = rsrc.rc - IDL_SRCS = msxml6_tlb.idl diff --git a/dlls/msxml6/main.c b/dlls/msxml6/main.c deleted file mode 100644 index c16ae63b569..00000000000 --- a/dlls/msxml6/main.c +++ /dev/null @@ -1,55 +0,0 @@ -/* - * MSXML6 entry point - * - * Copyright 2010 Nikolay Sivov for CodeWeavers - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include -#include "windef.h" -#include "winbase.h" -#include "objbase.h" -#include "rpcproxy.h" - -static HINSTANCE instance; - -BOOL WINAPI DllMain(HINSTANCE hinstance, DWORD reason, LPVOID reserved) -{ - switch (reason) - { - case DLL_PROCESS_ATTACH: - instance = hinstance; - DisableThreadLibraryCalls(hinstance); - break; - } - return TRUE; -} - -/*********************************************************************** - * DllRegisterServer (MSXML6.@) - */ -HRESULT WINAPI DllRegisterServer(void) -{ - return __wine_register_resources( instance ); -} - -/*********************************************************************** - * DllUnregisterServer (MSXML6.@) - */ -HRESULT WINAPI DllUnregisterServer(void) -{ - return __wine_unregister_resources( instance ); -} diff --git a/dlls/netcfgx/main.c b/dlls/netcfgx/main.c index 0641fb8b1f1..f8ca2b9c594 100644 --- a/dlls/netcfgx/main.c +++ b/dlls/netcfgx/main.c @@ -32,8 +32,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(netcfgx); -static HINSTANCE NETCFGX_hInstance; - typedef HRESULT (*ClassFactoryCreateInstanceFunc)(IUnknown **); typedef struct netcfgcf @@ -120,24 +118,6 @@ static const struct IClassFactoryVtbl netcfgcf_vtbl = netcfgcf_LockServer }; -BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) -{ - TRACE("(0x%p, %d, %p)\n", hinstDLL, fdwReason, lpvReserved); - - NETCFGX_hInstance = hinstDLL; - - switch (fdwReason) - { - case DLL_PROCESS_ATTACH: - DisableThreadLibraryCalls(hinstDLL); - break; - default: - break; - } - - return TRUE; -} - static netcfgcf netconfigcf = { {&netcfgcf_vtbl}, INetCfg_CreateInstance }; HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv) @@ -156,13 +136,3 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv) return IClassFactory_QueryInterface(cf, riid, ppv); } - -HRESULT WINAPI DllRegisterServer(void) -{ - return __wine_register_resources( NETCFGX_hInstance ); -} - -HRESULT WINAPI DllUnregisterServer(void) -{ - return __wine_unregister_resources( NETCFGX_hInstance ); -} diff --git a/dlls/netprofm/main.c b/dlls/netprofm/main.c index bdfa0059929..dc925049a31 100644 --- a/dlls/netprofm/main.c +++ b/dlls/netprofm/main.c @@ -29,20 +29,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(netprofm); -static HINSTANCE instance; - -BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved ) -{ - switch (reason) - { - case DLL_PROCESS_ATTACH: - instance = hinst; - DisableThreadLibraryCalls( hinst ); - break; - } - return TRUE; -} - struct netprofm_cf { IClassFactory IClassFactory_iface; @@ -130,19 +116,3 @@ HRESULT WINAPI DllGetClassObject( REFCLSID rclsid, REFIID iid, LPVOID *ppv ) if (!cf) return CLASS_E_CLASSNOTAVAILABLE; return IClassFactory_QueryInterface( cf, iid, ppv ); } - -/*********************************************************************** - * DllRegisterServer (NETPROFM.@) - */ -HRESULT WINAPI DllRegisterServer( void ) -{ - return __wine_register_resources( instance ); -} - -/*********************************************************************** - * DllUnregisterServer (NETPROFM.@) - */ -HRESULT WINAPI DllUnregisterServer( void ) -{ - return __wine_unregister_resources( instance ); -} diff --git a/dlls/objsel/objsel.c b/dlls/objsel/objsel.c index 83a845dc8eb..e42ac5ab898 100644 --- a/dlls/objsel/objsel.c +++ b/dlls/objsel/objsel.c @@ -26,23 +26,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(objsel); LONG dll_refs = 0; -static HINSTANCE hInstance; - -/*********************************************************************** - * DllEntryPoint - */ -BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad) -{ - switch(fdwReason) - { - case DLL_PROCESS_ATTACH: - hInstance = hinstDLL; - DisableThreadLibraryCalls(hInstance); - break; - } - return TRUE; -} - /*********************************************************************** * DllGetClassObject (OBJSEL.@) @@ -70,24 +53,6 @@ HRESULT WINAPI DllCanUnloadNow(void) } -/*********************************************************************** - * DllRegisterServer (OBJSEL.@) - */ -HRESULT WINAPI DllRegisterServer(void) -{ - return __wine_register_resources( hInstance ); -} - - -/*********************************************************************** - * DllUnregisterServer (OBJSEL.@) - */ -HRESULT WINAPI DllUnregisterServer(void) -{ - return __wine_unregister_resources( hInstance ); -} - - /********************************************************************** * OBJSEL_IDsObjectPicker_Destroy (also IUnknown) */ diff --git a/dlls/oledb32/main.c b/dlls/oledb32/main.c index 8a583188ab3..a4f65725e6e 100644 --- a/dlls/oledb32/main.c +++ b/dlls/oledb32/main.c @@ -165,19 +165,3 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, void **obj) return CLASS_E_CLASSNOTAVAILABLE; } - -/*********************************************************************** - * DllRegisterServer - */ -HRESULT WINAPI DllRegisterServer(void) -{ - return __wine_register_resources( instance ); -} - -/*********************************************************************** - * DllUnregisterServer - */ -HRESULT WINAPI DllUnregisterServer(void) -{ - return __wine_unregister_resources( instance ); -} diff --git a/dlls/olepro32/olepro32stubs.c b/dlls/olepro32/olepro32stubs.c index c053d4e2998..0dbbd81b9e4 100644 --- a/dlls/olepro32/olepro32stubs.c +++ b/dlls/olepro32/olepro32stubs.c @@ -30,24 +30,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(ole); -/*********************************************************************** - * DllUnregisterServer (OLEPRO32.258) - */ -HRESULT WINAPI DllUnregisterServer(void) -{ - FIXME("stub\n"); - return S_OK; -} - -/*********************************************************************** - * DllRegisterServer (OLEPRO32.257) - */ -HRESULT WINAPI DllRegisterServer(void) -{ - FIXME("stub\n"); - return S_OK; -} - /*********************************************************************** * DllGetClassObject (OLEPRO32.@) */ diff --git a/dlls/opcservices/factory.c b/dlls/opcservices/factory.c index d683c36bdd0..eb0455828f3 100644 --- a/dlls/opcservices/factory.c +++ b/dlls/opcservices/factory.c @@ -481,28 +481,3 @@ HRESULT WINAPI DllGetClassObject(REFCLSID clsid, REFIID iid, void **out) WARN("Unsupported class %s.\n", debugstr_guid(clsid)); return E_NOTIMPL; } - -static HINSTANCE OPC_hInstance; - -BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD reason, void *reserved) -{ - OPC_hInstance = hInstDLL; - - switch (reason) - { - case DLL_PROCESS_ATTACH: - DisableThreadLibraryCalls(hInstDLL); - break; - } - return TRUE; -} - -HRESULT WINAPI DllRegisterServer(void) -{ - return __wine_register_resources( OPC_hInstance ); -} - -HRESULT WINAPI DllUnregisterServer(void) -{ - return __wine_unregister_resources( OPC_hInstance ); -} diff --git a/dlls/packager/packager_main.c b/dlls/packager/packager_main.c index 0bece9bebaa..591664371a1 100644 --- a/dlls/packager/packager_main.c +++ b/dlls/packager/packager_main.c @@ -33,8 +33,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(packager); -static HINSTANCE g_instance; - struct Package { IOleObject IOleObject_iface; IPersistStorage IPersistStorage_iface; @@ -647,27 +645,3 @@ HRESULT WINAPI DllGetClassObject(REFCLSID clsid, REFIID iid, void **obj) return CLASS_E_CLASSNOTAVAILABLE; } - -HRESULT WINAPI DllRegisterServer(void) -{ - return __wine_register_resources(g_instance); -} - -HRESULT WINAPI DllUnregisterServer(void) -{ - return __wine_unregister_resources(g_instance); -} - -BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, void *reserved) -{ - TRACE("(%p, %u, %p)\n", instance, reason, reserved); - - switch(reason){ - case DLL_PROCESS_ATTACH: - g_instance = instance; - DisableThreadLibraryCalls(instance); - break; - } - - return TRUE; -} diff --git a/dlls/photometadatahandler/photometadatahandler.spec b/dlls/photometadatahandler/photometadatahandler.spec index b4eb88b4859..a9b7505d360 100644 --- a/dlls/photometadatahandler/photometadatahandler.spec +++ b/dlls/photometadatahandler/photometadatahandler.spec @@ -1,4 +1,4 @@ @ stdcall -private DllCanUnloadNow() @ stub DllGetClassObject -@ stub DllRegisterServer -@ stub DllUnregisterServer +@ stdcall -private DllRegisterServer() +@ stdcall -private DllUnregisterServer() diff --git a/dlls/prntvpt/prntvpt.spec b/dlls/prntvpt/prntvpt.spec index 374045d18c1..bc0fe2a88b6 100644 --- a/dlls/prntvpt/prntvpt.spec +++ b/dlls/prntvpt/prntvpt.spec @@ -15,8 +15,8 @@ @ stdcall -private DllCanUnloadNow() @ stub DllGetClassObject @ stdcall -private DllMain(long long ptr) -@ stub DllRegisterServer -@ stub DllUnregisterServer +@ stdcall -private DllRegisterServer() +@ stdcall -private DllUnregisterServer() @ stub GetDeviceDefaultPrintTicketThunk @ stub GetDeviceNamespacesThunk @ stub GetPrintCapabilitiesThunk2 diff --git a/dlls/propsys/propsys_main.c b/dlls/propsys/propsys_main.c index edc9b7b4176..06150dfad12 100644 --- a/dlls/propsys/propsys_main.c +++ b/dlls/propsys/propsys_main.c @@ -34,33 +34,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(propsys); -static HINSTANCE propsys_hInstance; - -BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) -{ - TRACE("(0x%p, %d, %p)\n", hinstDLL, fdwReason, lpvReserved); - - switch (fdwReason) - { - case DLL_PROCESS_ATTACH: - propsys_hInstance = hinstDLL; - DisableThreadLibraryCalls(hinstDLL); - break; - } - - return TRUE; -} - -HRESULT WINAPI DllRegisterServer(void) -{ - return __wine_register_resources( propsys_hInstance ); -} - -HRESULT WINAPI DllUnregisterServer(void) -{ - return __wine_unregister_resources( propsys_hInstance ); -} - static HRESULT WINAPI ClassFactory_QueryInterface(IClassFactory *iface, REFIID riid, void **ppv) { *ppv = NULL; diff --git a/dlls/pstorec/pstorec.c b/dlls/pstorec/pstorec.c index 96366df9327..8d0293d7e44 100644 --- a/dlls/pstorec/pstorec.c +++ b/dlls/pstorec/pstorec.c @@ -355,18 +355,6 @@ HRESULT WINAPI PStoreCreateInstance( IPStore** ppProvider, return S_OK; } -HRESULT WINAPI DllRegisterServer(void) -{ - FIXME("\n"); - return S_OK; -} - -HRESULT WINAPI DllUnregisterServer(void) -{ - FIXME("\n"); - return S_OK; -} - /*********************************************************************** * DllGetClassObject (PSTOREC.@) */ diff --git a/dlls/qasf/qasf_main.c b/dlls/qasf/qasf_main.c index d4cc65e5e4b..4e8319c34b1 100644 --- a/dlls/qasf/qasf_main.c +++ b/dlls/qasf/qasf_main.c @@ -22,8 +22,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(qasf); -static HINSTANCE qasf_instance; - struct class_factory { IClassFactory IClassFactory_iface; @@ -106,7 +104,6 @@ BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, void *reserved) if (reason == DLL_PROCESS_ATTACH) { DisableThreadLibraryCalls(instance); - qasf_instance = instance; } else if (reason == DLL_PROCESS_DETACH && !reserved) { @@ -127,13 +124,3 @@ HRESULT WINAPI DllGetClassObject(REFCLSID clsid, REFIID iid, void **out) FIXME("%s not available, returning CLASS_E_CLASSNOTAVAILABLE.\n", debugstr_guid(clsid)); return CLASS_E_CLASSNOTAVAILABLE; } - -HRESULT WINAPI DllRegisterServer(void) -{ - return __wine_register_resources(qasf_instance); -} - -HRESULT WINAPI DllUnregisterServer(void) -{ - return __wine_unregister_resources(qasf_instance); -} diff --git a/dlls/qdvd/qdvd_main.c b/dlls/qdvd/qdvd_main.c index 58b9cd2a401..2c6430e9393 100644 --- a/dlls/qdvd/qdvd_main.c +++ b/dlls/qdvd/qdvd_main.c @@ -23,8 +23,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(qdvd); -static HINSTANCE qdvd_instance; - struct class_factory { IClassFactory IClassFactory_iface; @@ -102,16 +100,6 @@ static const IClassFactoryVtbl class_factory_vtbl = static struct class_factory graph_builder_cf = {{&class_factory_vtbl}, graph_builder_create}; static struct class_factory navigator_cf = {{&class_factory_vtbl}, navigator_create}; -BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, void *reserved) -{ - if (reason == DLL_PROCESS_ATTACH) - { - qdvd_instance = instance; - DisableThreadLibraryCalls(instance); - } - return TRUE; -} - HRESULT WINAPI DllGetClassObject(REFCLSID clsid, REFIID iid, void **out) { TRACE("clsid %s, iid %s, out %p.\n", debugstr_guid(clsid), debugstr_guid(iid), out); @@ -124,13 +112,3 @@ HRESULT WINAPI DllGetClassObject(REFCLSID clsid, REFIID iid, void **out) FIXME("%s not available, returning CLASS_E_CLASSNOTAVAILABLE.\n", debugstr_guid(clsid)); return CLASS_E_CLASSNOTAVAILABLE; } - -HRESULT WINAPI DllRegisterServer(void) -{ - return __wine_register_resources(qdvd_instance); -} - -HRESULT WINAPI DllUnregisterServer(void) -{ - return __wine_unregister_resources(qdvd_instance); -} diff --git a/dlls/qmgr/Makefile.in b/dlls/qmgr/Makefile.in index d01f50e3b79..7359f9d357e 100644 --- a/dlls/qmgr/Makefile.in +++ b/dlls/qmgr/Makefile.in @@ -10,7 +10,6 @@ C_SRCS = \ file.c \ job.c \ qmgr.c \ - qmgr_main.c \ service.c RC_SRCS = rsrc.rc diff --git a/dlls/qmgr/qmgr_main.c b/dlls/qmgr/qmgr_main.c deleted file mode 100644 index 2c48b4cc09e..00000000000 --- a/dlls/qmgr/qmgr_main.c +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Main DLL interface to Queue Manager (BITS) - * - * Background Intelligent Transfer Service (BITS) interface. Dll is named - * qmgr for backwards compatibility with early versions of BITS. - * - * Copyright 2007 Google (Roy Shea) - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include - -#define COBJMACROS -#include "objbase.h" -#include "winuser.h" -#include "winreg.h" -#include "advpub.h" -#include "olectl.h" -#include "rpcproxy.h" -#include "winsvc.h" -#include "qmgr.h" - -#include "wine/debug.h" - -WINE_DEFAULT_DEBUG_CHANNEL(qmgr); - -/* Handle to the base address of this DLL */ -static HINSTANCE hInst; - -/* Entry point for DLL */ -BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) -{ - TRACE("(%p, %d, %p)\n", hinstDLL, fdwReason, lpvReserved); - - switch (fdwReason) - { - case DLL_PROCESS_ATTACH: - DisableThreadLibraryCalls(hinstDLL); - hInst = hinstDLL; - break; - } - - return TRUE; -} - -HRESULT WINAPI DllRegisterServer(void) -{ - return __wine_register_resources(hInst); -} - -HRESULT WINAPI DllUnregisterServer(void) -{ - return __wine_unregister_resources(hInst); -} diff --git a/dlls/query/query.spec b/dlls/query/query.spec index 71b987492fb..3d351af44f5 100644 --- a/dlls/query/query.spec +++ b/dlls/query/query.spec @@ -21,7 +21,7 @@ @ stdcall -private DllCanUnloadNow() @ stdcall -private DllGetClassObject(ptr ptr ptr) @ stdcall -private DllRegisterServer() -# @ stdcall -private DllUnregisterServer() +@ stdcall -private DllUnregisterServer() @ stub DoneCIISAPIPerformanceData @ stub DoneCIPerformanceData @ stub DoneFILTERPerformanceData diff --git a/dlls/query/query_main.c b/dlls/query/query_main.c index 002ef5c34e9..cc1eac596c7 100644 --- a/dlls/query/query_main.c +++ b/dlls/query/query_main.c @@ -46,12 +46,6 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID iid, LPVOID *ppv) return CLASS_E_CLASSNOTAVAILABLE; } -HRESULT WINAPI DllRegisterServer(void) -{ - FIXME("\n"); - return S_OK; -} - HRESULT WINAPI CIState( WCHAR const *pwcsCat, WCHAR const *pwcsMachine, CI_STATE *pCiState) { FIXME("%s %s %p\n", debugstr_w(pwcsCat), debugstr_w(pwcsMachine), pCiState); diff --git a/dlls/rpcrt4/rpcrt4_main.c b/dlls/rpcrt4/rpcrt4_main.c index 57e33673c7a..d5ba8c82c05 100644 --- a/dlls/rpcrt4/rpcrt4_main.c +++ b/dlls/rpcrt4/rpcrt4_main.c @@ -670,16 +670,6 @@ RPC_STATUS WINAPI UuidFromStringW(RPC_WSTR s, UUID *uuid) return RPC_S_OK; } -/*********************************************************************** - * DllRegisterServer (RPCRT4.@) - */ - -HRESULT WINAPI DllRegisterServer( void ) -{ - FIXME( "(): stub\n" ); - return S_OK; -} - #define MAX_RPC_ERROR_TEXT 256 /****************************************************************************** diff --git a/dlls/rsaenh/rsaenh.c b/dlls/rsaenh/rsaenh.c index 38c48318641..705419526fe 100644 --- a/dlls/rsaenh/rsaenh.c +++ b/dlls/rsaenh/rsaenh.c @@ -38,8 +38,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(crypt); -static HINSTANCE instance; - /****************************************************************************** * CRYPTHASH - hash objects */ @@ -360,7 +358,6 @@ BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD fdwReason, PVOID reserved) switch (fdwReason) { case DLL_PROCESS_ATTACH: - instance = hInstance; DisableThreadLibraryCalls(hInstance); init_handle_table(&handle_table); break; @@ -4934,19 +4931,3 @@ cleanup: HeapFree(GetProcessHeap(), 0, pbDecrypted); return res; } - -/****************************************************************************** - * DllRegisterServer (RSAENH.@) - */ -HRESULT WINAPI DllRegisterServer(void) -{ - return __wine_register_resources( instance ); -} - -/****************************************************************************** - * DllUnregisterServer (RSAENH.@) - */ -HRESULT WINAPI DllUnregisterServer(void) -{ - return __wine_unregister_resources( instance ); -} diff --git a/dlls/sapi/main.c b/dlls/sapi/main.c index 4ce139bb485..d83d2257186 100644 --- a/dlls/sapi/main.c +++ b/dlls/sapi/main.c @@ -38,8 +38,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(sapi); -static HINSTANCE hinstance; - struct class_factory { IClassFactory IClassFactory_iface; @@ -144,31 +142,3 @@ HRESULT WINAPI DllGetClassObject( REFCLSID clsid, REFIID iid, void **obj ) return IClassFactory_QueryInterface( cf, iid, obj ); } - -BOOL WINAPI DllMain( HINSTANCE dll, DWORD reason, LPVOID reserved ) -{ - switch (reason) - { - case DLL_PROCESS_ATTACH: - hinstance = dll; - DisableThreadLibraryCalls( dll ); - break; - } - return TRUE; -} - -/*********************************************************************** - * DllRegisterServer - */ -HRESULT WINAPI DllRegisterServer( void ) -{ - return __wine_register_resources( hinstance ); -} - -/*********************************************************************** - * DllUnregisterServer - */ -HRESULT WINAPI DllUnregisterServer( void ) -{ - return __wine_unregister_resources( hinstance ); -} diff --git a/dlls/sccbase/Makefile.in b/dlls/sccbase/Makefile.in index 605bd958a20..7702f74134d 100644 --- a/dlls/sccbase/Makefile.in +++ b/dlls/sccbase/Makefile.in @@ -1,6 +1,3 @@ MODULE = sccbase.dll -EXTRADLLFLAGS = -mno-cygwin -Wb,--prefer-native - -C_SRCS = \ - main.c +EXTRADLLFLAGS = -Wb,--prefer-native diff --git a/dlls/sccbase/main.c b/dlls/sccbase/main.c deleted file mode 100644 index f1325cf4341..00000000000 --- a/dlls/sccbase/main.c +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2008 Maarten Lankhorst - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include - -#include "windef.h" -#include "winbase.h" -#include "wine/debug.h" - -WINE_DEFAULT_DEBUG_CHANNEL(sccbase); - -/***************************************************** - * DllRegisterServer (SCCBASE.@) - */ -HRESULT WINAPI DllRegisterServer(void) -{ - FIXME("Not implemented.\n"); - return E_UNEXPECTED; -} - -/***************************************************** - * DllUnregisterServer (SCCBASE.@) - */ -HRESULT WINAPI DllUnregisterServer(void) -{ - FIXME("Not implemented.\n"); - return E_UNEXPECTED; -} diff --git a/dlls/scrobj/scrobj.c b/dlls/scrobj/scrobj.c index 10276de6f6a..228cfb14904 100644 --- a/dlls/scrobj/scrobj.c +++ b/dlls/scrobj/scrobj.c @@ -2372,24 +2372,6 @@ BOOL WINAPI DllMain(HINSTANCE hinst, DWORD reason, void *reserved) return TRUE; } -/*********************************************************************** - * DllRegisterServer (scrobj.@) - */ -HRESULT WINAPI DllRegisterServer(void) -{ - TRACE("()\n"); - return __wine_register_resources(scrobj_instance); -} - -/*********************************************************************** - * DllUnregisterServer (scrobj.@) - */ -HRESULT WINAPI DllUnregisterServer(void) -{ - TRACE("()\n"); - return __wine_unregister_resources(scrobj_instance); -} - /*********************************************************************** * DllInstall (scrobj.@) */ diff --git a/dlls/scrrun/scrrun.c b/dlls/scrrun/scrrun.c index 1ce70830a42..7f39d0e642a 100644 --- a/dlls/scrrun/scrrun.c +++ b/dlls/scrrun/scrrun.c @@ -33,8 +33,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(scrrun); -static HINSTANCE scrrun_instance; - static inline struct provideclassinfo *impl_from_IProvideClassInfo(IProvideClassInfo *iface) { return CONTAINING_RECORD(iface, struct provideclassinfo, IProvideClassInfo_iface); @@ -244,7 +242,6 @@ BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved ) { case DLL_PROCESS_ATTACH: DisableThreadLibraryCalls( hinst ); - scrrun_instance = hinst; break; case DLL_PROCESS_DETACH: if (reserved) break; @@ -254,24 +251,6 @@ BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved ) return TRUE; } -/*********************************************************************** - * DllRegisterServer (scrrun.@) - */ -HRESULT WINAPI DllRegisterServer(void) -{ - TRACE("()\n"); - return __wine_register_resources(scrrun_instance); -} - -/*********************************************************************** - * DllUnregisterServer (scrrun.@) - */ -HRESULT WINAPI DllUnregisterServer(void) -{ - TRACE("()\n"); - return __wine_unregister_resources(scrrun_instance); -} - /*********************************************************************** * DllGetClassObject (scrrun.@) */ diff --git a/dlls/shdocvw/shdocvw_main.c b/dlls/shdocvw/shdocvw_main.c index 8c5dd8279c7..a641bd92a73 100644 --- a/dlls/shdocvw/shdocvw_main.c +++ b/dlls/shdocvw/shdocvw_main.c @@ -86,24 +86,6 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, void **ppv) return SHDOCVW_GetShellInstanceObjectClassObject(rclsid, riid, ppv); } -/*********************************************************************** - * DllRegisterServer (shdocvw.@) - */ -HRESULT WINAPI DllRegisterServer(void) -{ - TRACE("\n"); - return S_OK; -} - -/*********************************************************************** - * DllUnregisterServer (shdocvw.@) - */ -HRESULT WINAPI DllUnregisterServer(void) -{ - TRACE("\n"); - return S_OK; -} - /****************************************************************** * IEWinMain (SHDOCVW.101) * diff --git a/dlls/slbcsp/Makefile.in b/dlls/slbcsp/Makefile.in index ff6a0f1dc14..9a78210c72f 100644 --- a/dlls/slbcsp/Makefile.in +++ b/dlls/slbcsp/Makefile.in @@ -1,6 +1,3 @@ MODULE = slbcsp.dll -EXTRADLLFLAGS = -mno-cygwin -Wb,--prefer-native - -C_SRCS = \ - main.c +EXTRADLLFLAGS = -Wb,--prefer-native diff --git a/dlls/slbcsp/main.c b/dlls/slbcsp/main.c deleted file mode 100644 index 2dbe26bee03..00000000000 --- a/dlls/slbcsp/main.c +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2008 Maarten Lankhorst - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include - -#include "windef.h" -#include "winbase.h" -#include "wine/debug.h" - -WINE_DEFAULT_DEBUG_CHANNEL(slbcsp); - -/***************************************************** - * DllRegisterServer (SLBCSP.@) - */ -HRESULT WINAPI DllRegisterServer(void) -{ - FIXME("Not implemented.\n"); - return E_UNEXPECTED; -} - -/***************************************************** - * DllUnregisterServer (SLBCSP.@) - */ -HRESULT WINAPI DllUnregisterServer(void) -{ - FIXME("Not implemented.\n"); - return E_UNEXPECTED; -} diff --git a/dlls/taskschd/taskschd.c b/dlls/taskschd/taskschd.c index cbb58b02f14..6d47a4ee1e9 100644 --- a/dlls/taskschd/taskschd.c +++ b/dlls/taskschd/taskschd.c @@ -33,8 +33,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(taskschd); -static HINSTANCE schd_instance; - typedef struct { IClassFactory IClassFactory_iface; @@ -114,21 +112,6 @@ static const struct IClassFactoryVtbl factory_vtbl = static TaskScheduler_factory TaskScheduler_cf = { { &factory_vtbl }, TaskService_create }; -/****************************************************************** - * DllMain - */ -BOOL WINAPI DllMain(HINSTANCE hinst, DWORD reason, LPVOID reserved) -{ - switch (reason) - { - case DLL_PROCESS_ATTACH: - schd_instance = hinst; - DisableThreadLibraryCalls(hinst); - break; - } - return TRUE; -} - /*********************************************************************** * DllGetClassObject */ @@ -152,19 +135,3 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *obj) FIXME("class %s/%s is not implemented\n", debugstr_guid(rclsid), debugstr_guid(riid)); return CLASS_E_CLASSNOTAVAILABLE; } - -/*********************************************************************** - * DllRegisterServer - */ -HRESULT WINAPI DllRegisterServer(void) -{ - return __wine_register_resources(schd_instance); -} - -/*********************************************************************** - * DllUnregisterServer - */ -HRESULT WINAPI DllUnregisterServer(void) -{ - return __wine_unregister_resources(schd_instance); -} diff --git a/dlls/uianimation/main.c b/dlls/uianimation/main.c index 5080f27aae5..be09256d2fa 100644 --- a/dlls/uianimation/main.c +++ b/dlls/uianimation/main.c @@ -36,22 +36,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(uianimation); -static HINSTANCE hinstance; - -BOOL WINAPI DllMain( HINSTANCE dll, DWORD reason, LPVOID reserved ) -{ - TRACE("(%p %d %p)\n", dll, reason, reserved); - - switch (reason) - { - case DLL_PROCESS_ATTACH: - hinstance = dll; - DisableThreadLibraryCalls( dll ); - break; - } - return TRUE; -} - struct class_factory { IClassFactory IClassFactory_iface; @@ -1198,19 +1182,3 @@ HRESULT WINAPI DllGetClassObject( REFCLSID clsid, REFIID iid, void **obj ) return IClassFactory_QueryInterface( cf, iid, obj ); } - -/*********************************************************************** - * DllRegisterServer - */ -HRESULT WINAPI DllRegisterServer( void ) -{ - return __wine_register_resources( hinstance ); -} - -/*********************************************************************** - * DllUnregisterServer - */ -HRESULT WINAPI DllUnregisterServer( void ) -{ - return __wine_unregister_resources( hinstance ); -} diff --git a/dlls/uiautomationcore/uiautomationcore.spec b/dlls/uiautomationcore/uiautomationcore.spec index 038a173a6fd..c9b96ab39ef 100644 --- a/dlls/uiautomationcore/uiautomationcore.spec +++ b/dlls/uiautomationcore/uiautomationcore.spec @@ -1,7 +1,7 @@ @ stdcall -private DllCanUnloadNow() @ stub DllGetClassObject -@ stub DllRegisterServer -@ stub DllUnregisterServer +@ stdcall -private DllRegisterServer() +@ stdcall -private DllUnregisterServer() @ stub DockPattern_SetDockPosition @ stub ExpandCollapsePattern_Collapse @ stub ExpandCollapsePattern_Expand diff --git a/dlls/uiribbon/main.c b/dlls/uiribbon/main.c index eea69f88e2b..b7749ae4710 100644 --- a/dlls/uiribbon/main.c +++ b/dlls/uiribbon/main.c @@ -39,23 +39,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(uiribbon); -static HINSTANCE instance; - -BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpvReserved) -{ - TRACE("(0x%p, %d, %p)\n", hInstDLL, fdwReason, lpvReserved); - - switch (fdwReason) - { - case DLL_PROCESS_ATTACH: - instance = hInstDLL; - DisableThreadLibraryCalls(hInstDLL); - break; - } - - return TRUE; -} - typedef struct { IClassFactory IClassFactory_iface; @@ -196,13 +179,3 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, void **ppv) *ppv = &(factory->IClassFactory_iface); return S_OK; } - -HRESULT WINAPI DllRegisterServer(void) -{ - return __wine_register_resources( instance ); -} - -HRESULT WINAPI DllUnregisterServer(void) -{ - return __wine_unregister_resources( instance ); -} diff --git a/dlls/vbscript/vbscript_main.c b/dlls/vbscript/vbscript_main.c index 7135bb830f5..087b387e0af 100644 --- a/dlls/vbscript/vbscript_main.c +++ b/dlls/vbscript/vbscript_main.c @@ -301,21 +301,3 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) FIXME("%s %s %p\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv); return CLASS_E_CLASSNOTAVAILABLE; } - -/*********************************************************************** - * DllRegisterServer (vbscript.@) - */ -HRESULT WINAPI DllRegisterServer(void) -{ - TRACE("()\n"); - return __wine_register_resources(vbscript_hinstance); -} - -/*********************************************************************** - * DllUnregisterServer (vbscript.@) - */ -HRESULT WINAPI DllUnregisterServer(void) -{ - TRACE("()\n"); - return __wine_unregister_resources(vbscript_hinstance); -} diff --git a/dlls/wbemdisp/main.c b/dlls/wbemdisp/main.c index 5bfa8193d71..0ceb417ad52 100644 --- a/dlls/wbemdisp/main.c +++ b/dlls/wbemdisp/main.c @@ -34,8 +34,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(wbemdisp); -static HINSTANCE instance; - static HRESULT WINAPI WinMGMTS_QueryInterface(IParseDisplayName *iface, REFIID riid, void **ppv) { if(IsEqualGUID(riid, &IID_IUnknown)) { @@ -265,19 +263,6 @@ static struct factory swbem_locator_cf = { { &factory_vtbl }, SWbemLocator_creat static struct factory swbem_namedvalueset_cf = { { &factory_vtbl }, SWbemNamedValueSet_create }; static struct factory winmgmts_cf = { { &factory_vtbl }, WinMGMTS_create }; -BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved ) -{ - - switch (reason) - { - case DLL_PROCESS_ATTACH: - instance = hinst; - DisableThreadLibraryCalls( hinst ); - break; - } - return TRUE; -} - HRESULT WINAPI DllGetClassObject( REFCLSID rclsid, REFIID iid, LPVOID *obj ) { IClassFactory *cf = NULL; @@ -295,19 +280,3 @@ HRESULT WINAPI DllGetClassObject( REFCLSID rclsid, REFIID iid, LPVOID *obj ) return IClassFactory_QueryInterface( cf, iid, obj ); } - -/*********************************************************************** - * DllRegisterServer (WBEMDISP.@) - */ -HRESULT WINAPI DllRegisterServer(void) -{ - return __wine_register_resources( instance ); -} - -/*********************************************************************** - * DllUnregisterServer (WBEMDISP.@) - */ -HRESULT WINAPI DllUnregisterServer(void) -{ - return __wine_unregister_resources( instance ); -} diff --git a/dlls/wbemprox/main.c b/dlls/wbemprox/main.c index 35127d48f47..a1c65feadb5 100644 --- a/dlls/wbemprox/main.c +++ b/dlls/wbemprox/main.c @@ -147,19 +147,3 @@ HRESULT WINAPI DllGetClassObject( REFCLSID rclsid, REFIID iid, LPVOID *ppv ) if (!cf) return CLASS_E_CLASSNOTAVAILABLE; return IClassFactory_QueryInterface( cf, iid, ppv ); } - -/*********************************************************************** - * DllRegisterServer (WBEMPROX.@) - */ -HRESULT WINAPI DllRegisterServer(void) -{ - return __wine_register_resources( instance ); -} - -/*********************************************************************** - * DllUnregisterServer (WBEMPROX.@) - */ -HRESULT WINAPI DllUnregisterServer(void) -{ - return __wine_unregister_resources( instance ); -} diff --git a/dlls/wiaservc/Makefile.in b/dlls/wiaservc/Makefile.in index e810fa23bc3..900f8d2451e 100644 --- a/dlls/wiaservc/Makefile.in +++ b/dlls/wiaservc/Makefile.in @@ -6,8 +6,7 @@ EXTRADLLFLAGS = -mno-cygwin -Wb,--prefer-native C_SRCS = \ factory.c \ service.c \ - wiadevmgr.c \ - wiaservc_main.c + wiadevmgr.c IDL_SRCS = wiaservc.idl diff --git a/dlls/wiaservc/wiaservc_main.c b/dlls/wiaservc/wiaservc_main.c deleted file mode 100644 index 3293f485158..00000000000 --- a/dlls/wiaservc/wiaservc_main.c +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Main DLL interface to WIA Device Manager - * - * Copyright 2009 Damjan Jovanovic - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include - -#include "objbase.h" -#include "winuser.h" -#include "winreg.h" -#include "advpub.h" -#include "olectl.h" -#include "rpcproxy.h" -#include "winsvc.h" - -#include "wia_lh.h" -#include "initguid.h" - -#include "wiaservc_private.h" - -#include "wine/debug.h" - -WINE_DEFAULT_DEBUG_CHANNEL(wia); - -/* Handle to the base address of this DLL */ -static HINSTANCE hInst; - -/* Entry point for DLL */ -BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) -{ - TRACE("(%p, %d, %p)\n", hinstDLL, fdwReason, lpvReserved); - - switch (fdwReason) - { - case DLL_PROCESS_ATTACH: - DisableThreadLibraryCalls(hinstDLL); - hInst = hinstDLL; - break; - } - - return TRUE; -} - -HRESULT WINAPI DllRegisterServer(void) -{ - return __wine_register_resources( hInst ); -} - -HRESULT WINAPI DllUnregisterServer(void) -{ - return __wine_unregister_resources( hInst ); -} diff --git a/dlls/winecrt0/Makefile.in b/dlls/winecrt0/Makefile.in index dcbf51099b1..45cff11233e 100644 --- a/dlls/winecrt0/Makefile.in +++ b/dlls/winecrt0/Makefile.in @@ -7,6 +7,7 @@ C_SRCS = \ delay_load.c \ dll_canunload.c \ dll_main.c \ + dll_register.c \ exception.c \ exe16_entry.c \ exe_entry.c \ diff --git a/dlls/comcat/comcat_main.c b/dlls/winecrt0/dll_register.c similarity index 61% rename from dlls/comcat/comcat_main.c rename to dlls/winecrt0/dll_register.c index 156d802efe4..3be0ea5581a 100644 --- a/dlls/comcat/comcat_main.c +++ b/dlls/winecrt0/dll_register.c @@ -1,7 +1,7 @@ /* - * exported dll functions for comcat.dll + * DllRegisterServer default implementation * - * Copyright (C) 2002-2003 John K. Hohm + * Copyright 2021 Alexandre Julliard * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -19,22 +19,29 @@ */ #include - +#define COBJMACROS #include "windef.h" #include "winbase.h" +#include "olectl.h" +#include "rpcproxy.h" + +static inline void *image_base(void) +{ +#if defined(__MINGW32__) || defined(_MSC_VER) + extern IMAGE_DOS_HEADER __ImageBase; + return (void *)&__ImageBase; +#else + extern IMAGE_NT_HEADERS __wine_spec_nt_header; + return (void *)((__wine_spec_nt_header.OptionalHeader.ImageBase + 0xffff) & ~0xffff); +#endif +} -/*********************************************************************** - * DllRegisterServer (COMCAT.@) - */ HRESULT WINAPI DllRegisterServer(void) { - return S_OK; + return __wine_register_resources( image_base() ); } -/*********************************************************************** - * DllUnregisterServer (COMCAT.@) - */ HRESULT WINAPI DllUnregisterServer(void) { - return S_OK; + return __wine_unregister_resources( image_base() ); } diff --git a/dlls/winhttp/main.c b/dlls/winhttp/main.c index a04772e80fb..e4449364386 100644 --- a/dlls/winhttp/main.c +++ b/dlls/winhttp/main.c @@ -155,19 +155,3 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) if (!cf) return CLASS_E_CLASSNOTAVAILABLE; return IClassFactory_QueryInterface( cf, riid, ppv ); } - -/*********************************************************************** - * DllRegisterServer (winhttp.@) - */ -HRESULT WINAPI DllRegisterServer(void) -{ - return __wine_register_resources( winhttp_instance ); -} - -/*********************************************************************** - * DllUnregisterServer (winhttp.@) - */ -HRESULT WINAPI DllUnregisterServer(void) -{ - return __wine_unregister_resources( winhttp_instance ); -} diff --git a/dlls/wmiutils/main.c b/dlls/wmiutils/main.c index c2409f99ba7..0b3a55be0e6 100644 --- a/dlls/wmiutils/main.c +++ b/dlls/wmiutils/main.c @@ -34,8 +34,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(wmiutils); -static HINSTANCE instance; - typedef HRESULT (*fnCreateInstance)( LPVOID *ppObj ); typedef struct @@ -113,18 +111,6 @@ static const struct IClassFactoryVtbl wmiutils_cf_vtbl = static wmiutils_cf status_code_cf = { { &wmiutils_cf_vtbl }, WbemStatusCodeText_create }; static wmiutils_cf path_cf = { { &wmiutils_cf_vtbl }, WbemPath_create }; -BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID lpv ) -{ - switch(reason) - { - case DLL_PROCESS_ATTACH: - instance = hinst; - DisableThreadLibraryCalls( hinst ); - break; - } - return TRUE; -} - HRESULT WINAPI DllGetClassObject( REFCLSID rclsid, REFIID iid, LPVOID *ppv ) { IClassFactory *cf = NULL; @@ -142,19 +128,3 @@ HRESULT WINAPI DllGetClassObject( REFCLSID rclsid, REFIID iid, LPVOID *ppv ) if (!cf) return CLASS_E_CLASSNOTAVAILABLE; return IClassFactory_QueryInterface( cf, iid, ppv ); } - -/*********************************************************************** - * DllRegisterServer (WMIUTILS.@) - */ -HRESULT WINAPI DllRegisterServer(void) -{ - return __wine_register_resources( instance ); -} - -/*********************************************************************** - * DllUnregisterServer (WMIUTILS.@) - */ -HRESULT WINAPI DllUnregisterServer(void) -{ - return __wine_unregister_resources( instance ); -} diff --git a/dlls/wmp/wmp_main.c b/dlls/wmp/wmp_main.c index 18122f54f4b..931e737e527 100644 --- a/dlls/wmp/wmp_main.c +++ b/dlls/wmp/wmp_main.c @@ -176,21 +176,3 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) FIXME("Unknown object %s\n", debugstr_guid(rclsid)); return CLASS_E_CLASSNOTAVAILABLE; } - -/*********************************************************************** - * DllRegisterServer (wmp.@) - */ -HRESULT WINAPI DllRegisterServer(void) -{ - TRACE("()\n"); - return __wine_register_resources(wmp_instance); -} - -/*********************************************************************** - * DllUnregisterServer (wmp.@) - */ -HRESULT WINAPI DllUnregisterServer(void) -{ - TRACE("()\n"); - return __wine_unregister_resources(wmp_instance); -} diff --git a/dlls/wmphoto/main.c b/dlls/wmphoto/main.c index 2c4a669dc97..5d0ff302be3 100644 --- a/dlls/wmphoto/main.c +++ b/dlls/wmphoto/main.c @@ -155,13 +155,3 @@ HRESULT WINAPI DllGetClassObject(REFCLSID clsid, REFIID iid, LPVOID *out) return IClassFactory_QueryInterface(&factory->IClassFactory_iface, iid, out); } - -HRESULT WINAPI DllRegisterServer(void) -{ - return __wine_register_resources( windowscodecs_module ); -} - -HRESULT WINAPI DllUnregisterServer(void) -{ - return __wine_unregister_resources( windowscodecs_module ); -} diff --git a/dlls/wmvcore/wmvcore_main.c b/dlls/wmvcore/wmvcore_main.c index 7d030a0e93a..5f93fc68e3b 100644 --- a/dlls/wmvcore/wmvcore_main.c +++ b/dlls/wmvcore/wmvcore_main.c @@ -25,13 +25,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(wmvcore); -HRESULT WINAPI DllRegisterServer(void) -{ - FIXME("(): stub\n"); - - return S_OK; -} - HRESULT WINAPI WMCheckURLExtension(const WCHAR *url) { FIXME("(%s): stub\n", wine_dbgstr_w(url)); diff --git a/dlls/wpc/wpc.c b/dlls/wpc/wpc.c index 1edb3e60414..bf63d4c22e9 100644 --- a/dlls/wpc/wpc.c +++ b/dlls/wpc/wpc.c @@ -26,8 +26,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(wpc); -static HINSTANCE wpc_instance; - static HRESULT WINAPI WindowsParentalControls_QueryInterface(IWindowsParentalControls *iface, REFIID riid, void **ppv) { if(IsEqualGUID(riid, &IID_IUnknown)) { @@ -158,23 +156,6 @@ static const IClassFactoryVtbl WPCFactoryVtbl = { static IClassFactory WPCFactory = { &WPCFactoryVtbl }; -/****************************************************************** - * DllMain - */ -BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv) -{ - TRACE("(%p %d %p)\n", hInstDLL, fdwReason, lpv); - - switch(fdwReason) { - case DLL_PROCESS_ATTACH: - DisableThreadLibraryCalls(hInstDLL); - wpc_instance = hInstDLL; - break; - } - - return TRUE; -} - /*********************************************************************** * DllGetClassObject (wpc.@) */ @@ -188,21 +169,3 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, void **ppv) FIXME("Unknown object %s (iface %s)\n", debugstr_guid(rclsid), debugstr_guid(riid)); return CLASS_E_CLASSNOTAVAILABLE; } - -/*********************************************************************** - * DllRegisterServer (wpc.@) - */ -HRESULT WINAPI DllRegisterServer(void) -{ - TRACE("()\n"); - return __wine_register_resources(wpc_instance); -} - -/*********************************************************************** - * DllUnregisterServer (wpc.@) - */ -HRESULT WINAPI DllUnregisterServer(void) -{ - TRACE("()\n"); - return __wine_unregister_resources(wpc_instance); -} diff --git a/dlls/wshom.ocx/wshom_main.c b/dlls/wshom.ocx/wshom_main.c index b0056ad953e..0439ceb072a 100644 --- a/dlls/wshom.ocx/wshom_main.c +++ b/dlls/wshom.ocx/wshom_main.c @@ -26,8 +26,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(wshom); -static HINSTANCE wshom_instance; - static inline struct provideclassinfo *impl_from_IProvideClassInfo(IProvideClassInfo *iface) { return CONTAINING_RECORD(iface, struct provideclassinfo, IProvideClassInfo_iface); @@ -223,8 +221,7 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv) switch(fdwReason) { case DLL_PROCESS_ATTACH: - wshom_instance = hInstDLL; - DisableThreadLibraryCalls(wshom_instance); + DisableThreadLibraryCalls(hInstDLL); break; case DLL_PROCESS_DETACH: if (lpv) break; @@ -248,21 +245,3 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) FIXME("%s %s %p\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv); return CLASS_E_CLASSNOTAVAILABLE; } - -/*********************************************************************** - * DllRegisterServer (wshom.ocx.@) - */ -HRESULT WINAPI DllRegisterServer(void) -{ - TRACE("()\n"); - return __wine_register_resources(wshom_instance); -} - -/*********************************************************************** - * DllUnregisterServer (wshom.ocx.@) - */ -HRESULT WINAPI DllUnregisterServer(void) -{ - TRACE("()\n"); - return __wine_unregister_resources(wshom_instance); -} diff --git a/dlls/wuapi/main.c b/dlls/wuapi/main.c index 1fcc45a00d2..3dd56a200f9 100644 --- a/dlls/wuapi/main.c +++ b/dlls/wuapi/main.c @@ -113,20 +113,6 @@ static wucf updatescf = { { &wucf_vtbl }, AutomaticUpdates_create }; static wucf sysinfocf = { { &wucf_vtbl }, SystemInformation_create }; static wucf installercf = { { &wucf_vtbl }, UpdateInstaller_create }; -static HINSTANCE instance; - -BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID lpv ) -{ - switch(reason) - { - case DLL_PROCESS_ATTACH: - instance = hinst; - DisableThreadLibraryCalls( hinst ); - break; - } - return TRUE; -} - HRESULT WINAPI DllGetClassObject( REFCLSID rclsid, REFIID iid, LPVOID *ppv ) { IClassFactory *cf = NULL; @@ -152,19 +138,3 @@ HRESULT WINAPI DllGetClassObject( REFCLSID rclsid, REFIID iid, LPVOID *ppv ) if (!cf) return CLASS_E_CLASSNOTAVAILABLE; return IClassFactory_QueryInterface( cf, iid, ppv ); } - -/*********************************************************************** - * DllRegisterServer (WUAPI.@) - */ -HRESULT WINAPI DllRegisterServer(void) -{ - return __wine_register_resources( instance ); -} - -/*********************************************************************** - * DllUnregisterServer (WUAPI.@) - */ -HRESULT WINAPI DllUnregisterServer(void) -{ - return __wine_unregister_resources( instance ); -} diff --git a/dlls/wuaueng/wuaueng.spec b/dlls/wuaueng/wuaueng.spec index 9046a42d4bd..d21d8d4a688 100644 --- a/dlls/wuaueng/wuaueng.spec +++ b/dlls/wuaueng/wuaueng.spec @@ -11,6 +11,6 @@ @ stub ServiceMain @ stub WUServiceMain @ stub DllInstall -@ stub DllMain -@ stub DllRegisterServer -@ stub DllUnregisterServer +@ stdcall -private DllMain(long long ptr) +@ stdcall -private DllRegisterServer() +@ stdcall -private DllUnregisterServer() diff --git a/dlls/xactengine3_7/xact_dll.c b/dlls/xactengine3_7/xact_dll.c index 04ed3b9bc85..231ef753f22 100644 --- a/dlls/xactengine3_7/xact_dll.c +++ b/dlls/xactengine3_7/xact_dll.c @@ -50,8 +50,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(xact3); #define IXACT3WaveBankVtbl IXACTWaveBankVtbl #endif -static HINSTANCE instance; - typedef struct _XACT3CueImpl { IXACT3Cue IXACT3Cue_iface; FACTCue *fact_cue; @@ -1465,7 +1463,6 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD reason, void *pReserved) switch (reason) { case DLL_PROCESS_ATTACH: - instance = hinstDLL; DisableThreadLibraryCalls( hinstDLL ); #ifdef HAVE_FAUDIOLINKEDVERSION @@ -1488,13 +1485,3 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, void **ppv) FIXME("Unknown class %s\n", debugstr_guid(rclsid)); return CLASS_E_CLASSNOTAVAILABLE; } - -HRESULT WINAPI DllRegisterServer(void) -{ - return __wine_register_resources(instance); -} - -HRESULT WINAPI DllUnregisterServer(void) -{ - return __wine_unregister_resources(instance); -} diff --git a/dlls/xaudio2_7/x3daudio.c b/dlls/xaudio2_7/x3daudio.c index 240cd5c101c..e0a0280c3cd 100644 --- a/dlls/xaudio2_7/x3daudio.c +++ b/dlls/xaudio2_7/x3daudio.c @@ -33,21 +33,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(xaudio2); #endif -#ifdef X3DAUDIO1_VER -BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD reason, void *pReserved) -{ - TRACE("(%p, %d, %p)\n", hinstDLL, reason, pReserved); - - switch (reason) - { - case DLL_PROCESS_ATTACH: - DisableThreadLibraryCalls( hinstDLL ); - break; - } - return TRUE; -} -#endif /* X3DAUDIO1_VER */ - #if XAUDIO2_VER >= 8 HRESULT CDECL X3DAudioInitialize(UINT32 chanmask, float speedofsound, X3DAUDIO_HANDLE handle) diff --git a/dlls/xaudio2_7/xapofx.c b/dlls/xaudio2_7/xapofx.c index 100ba02d3b5..4dcdaa2ca5f 100644 --- a/dlls/xaudio2_7/xapofx.c +++ b/dlls/xaudio2_7/xapofx.c @@ -36,21 +36,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(xaudio2); #endif -#ifdef XAPOFX1_VER -BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD reason, void *pReserved) -{ - TRACE("(%p, %d, %p)\n", hinstDLL, reason, pReserved); - - switch (reason) - { - case DLL_PROCESS_ATTACH: - DisableThreadLibraryCalls( hinstDLL ); - break; - } - return TRUE; -} -#endif /* XAPOFX1_VER */ - #if XAUDIO2_VER >= 8 HRESULT CDECL CreateFX(REFCLSID clsid, IUnknown **out, void *initdata, UINT32 initdata_bytes) { diff --git a/dlls/xaudio2_7/xaudio_dll.c b/dlls/xaudio2_7/xaudio_dll.c index f9a4030ea27..c9f5dd2f48e 100644 --- a/dlls/xaudio2_7/xaudio_dll.c +++ b/dlls/xaudio2_7/xaudio_dll.c @@ -77,8 +77,6 @@ __ASM_GLOBAL_FUNC( call_on_voice_processing_pass_start, "ret" ) #endif -static HINSTANCE instance; - static XA2VoiceImpl *impl_from_IXAudio2Voice(IXAudio2Voice *iface); BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD reason, void *pReserved) @@ -88,7 +86,6 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD reason, void *pReserved) switch (reason) { case DLL_PROCESS_ATTACH: - instance = hinstDLL; DisableThreadLibraryCalls( hinstDLL ); #ifdef HAVE_FAUDIOLINKEDVERSION TRACE("Using FAudio version %d\n", FAudioLinkedVersion() ); @@ -98,18 +95,6 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD reason, void *pReserved) return TRUE; } -HRESULT WINAPI DllRegisterServer(void) -{ - TRACE("\n"); - return __wine_register_resources(instance); -} - -HRESULT WINAPI DllUnregisterServer(void) -{ - TRACE("\n"); - return __wine_unregister_resources(instance); -} - /* Effect Wrapping */ static inline XA2XAPOImpl *impl_from_FAPO(FAPO *iface) diff --git a/include/objbase.h b/include/objbase.h index 0a50d28e9d2..714d56f2f16 100644 --- a/include/objbase.h +++ b/include/objbase.h @@ -431,13 +431,6 @@ HRESULT WINAPI StringFromIID(REFIID riid, LPOLESTR*); HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID * ppv) DECLSPEC_HIDDEN; HRESULT WINAPI DllCanUnloadNow(void) DECLSPEC_HIDDEN; -/* shouldn't be here, but is nice for type checking */ -#ifdef __WINESRC__ -HRESULT WINAPI DllRegisterServer(void) DECLSPEC_HIDDEN; -HRESULT WINAPI DllUnregisterServer(void) DECLSPEC_HIDDEN; -#endif - - /***************************************************************************** * Data Object */ diff --git a/include/olectl.h b/include/olectl.h index 3ccf09ca85d..2ba37b48a5e 100644 --- a/include/olectl.h +++ b/include/olectl.h @@ -183,9 +183,8 @@ typedef VARIANT_BOOL OLE_ENABLEDEFAULTBOOL; #define LP_VGACOLOR 0x2 #define LP_COLOR 0x4 -HRESULT WINAPI DllRegisterServer(void); - -HRESULT WINAPI DllUnregisterServer(void); +HRESULT WINAPI DllRegisterServer(void) DECLSPEC_HIDDEN; +HRESULT WINAPI DllUnregisterServer(void) DECLSPEC_HIDDEN; HCURSOR WINAPI OleIconToCursor( HINSTANCE hinstExe, HICON hicon);