diff --git a/dlls/avifil32/avifil32.spec b/dlls/avifil32/avifil32.spec index 271fa9a0e1c..866624987ed 100644 --- a/dlls/avifil32/avifil32.spec +++ b/dlls/avifil32/avifil32.spec @@ -1,5 +1,3 @@ -init AVIFILE_DllMain - @ stub AVIBuildFilter @ stdcall AVIBuildFilterA(str long long) AVIBuildFilterA @ stdcall AVIBuildFilterW(wstr long long) AVIBuildFilterW diff --git a/dlls/avifil32/factory.c b/dlls/avifil32/factory.c index d28ce143ff4..93bee30070c 100644 --- a/dlls/avifil32/factory.c +++ b/dlls/avifil32/factory.c @@ -195,10 +195,9 @@ DWORD WINAPI AVIFILE_DllCanUnloadNow(void) } /***************************************************************************** - * AVIFILE_DllMain [internal] + * DllMain [AVIFIL32.init] */ -BOOL WINAPI AVIFILE_DllMain(HINSTANCE hInstDll, DWORD fdwReason, - LPVOID lpvReserved) +BOOL WINAPI DllMain(HINSTANCE hInstDll, DWORD fdwReason, LPVOID lpvReserved) { TRACE("(%p,%lu,%p)\n", hInstDll, fdwReason, lpvReserved); diff --git a/dlls/comcat/comcat.spec b/dlls/comcat/comcat.spec index eec53b8b627..7631def1057 100644 --- a/dlls/comcat/comcat.spec +++ b/dlls/comcat/comcat.spec @@ -1,5 +1,3 @@ -init COMCAT_DllEntryPoint - @ stdcall DllCanUnloadNow() COMCAT_DllCanUnloadNow @ stdcall DllGetClassObject(ptr ptr ptr) COMCAT_DllGetClassObject @ stdcall DllRegisterServer() COMCAT_DllRegisterServer diff --git a/dlls/comcat/comcat_main.c b/dlls/comcat/comcat_main.c index 0a49983087e..48d7a4f3f4c 100644 --- a/dlls/comcat/comcat_main.c +++ b/dlls/comcat/comcat_main.c @@ -62,9 +62,9 @@ static struct regsvr_entry regsvr_entries[6] = { }; /*********************************************************************** - * DllEntryPoint + * DllMain */ -BOOL WINAPI COMCAT_DllEntryPoint(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad) +BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad) { TRACE("%p 0x%lx %p\n", hinstDLL, fdwReason, fImpLoad); diff --git a/dlls/comctl32/comctl32.spec b/dlls/comctl32/comctl32.spec index 0b80408d6b4..ae8e7a8b403 100644 --- a/dlls/comctl32/comctl32.spec +++ b/dlls/comctl32/comctl32.spec @@ -1,5 +1,3 @@ -init COMCTL32_LibMain - # Functions exported by the Win95 comctl32.dll # (these need to have these exact ordinals, because some win95 dlls # import comctl32.dll by ordinal) diff --git a/dlls/comctl32/commctrl.c b/dlls/comctl32/commctrl.c index c29c40b921f..e39bcd64060 100644 --- a/dlls/comctl32/commctrl.c +++ b/dlls/comctl32/commctrl.c @@ -127,7 +127,7 @@ static const WORD wPattern55AA[] = /*********************************************************************** - * COMCTL32_LibMain [Internal] Initializes the internal 'COMCTL32.DLL'. + * DllMain [Internal] Initializes the internal 'COMCTL32.DLL'. * * PARAMS * hinstDLL [I] handle to the 'dlls' instance @@ -139,8 +139,7 @@ static const WORD wPattern55AA[] = * Failure: FALSE */ -BOOL WINAPI -COMCTL32_LibMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) +BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { TRACE("%p,%lx,%p\n", hinstDLL, fdwReason, lpvReserved); diff --git a/dlls/commdlg/cdlg32.c b/dlls/commdlg/cdlg32.c index b3bfa20cce8..3f2f5f33afc 100644 --- a/dlls/commdlg/cdlg32.c +++ b/dlls/commdlg/cdlg32.c @@ -52,7 +52,7 @@ BOOL (WINAPI *COMDLG32_SHGetFolderPathA)(HWND,int,HANDLE,DWORD,LPSTR); BOOL (WINAPI *COMDLG32_SHGetFolderPathW)(HWND,int,HANDLE,DWORD,LPWSTR); /*********************************************************************** - * COMDLG32_DllEntryPoint (COMDLG32.init) + * DllMain (COMDLG32.init) * * Initialization code for the COMDLG32 DLL * @@ -68,7 +68,7 @@ static char * GPA_string = "Failed to get entry point %s for hinst = 0x%08x\n"; return FALSE; \ } -BOOL WINAPI COMDLG32_DllEntryPoint(HINSTANCE hInstance, DWORD Reason, LPVOID Reserved) +BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD Reason, LPVOID Reserved) { TRACE("(%08x, %08lx, %p)\n", hInstance, Reason, Reserved); diff --git a/dlls/commdlg/comdlg32.spec b/dlls/commdlg/comdlg32.spec index f65cedeea03..1d3ab2b4069 100644 --- a/dlls/commdlg/comdlg32.spec +++ b/dlls/commdlg/comdlg32.spec @@ -1,5 +1,3 @@ -init COMDLG32_DllEntryPoint - @ stdcall ChooseColorA(ptr) ChooseColorA @ stdcall ChooseColorW(ptr) ChooseColorW @ stdcall ChooseFontA(ptr) ChooseFontA diff --git a/dlls/crtdll/crtdll.spec b/dlls/crtdll/crtdll.spec index f0428956fc3..08d23d5a384 100644 --- a/dlls/crtdll/crtdll.spec +++ b/dlls/crtdll/crtdll.spec @@ -1,5 +1,4 @@ # Old C runtime library. All functions provided by msvcrt -init CRTDLL_Init @ forward ??2@YAPAXI@Z msvcrt.??2@YAPAXI@Z @ forward ??3@YAXPAX@Z msvcrt.??3@YAXPAX@Z diff --git a/dlls/crtdll/crtdll_main.c b/dlls/crtdll/crtdll_main.c index 9d19fa2f212..fb6eb022a6c 100644 --- a/dlls/crtdll/crtdll_main.c +++ b/dlls/crtdll/crtdll_main.c @@ -77,9 +77,9 @@ static void convert_struct_stat( struct crtdll_stat *dst, const struct _stat *sr /********************************************************************* - * CRTDLL_MainInit (CRTDLL.init) + * DllMain (CRTDLL.init) */ -BOOL WINAPI CRTDLL_Init(HINSTANCE hinstDLL,DWORD fdwReason,LPVOID lpvReserved) +BOOL WINAPI DllMain(HINSTANCE hinstDLL,DWORD fdwReason,LPVOID lpvReserved) { TRACE("(%p,%ld,%p)\n",hinstDLL,fdwReason,lpvReserved); diff --git a/dlls/d3d8/d3d8.spec b/dlls/d3d8/d3d8.spec index 7c6b0c1ffc4..645eb5602ad 100644 --- a/dlls/d3d8/d3d8.spec +++ b/dlls/d3d8/d3d8.spec @@ -1,5 +1,3 @@ -init D3D8_DllMain - @ stdcall D3D8GetSWInfo() D3D8GetSWInfo @ stdcall DebugSetMute() DebugSetMute @ stdcall Direct3DCreate8(long) Direct3DCreate8 diff --git a/dlls/d3d8/d3d8_main.c b/dlls/d3d8/d3d8_main.c index cea38f1d544..9d1c91a0d79 100644 --- a/dlls/d3d8/d3d8_main.c +++ b/dlls/d3d8/d3d8_main.c @@ -70,7 +70,7 @@ IDirect3D8* WINAPI Direct3DCreate8(UINT SDKVersion) } /* At process attach */ -BOOL WINAPI D3D8_DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv) +BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv) { TRACE("fdwReason=%ld\n", fdwReason); if (fdwReason == DLL_PROCESS_ATTACH) diff --git a/dlls/ddraw/ddraw.spec b/dlls/ddraw/ddraw.spec index cb1bb4f7839..2284cb23bcb 100644 --- a/dlls/ddraw/ddraw.spec +++ b/dlls/ddraw/ddraw.spec @@ -1,5 +1,3 @@ -init DDRAW_DllMain - @ stub DDHAL32_VidMemAlloc @ stub DDHAL32_VidMemFree @ stub DDInternalLock diff --git a/dlls/ddraw/main.c b/dlls/ddraw/main.c index fbb4260ba28..7b98266f03e 100644 --- a/dlls/ddraw/main.c +++ b/dlls/ddraw/main.c @@ -498,7 +498,7 @@ static int DDRAW_ChooseDefaultDriver(void) return best; } -BOOL WINAPI DDRAW_DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv) +BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv) { /* If we were sufficiently cool, DDraw drivers would just be COM * objects, registered with a particular component category. */ diff --git a/dlls/dinput/dinput.spec b/dlls/dinput/dinput.spec index d00c41f1199..0efa36a31a8 100644 --- a/dlls/dinput/dinput.spec +++ b/dlls/dinput/dinput.spec @@ -1,5 +1,3 @@ -init Init - @ stdcall DirectInputCreateA(long long ptr ptr) DirectInputCreateA @ stub DirectInputCreateW @ stdcall DirectInputCreateEx(long long ptr ptr ptr) DirectInputCreateEx diff --git a/dlls/dinput/dinput_main.c b/dlls/dinput/dinput_main.c index 61cb10278d2..1b393023b2f 100644 --- a/dlls/dinput/dinput_main.c +++ b/dlls/dinput/dinput_main.c @@ -50,7 +50,7 @@ static ICOM_VTABLE(IDirectInput8A) ddi8avt; static dinput_device * dinput_devices[MAX_WINE_DINPUT_DEVICES]; static int nrof_dinput_devices = 0; -BOOL WINAPI Init( HINSTANCE inst, DWORD reason, LPVOID reserv) +BOOL WINAPI DllMain( HINSTANCE inst, DWORD reason, LPVOID reserv) { switch(reason) { diff --git a/dlls/dplayx/dplayx.spec b/dlls/dplayx/dplayx.spec index 939a8635a72..5ab508f34c1 100644 --- a/dlls/dplayx/dplayx.spec +++ b/dlls/dplayx/dplayx.spec @@ -1,5 +1,3 @@ -init DPLAYX_LibMain - 1 stdcall DirectPlayCreate(ptr ptr ptr) DirectPlayCreate 2 stdcall DirectPlayEnumerateA(ptr ptr) DirectPlayEnumerateA 3 stdcall DirectPlayEnumerateW(ptr ptr) DirectPlayEnumerateW diff --git a/dlls/dplayx/dplayx_main.c b/dlls/dplayx/dplayx_main.c index b8d13441c36..d2227fe91cf 100644 --- a/dlls/dplayx/dplayx_main.c +++ b/dlls/dplayx/dplayx_main.c @@ -30,7 +30,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(dplay); DWORD gdwDPlaySPRefCount = 0; /* FIXME: Should it be initialized here? */ -BOOL WINAPI DPLAYX_LibMain( HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved ) +BOOL WINAPI DllMain( HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved ) { TRACE( "(%p,0x%08lx,%p)\n", hinstDLL, fdwReason, lpvReserved ); diff --git a/dlls/gdi/gdi32.spec b/dlls/gdi/gdi32.spec index c7b79285c4c..f2ef9f3ccc2 100644 --- a/dlls/gdi/gdi32.spec +++ b/dlls/gdi/gdi32.spec @@ -1,5 +1,3 @@ -init MAIN_GdiInit - # ordinal exports 100 stdcall @(long long str str str) GDI_CallDevInstall16 101 stdcall @(long str str ptr) GDI_CallExtDeviceModePropSheet16 diff --git a/dlls/gdi/gdi_main.c b/dlls/gdi/gdi_main.c index c0cb9e48558..14b637ba482 100644 --- a/dlls/gdi/gdi_main.c +++ b/dlls/gdi/gdi_main.c @@ -29,7 +29,7 @@ /*********************************************************************** * GDI initialisation routine */ -BOOL WINAPI MAIN_GdiInit(HINSTANCE hinstDLL, DWORD reason, LPVOID lpvReserved) +BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD reason, LPVOID lpvReserved) { if (reason != DLL_PROCESS_ATTACH) return TRUE; return GDI_Init(); diff --git a/dlls/imagehlp/imagehlp.spec b/dlls/imagehlp/imagehlp.spec index 8fa9b7d32cc..a605f728139 100644 --- a/dlls/imagehlp/imagehlp.spec +++ b/dlls/imagehlp/imagehlp.spec @@ -1,5 +1,3 @@ -init IMAGEHLP_LibMain - @ stdcall BindImage(str str str) BindImage @ stdcall BindImageEx(long str str str ptr) BindImageEx @ stdcall CheckSumMappedFile(ptr long ptr ptr) CheckSumMappedFile diff --git a/dlls/imagehlp/imagehlp_main.c b/dlls/imagehlp/imagehlp_main.c index dffaf897ad1..542fde9bd8b 100644 --- a/dlls/imagehlp/imagehlp_main.c +++ b/dlls/imagehlp/imagehlp_main.c @@ -33,10 +33,9 @@ HANDLE IMAGEHLP_hHeap = (HANDLE) NULL; static API_VERSION IMAGEHLP_ApiVersion = { 4, 0, 0, 5 }; /*********************************************************************** - * IMAGEHLP_LibMain (IMAGEHLP.init) + * DllMain (IMAGEHLP.init) */ -BOOL WINAPI IMAGEHLP_LibMain( - HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) +BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { switch(fdwReason) { diff --git a/dlls/msacm/msacm32.spec b/dlls/msacm/msacm32.spec index 9ac4a174762..9c7ebb5fdeb 100644 --- a/dlls/msacm/msacm32.spec +++ b/dlls/msacm/msacm32.spec @@ -1,5 +1,3 @@ -init MSACM32_LibMain - @ stdcall acmDriverAddA(ptr long long long long) acmDriverAddA @ stdcall acmDriverAddW(ptr long long long long) acmDriverAddW @ stdcall acmDriverClose(long long) acmDriverClose diff --git a/dlls/msacm/msacm32_main.c b/dlls/msacm/msacm32_main.c index 78dc247a9f4..327b7099a4f 100644 --- a/dlls/msacm/msacm32_main.c +++ b/dlls/msacm/msacm32_main.c @@ -36,9 +36,9 @@ WINE_DEFAULT_DEBUG_CHANNEL(msacm); HINSTANCE MSACM_hInstance32 = 0; /*********************************************************************** - * MSACM_LibMain (MSACM32.init) + * DllMain (MSACM32.init) */ -BOOL WINAPI MSACM32_LibMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpvReserved) +BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpvReserved) { TRACE("%p 0x%lx %p\n", hInstDLL, fdwReason, lpvReserved); diff --git a/dlls/msisys/msisys.c b/dlls/msisys/msisys.c index 6570b0c421b..e88dc65f6aa 100644 --- a/dlls/msisys/msisys.c +++ b/dlls/msisys/msisys.c @@ -50,9 +50,9 @@ static void MSISYS_UninitProcess( void ) } /*********************************************************************** - * MSISYS_DllMain + * DllMain for MSISYS */ -BOOL WINAPI MSISYS_DllMain( +BOOL WINAPI DllMain( HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpvReserved ) diff --git a/dlls/msisys/msisys.ocx.spec b/dlls/msisys/msisys.ocx.spec index f10b4b61014..25a0479292a 100644 --- a/dlls/msisys/msisys.ocx.spec +++ b/dlls/msisys/msisys.ocx.spec @@ -1,5 +1,3 @@ -init MSISYS_DllMain - @ stdcall DllCanUnloadNow() MSISYS_DllCanUnloadNow @ stdcall DllGetClassObject(ptr ptr ptr) MSISYS_DllGetClassObject @ stdcall DllRegisterServer() MSISYS_DllRegisterServer diff --git a/dlls/msvcrt/main.c b/dlls/msvcrt/main.c index 93290b11d66..82eabab20dc 100644 --- a/dlls/msvcrt/main.c +++ b/dlls/msvcrt/main.c @@ -39,7 +39,7 @@ typedef void (*MSVCRT_free_func)(void*); /********************************************************************* * Init */ -BOOL WINAPI MSVCRT_Init(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) +BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { MSVCRT_thread_data *tls; diff --git a/dlls/msvcrt/msvcrt.spec b/dlls/msvcrt/msvcrt.spec index 50913bf124f..dff0adb1250 100644 --- a/dlls/msvcrt/msvcrt.spec +++ b/dlls/msvcrt/msvcrt.spec @@ -1,5 +1,4 @@ # msvcrt.dll - MS VC++ Run Time Library -init MSVCRT_Init @ cdecl $I10_OUTPUT() MSVCRT_I10_OUTPUT @ cdecl ??0__non_rtti_object@@QAE@ABV0@@Z(ptr ptr) MSVCRT___non_rtti_object_copy_ctor diff --git a/dlls/msvideo/msrle32/msrle32.c b/dlls/msvideo/msrle32/msrle32.c index 036786e81fc..849be81e583 100644 --- a/dlls/msvideo/msrle32/msrle32.c +++ b/dlls/msvideo/msrle32/msrle32.c @@ -1855,7 +1855,7 @@ LRESULT CALLBACK MSRLE32_DriverProc(DWORD dwDrvID, HDRVR hDrv, UINT uMsg, } /* DllMain - library initialization code */ -BOOL WINAPI MSRLE32_DllMain(HINSTANCE hModule, DWORD dwReason, LPVOID lpReserved) +BOOL WINAPI DllMain(HINSTANCE hModule, DWORD dwReason, LPVOID lpReserved) { TRACE("(%p,%ld,%p)\n",(LPVOID)hModule,dwReason,lpReserved); diff --git a/dlls/msvideo/msrle32/msrle32.spec b/dlls/msvideo/msrle32/msrle32.spec index b137eb37c65..4e8276d88a7 100644 --- a/dlls/msvideo/msrle32/msrle32.spec +++ b/dlls/msvideo/msrle32/msrle32.spec @@ -1,3 +1 @@ -init MSRLE32_DllMain - @ stdcall DriverProc(long long long long long) MSRLE32_DriverProc diff --git a/dlls/netapi32/netapi32.c b/dlls/netapi32/netapi32.c index 7aaa4dacd89..21c2a9b6148 100644 --- a/dlls/netapi32/netapi32.c +++ b/dlls/netapi32/netapi32.c @@ -183,8 +183,7 @@ static UCHAR NETBIOS_Astat(PNCB ncb) return NRC_GOODRET; } -BOOL WINAPI -NETAPI32_LibMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) +BOOL WINAPI DllMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { TRACE("%p,%lx,%p\n", hinstDLL, fdwReason, lpvReserved); diff --git a/dlls/netapi32/netapi32.spec b/dlls/netapi32/netapi32.spec index 9a31f31bde0..e9f710ee55d 100644 --- a/dlls/netapi32/netapi32.spec +++ b/dlls/netapi32/netapi32.spec @@ -1,5 +1,3 @@ -init NETAPI32_LibMain - @ stub I_BrowserDebugCall @ stub I_BrowserDebugTrace @ stdcall I_BrowserQueryEmulatedDomains(wstr ptr ptr) I_BrowserQueryEmulatedDomains diff --git a/dlls/odbc32/odbc32.spec b/dlls/odbc32/odbc32.spec index 5e62fd9846c..19a48855c1c 100644 --- a/dlls/odbc32/odbc32.spec +++ b/dlls/odbc32/odbc32.spec @@ -1,5 +1,3 @@ -init MAIN_OdbcInit - 1 stdcall SQLAllocConnect(long ptr) SQLAllocConnect 2 stdcall SQLAllocEnv(ptr) SQLAllocEnv 3 stdcall SQLAllocStmt(long ptr) SQLAllocStmt diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c index 21e291b9303..c0e49901c33 100644 --- a/dlls/odbc32/proxyodbc.c +++ b/dlls/odbc32/proxyodbc.c @@ -156,7 +156,7 @@ SQLRETURN SQLDummyFunc() } /*********************************************************************** - * MAIN_OdbcInit [Internal] Initializes the internal 'ODBC32.DLL'. + * DllMain [Internal] Initializes the internal 'ODBC32.DLL'. * * PARAMS * hinstDLL [I] handle to the DLL's instance @@ -168,8 +168,7 @@ SQLRETURN SQLDummyFunc() * Failure: FALSE */ -BOOL WINAPI -MAIN_OdbcInit(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) +BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { int i; TRACE("Initializing or Finalizing proxy ODBC: %p,%lx,%p\n", hinstDLL, fdwReason, lpvReserved); diff --git a/dlls/ole32/ole32.spec b/dlls/ole32/ole32.spec index f6800dcfaae..fcb77145138 100644 --- a/dlls/ole32/ole32.spec +++ b/dlls/ole32/ole32.spec @@ -1,5 +1,3 @@ -init OLE32_DllEntryPoint - 1 stub BindMoniker # stdcall (ptr long ptr ptr) return 0,ERR_NOTIMPLEMENTED 2 stdcall CLSIDFromProgID(wstr ptr) CLSIDFromProgID 3 stdcall CLSIDFromString(wstr ptr) CLSIDFromString diff --git a/dlls/ole32/ole32_main.c b/dlls/ole32/ole32_main.c index 5e9043a7fae..4ac2798739a 100644 --- a/dlls/ole32/ole32_main.c +++ b/dlls/ole32/ole32_main.c @@ -29,10 +29,10 @@ WINE_DEFAULT_DEBUG_CHANNEL(ole); HINSTANCE OLE32_hInstance = 0; /*********************************************************************** - * DllEntryPoint (OLE32.@) + * DllMain (OLE32.@) */ -BOOL WINAPI OLE32_DllEntryPoint(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad) +BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad) { TRACE("0x%x 0x%lx %p\n", hinstDLL, fdwReason, fImpLoad); diff --git a/dlls/opengl32/opengl32.spec b/dlls/opengl32/opengl32.spec index d9313f0f609..3a61a7ebc93 100644 --- a/dlls/opengl32/opengl32.spec +++ b/dlls/opengl32/opengl32.spec @@ -1,5 +1,3 @@ -init OpenGL32_Init - @ stdcall wglCreateContext(long) wglCreateContext @ stdcall wglCreateLayerContext(long long) wglCreateLayerContext @ stdcall wglCopyContext(long long long) wglCopyContext diff --git a/dlls/opengl32/wgl.c b/dlls/opengl32/wgl.c index a8a78f751d7..ae656082ab0 100644 --- a/dlls/opengl32/wgl.c +++ b/dlls/opengl32/wgl.c @@ -647,7 +647,7 @@ static void process_detach(void) /*********************************************************************** * OpenGL initialisation routine */ -BOOL WINAPI OpenGL32_Init( HINSTANCE hinst, DWORD reason, LPVOID reserved ) +BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved ) { switch(reason) { diff --git a/dlls/richedit/riched32.spec b/dlls/richedit/riched32.spec index f5b750fda8b..1f7dffe9b97 100644 --- a/dlls/richedit/riched32.spec +++ b/dlls/richedit/riched32.spec @@ -1,3 +1 @@ -init RICHED32_LibMain - 2 stdcall DllGetVersion (ptr) RICHED32_DllGetVersion diff --git a/dlls/richedit/richedit.c b/dlls/richedit/richedit.c index 601c1099f9c..d73ad8972ad 100644 --- a/dlls/richedit/richedit.c +++ b/dlls/richedit/richedit.c @@ -53,7 +53,7 @@ HANDLE RICHED32_hHeap = (HANDLE)NULL; /*********************************************************************** - * RICHED32_LibMain [Internal] Initializes the internal 'RICHED32.DLL'. + * DllMain [Internal] Initializes the internal 'RICHED32.DLL'. * * PARAMS * hinstDLL [I] handle to the DLL's instance @@ -65,8 +65,7 @@ HANDLE RICHED32_hHeap = (HANDLE)NULL; * Failure: FALSE */ -BOOL WINAPI -RICHED32_LibMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) +BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { TRACE("\n"); switch (fdwReason) diff --git a/dlls/rpcrt4/rpcrt4.spec b/dlls/rpcrt4/rpcrt4.spec index 8ca2e83afa6..3bee365d261 100644 --- a/dlls/rpcrt4/rpcrt4.spec +++ b/dlls/rpcrt4/rpcrt4.spec @@ -1,5 +1,3 @@ -init RPCRT4_LibMain - @ stub DceErrorInqTextA @ stub DceErrorInqTextW @ stdcall DllRegisterServer() RPCRT4_DllRegisterServer diff --git a/dlls/rpcrt4/rpcrt4_main.c b/dlls/rpcrt4/rpcrt4_main.c index 7f02f368d18..a0ad05dfcce 100644 --- a/dlls/rpcrt4/rpcrt4_main.c +++ b/dlls/rpcrt4/rpcrt4_main.c @@ -144,7 +144,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(ole); static UUID uuid_nil; /*********************************************************************** - * RPCRT4_LibMain + * DllMain * * PARAMS * hinstDLL [I] handle to the DLL's instance @@ -156,8 +156,7 @@ static UUID uuid_nil; * Failure: FALSE */ -BOOL WINAPI -RPCRT4_LibMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) +BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { switch (fdwReason) { case DLL_PROCESS_ATTACH: diff --git a/dlls/serialui/confdlg.c b/dlls/serialui/confdlg.c index 35732b91959..1195035ec11 100644 --- a/dlls/serialui/confdlg.c +++ b/dlls/serialui/confdlg.c @@ -47,7 +47,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(comm); HMODULE SERIALUI_hModule = 0; /*********************************************************************** - * SERIALUI_LibMain [Internal] Initializes the internal 'SERIALUI.DLL'. + * DllMain [Internal] Initializes the internal 'SERIALUI.DLL'. * * PARAMS * hinstDLL [I] handle to the DLL's instance @@ -59,8 +59,7 @@ HMODULE SERIALUI_hModule = 0; * Failure: FALSE */ -BOOL WINAPI -SERIALUI_LibMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) +BOOL WINAPI DllMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { TRACE("%p,%lx,%p\n", hinstDLL, fdwReason, lpvReserved); diff --git a/dlls/serialui/serialui.spec b/dlls/serialui/serialui.spec index 95ae65da889..ee29afe0ce5 100644 --- a/dlls/serialui/serialui.spec +++ b/dlls/serialui/serialui.spec @@ -1,5 +1,3 @@ -init SERIALUI_LibMain - 2 stdcall EnumPropPages(ptr ptr ptr) SERIALUI_EnumPropPages 3 stdcall drvCommConfigDialog(ptr long ptr) SERIALUI_CommConfigDialog 4 stdcall drvSetDefaultCommConfig(str ptr long) SERIALUI_SetDefaultCommConfig diff --git a/dlls/shell32/shell32.spec b/dlls/shell32/shell32.spec index 5fbecc9ab4c..b78f347b777 100644 --- a/dlls/shell32/shell32.spec +++ b/dlls/shell32/shell32.spec @@ -1,5 +1,3 @@ -init Shell32LibMain - # Functions exported by the Win95 shell32.dll # (these need to have these exact ordinals, for some # win95 and winNT dlls import shell32.dll by ordinal) diff --git a/dlls/shell32/shell32_main.c b/dlls/shell32/shell32_main.c index 8e655d65e77..a824a16527a 100644 --- a/dlls/shell32/shell32_main.c +++ b/dlls/shell32/shell32_main.c @@ -944,13 +944,13 @@ HIMAGELIST ShellBigIconList = 0; /************************************************************************* - * SHELL32 LibMain + * SHELL32 DllMain * * NOTES * calling oleinitialize here breaks sone apps. */ -BOOL WINAPI Shell32LibMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad) +BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad) { TRACE("0x%x 0x%lx %p\n", hinstDLL, fdwReason, fImpLoad); diff --git a/dlls/shlwapi/shlwapi.spec b/dlls/shlwapi/shlwapi.spec index cbd02e00722..035d5894d65 100644 --- a/dlls/shlwapi/shlwapi.spec +++ b/dlls/shlwapi/shlwapi.spec @@ -1,5 +1,3 @@ -init SHLWAPI_LibMain - 1 stdcall @(str ptr) SHLWAPI_1 2 stdcall @(wstr ptr) SHLWAPI_2 3 stdcall @(str long) SHLWAPI_3 diff --git a/dlls/shlwapi/shlwapi_main.c b/dlls/shlwapi/shlwapi_main.c index 5667b9266e9..e0f6eece174 100644 --- a/dlls/shlwapi/shlwapi_main.c +++ b/dlls/shlwapi/shlwapi_main.c @@ -40,12 +40,12 @@ HMODULE SHLWAPI_hversion = 0; DWORD SHLWAPI_ThreadRef_index = -1; /************************************************************************* - * SHLWAPI LibMain + * SHLWAPI DllMain * * NOTES * calling oleinitialize here breaks sone apps. */ -BOOL WINAPI SHLWAPI_LibMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad) +BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad) { TRACE("%p 0x%lx %p\n", hinstDLL, fdwReason, fImpLoad); switch (fdwReason) diff --git a/dlls/snmpapi/main.c b/dlls/snmpapi/main.c index 5ea70ba88f4..cc8c1fe15db 100644 --- a/dlls/snmpapi/main.c +++ b/dlls/snmpapi/main.c @@ -27,9 +27,9 @@ WINE_DEFAULT_DEBUG_CHANNEL(snmpapi); /*********************************************************************** - * SNMPAPI_DllMain + * DllMain for SNMPAPI */ -BOOL WINAPI SNMPAPI_DllMain( +BOOL WINAPI DllMain( HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpvReserved) diff --git a/dlls/snmpapi/snmpapi.spec b/dlls/snmpapi/snmpapi.spec index c6a97bec0b5..1452ad789ca 100644 --- a/dlls/snmpapi/snmpapi.spec +++ b/dlls/snmpapi/snmpapi.spec @@ -1,5 +1,3 @@ -init SNMPAPI_DllMain - @ stub SnmpSvcAddrIsIpx @ stub SnmpSvcAddrToSocket @ stub SnmpSvcBufRevAndCpy diff --git a/dlls/ttydrv/ttydrv.spec b/dlls/ttydrv/ttydrv.spec index 741b81ae2c3..9b754985f27 100644 --- a/dlls/ttydrv/ttydrv.spec +++ b/dlls/ttydrv/ttydrv.spec @@ -1,5 +1,3 @@ -init TTYDRV_Init - # GDI driver @ cdecl Arc(ptr long long long long long long long long) TTYDRV_DC_Arc diff --git a/dlls/ttydrv/ttydrv_main.c b/dlls/ttydrv/ttydrv_main.c index d168e7f94ec..af098840650 100644 --- a/dlls/ttydrv/ttydrv_main.c +++ b/dlls/ttydrv/ttydrv_main.c @@ -74,7 +74,7 @@ static void process_detach(void) /*********************************************************************** * TTYDRV initialisation routine */ -BOOL WINAPI TTYDRV_Init( HINSTANCE hinst, DWORD reason, LPVOID reserved ) +BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved ) { switch(reason) { diff --git a/dlls/twain/twain32_main.c b/dlls/twain/twain32_main.c index 8ab9c5570fa..4771a82964a 100644 --- a/dlls/twain/twain32_main.c +++ b/dlls/twain/twain32_main.c @@ -26,8 +26,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(twain); -BOOL WINAPI -TWAIN_LibMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) +BOOL WINAPI DllMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { TRACE("%p,%lx,%p\n", hinstDLL, fdwReason, lpvReserved); diff --git a/dlls/twain/twain_32.spec b/dlls/twain/twain_32.spec index 245be682d52..bda84843666 100644 --- a/dlls/twain/twain_32.spec +++ b/dlls/twain/twain_32.spec @@ -1,3 +1 @@ -init TWAIN_LibMain - @ stdcall DSM_Entry(ptr ptr long long long ptr) DSM_Entry diff --git a/dlls/urlmon/urlmon.spec b/dlls/urlmon/urlmon.spec index 288e29f6459..c59616ec648 100644 --- a/dlls/urlmon/urlmon.spec +++ b/dlls/urlmon/urlmon.spec @@ -1,5 +1,3 @@ -init URLMON_DllEntryPoint - 1 stub CDLGetLongPathNameA 2 stub CDLGetLongPathNameW @ stub AsyncGetClassBits diff --git a/dlls/urlmon/urlmon_main.c b/dlls/urlmon/urlmon_main.c index c02a60a5e8f..2689bfbde47 100644 --- a/dlls/urlmon/urlmon_main.c +++ b/dlls/urlmon/urlmon_main.c @@ -31,10 +31,9 @@ WINE_DEFAULT_DEBUG_CHANNEL(urlmon); HINSTANCE URLMON_hInstance = 0; /*********************************************************************** - * DllEntryPoint (OLE32.@) + * DllMain (URLMON.init) */ - -BOOL WINAPI URLMON_DllEntryPoint(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad) +BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad) { TRACE("%p 0x%lx %p\n", hinstDLL, fdwReason, fImpLoad); diff --git a/dlls/winaspi/winaspi32.c b/dlls/winaspi/winaspi32.c index 356a1d0531d..3851604cd87 100644 --- a/dlls/winaspi/winaspi32.c +++ b/dlls/winaspi/winaspi32.c @@ -56,7 +56,7 @@ static CRITICAL_SECTION ASPI_CritSection = CRITICAL_SECTION_INIT("ASPI_CritSecti #endif /* defined(linux) */ -BOOL WINAPI WNASPI32_LibMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID fImpLoad) +BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID fImpLoad) { #ifdef linux switch( fdwReason ) diff --git a/dlls/winaspi/wnaspi32.spec b/dlls/winaspi/wnaspi32.spec index d54be3c0b8e..d73dada7e89 100644 --- a/dlls/winaspi/wnaspi32.spec +++ b/dlls/winaspi/wnaspi32.spec @@ -1,5 +1,3 @@ -init WNASPI32_LibMain - # we have several ordinal clashes here, it seems... 1 cdecl GetASPI32SupportInfo() GetASPI32SupportInfo diff --git a/dlls/winedos/dosvm.c b/dlls/winedos/dosvm.c index b6fff476223..79d7bcfa390 100644 --- a/dlls/winedos/dosvm.c +++ b/dlls/winedos/dosvm.c @@ -668,9 +668,9 @@ void DOSVM_RealModeInterrupt( BYTE intnum, CONTEXT86 *context ) /********************************************************************** - * DOSVM_Init + * DllMain (DOSVM.Init) */ -BOOL WINAPI DOSVM_Init( HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved ) +BOOL WINAPI DllMain( HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved ) { TRACE_(module)("(%p,%ld,%p)\n", hinstDLL, fdwReason, lpvReserved); diff --git a/dlls/winedos/winedos.spec b/dlls/winedos/winedos.spec index a08ad6092bd..4404e0f542e 100644 --- a/dlls/winedos/winedos.spec +++ b/dlls/winedos/winedos.spec @@ -1,5 +1,3 @@ -init DOSVM_Init - @ stdcall LoadDosExe(str long) MZ_LoadImage @ stdcall EmulateInterruptPM(ptr long) DOSVM_EmulateInterruptPM diff --git a/dlls/wineps/init.c b/dlls/wineps/init.c index 668f47604bc..e8cabb1e64b 100644 --- a/dlls/wineps/init.c +++ b/dlls/wineps/init.c @@ -100,12 +100,12 @@ static LOGFONTA DefaultLogFont = { }; /********************************************************************* - * PSDRV_Init + * DllMain * - * Initializes font metrics and registers driver. Called from GDI_Init() + * Initializes font metrics and registers driver. wineps dll entry point. * */ -BOOL WINAPI PSDRV_Init( HINSTANCE hinst, DWORD reason, LPVOID reserved ) +BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved ) { TRACE("(%p, 0x%08lx, %p)\n", hinst, reason, reserved); diff --git a/dlls/wineps/wineps.spec b/dlls/wineps/wineps.spec index dbf652a4628..37743698244 100644 --- a/dlls/wineps/wineps.spec +++ b/dlls/wineps/wineps.spec @@ -1,5 +1,3 @@ -init PSDRV_Init - # GDI driver @ cdecl Arc(ptr long long long long long long long long) PSDRV_Arc diff --git a/dlls/wininet/internet.c b/dlls/wininet/internet.c index 48fbe960706..f8fe153eb97 100644 --- a/dlls/wininet/internet.c +++ b/dlls/wininet/internet.c @@ -97,7 +97,7 @@ LPWORKREQUEST lpHeadWorkQueue; LPWORKREQUEST lpWorkQueueTail; /*********************************************************************** - * WININET_LibMain [Internal] Initializes the internal 'WININET.DLL'. + * DllMain [Internal] Initializes the internal 'WININET.DLL'. * * PARAMS * hinstDLL [I] handle to the DLL's instance @@ -109,8 +109,7 @@ LPWORKREQUEST lpWorkQueueTail; * Failure: FALSE */ -BOOL WINAPI -WININET_LibMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) +BOOL WINAPI DllMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { TRACE("%p,%lx,%p\n", hinstDLL, fdwReason, lpvReserved); diff --git a/dlls/wininet/wininet.spec b/dlls/wininet/wininet.spec index 98135dfe179..92ca6dbddfe 100644 --- a/dlls/wininet/wininet.spec +++ b/dlls/wininet/wininet.spec @@ -1,5 +1,3 @@ -init WININET_LibMain - @ stdcall InternetInitializeAutoProxyDll(long) InternetInitializeAutoProxyDll @ stub ShowCertificate @ stdcall CommitUrlCacheEntryA(str str long long long str long str str) CommitUrlCacheEntryA diff --git a/dlls/winmm/mciavi/mciavi.c b/dlls/winmm/mciavi/mciavi.c index 5ce79b6a6ae..5c2e6b24db8 100644 --- a/dlls/winmm/mciavi/mciavi.c +++ b/dlls/winmm/mciavi/mciavi.c @@ -118,7 +118,7 @@ static DWORD MCI_SendCommandAsync(UINT wDevID, UINT wMsg, DWORD dwParam1, HINSTANCE MCIAVI_hInstance = 0; -BOOL WINAPI MCIAVI_LibMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID fImpLoad) +BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID fImpLoad) { switch (fdwReason) { case DLL_PROCESS_ATTACH: diff --git a/dlls/winmm/mciavi/mciavi.drv.spec b/dlls/winmm/mciavi/mciavi.drv.spec index 31a49f5a55c..30390595608 100644 --- a/dlls/winmm/mciavi/mciavi.drv.spec +++ b/dlls/winmm/mciavi/mciavi.drv.spec @@ -1,3 +1 @@ -init MCIAVI_LibMain - @ stdcall DriverProc(long long long long long) MCIAVI_DriverProc diff --git a/dlls/winmm/winmm.c b/dlls/winmm/winmm.c index b6abab95de7..7f0a62e6ef7 100644 --- a/dlls/winmm/winmm.c +++ b/dlls/winmm/winmm.c @@ -108,12 +108,12 @@ BOOL WINMM_CheckForMMSystem(void) } /************************************************************************** - * DllEntryPoint (WINMM.init) + * DllMain (WINMM.init) * * WINMM DLL entry point * */ -BOOL WINAPI WINMM_LibMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID fImpLoad) +BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID fImpLoad) { TRACE("%p 0x%lx %p\n", hInstDLL, fdwReason, fImpLoad); diff --git a/dlls/winmm/winmm.spec b/dlls/winmm/winmm.spec index 3137892d34d..7736edb3def 100644 --- a/dlls/winmm/winmm.spec +++ b/dlls/winmm/winmm.spec @@ -1,5 +1,3 @@ -init WINMM_LibMain - # ordinal exports 1 stdcall @(ptr long long) PlaySoundA 3 stub @ diff --git a/dlls/winsock/socket.c b/dlls/winsock/socket.c index 88882002259..7bc2f143055 100644 --- a/dlls/winsock/socket.c +++ b/dlls/winsock/socket.c @@ -428,9 +428,9 @@ static void WINSOCK_DeleteIData(void) } /*********************************************************************** - * WS_LibMain (WS2_32.init) + * DllMain (WS2_32.init) */ -BOOL WINAPI WS_LibMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID fImpLoad) +BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID fImpLoad) { TRACE("%p 0x%lx %p\n", hInstDLL, fdwReason, fImpLoad); switch (fdwReason) { diff --git a/dlls/winsock/ws2_32.spec b/dlls/winsock/ws2_32.spec index adaa1a9fe1c..c3017c08295 100644 --- a/dlls/winsock/ws2_32.spec +++ b/dlls/winsock/ws2_32.spec @@ -2,9 +2,6 @@ # # Export table information obtained from Windows 2000 ws2_32.dll -init WS_LibMain - -# EXPORTS *********** 1 stdcall accept(long ptr ptr) WS_accept 2 stdcall bind(long ptr long) WS_bind 3 stdcall closesocket(long) WS_closesocket diff --git a/dlls/winspool/winspool.drv.spec b/dlls/winspool/winspool.drv.spec index c681c982462..cf6560be14b 100644 --- a/dlls/winspool/winspool.drv.spec +++ b/dlls/winspool/winspool.drv.spec @@ -1,5 +1,3 @@ -init WINSPOOL_EntryPoint - 100 stub @ @ stub ADVANCEDSETUPDIALOG @ stub AbortPrinter diff --git a/dlls/winspool/wspool.c b/dlls/winspool/wspool.c index 1db1dfc7428..f5e4a8d2c52 100644 --- a/dlls/winspool/wspool.c +++ b/dlls/winspool/wspool.c @@ -28,14 +28,12 @@ WINE_DEFAULT_DEBUG_CHANNEL(winspool); /****************************************************************************** - * WINSPOOL_EntryPoint + * DllMain * * Winspool entry point. * */ -BOOL WINAPI WINSPOOL_EntryPoint(HINSTANCE hInstance, - DWORD reason, - LPVOID lpReserved) +BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD reason, LPVOID lpReserved) { switch (reason) { diff --git a/dlls/x11drv/x11drv.spec b/dlls/x11drv/x11drv.spec index 1454cdd96c8..61736738538 100644 --- a/dlls/x11drv/x11drv.spec +++ b/dlls/x11drv/x11drv.spec @@ -1,5 +1,3 @@ -init X11DRV_Init - # GDI driver @ cdecl Arc(ptr long long long long long long long long) X11DRV_Arc diff --git a/dlls/x11drv/x11drv_main.c b/dlls/x11drv/x11drv_main.c index 8f4e5cc4de9..67f7805b157 100644 --- a/dlls/x11drv/x11drv_main.c +++ b/dlls/x11drv/x11drv_main.c @@ -432,7 +432,7 @@ struct x11drv_thread_data *x11drv_init_thread_data(void) /*********************************************************************** * X11DRV initialisation routine */ -BOOL WINAPI X11DRV_Init( HINSTANCE hinst, DWORD reason, LPVOID reserved ) +BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved ) { switch(reason) { diff --git a/tools/winebuild/spec32.c b/tools/winebuild/spec32.c index ae51b5dfd85..e22e865ab0b 100644 --- a/tools/winebuild/spec32.c +++ b/tools/winebuild/spec32.c @@ -598,6 +598,16 @@ void BuildSpec32File( FILE *outfile ) { case SPEC_MODE_DLL: if (init_func) fprintf( outfile, "extern void %s();\n", init_func ); + else + { + fprintf( outfile, "#ifdef __GNUC__\n" ); + fprintf( outfile, "extern void DllMain() __attribute__((weak));\n" ); + fprintf( outfile, "#else\n" ); + fprintf( outfile, "extern void DllMain();\n" ); + fprintf( outfile, "static void __asm__dummy_dllmain(void)" ); + fprintf( outfile, " { asm(\".weak " __ASM_NAME("DllMain") "\"); }\n" ); + fprintf( outfile, "#endif\n" ); + } characteristics = IMAGE_FILE_DLL; break; case SPEC_MODE_GUIEXE: @@ -790,7 +800,7 @@ void BuildSpec32File( FILE *outfile ) fprintf( outfile, " { 0x%04x,\n", IMAGE_NT_OPTIONAL_HDR_MAGIC ); /* Magic */ fprintf( outfile, " 0, 0,\n" ); /* Major/MinorLinkerVersion */ fprintf( outfile, " 0, 0, 0,\n" ); /* SizeOfCode/Data */ - fprintf( outfile, " %s,\n", init_func ? init_func : "0" ); /* AddressOfEntryPoint */ + fprintf( outfile, " %s,\n", init_func ? init_func : "DllMain" ); /* AddressOfEntryPoint */ fprintf( outfile, " 0, 0,\n" ); /* BaseOfCode/Data */ fprintf( outfile, " pe_header,\n" ); /* ImageBase */ fprintf( outfile, " %ld,\n", page_size ); /* SectionAlignment */