Commit 1e1313d5 authored by Alexandre Julliard's avatar Alexandre Julliard

Made the dll entry point default to DllMain and removed most of the

'init' spec file declarations.
parent cd26935c
init AVIFILE_DllMain
@ stub AVIBuildFilter @ stub AVIBuildFilter
@ stdcall AVIBuildFilterA(str long long) AVIBuildFilterA @ stdcall AVIBuildFilterA(str long long) AVIBuildFilterA
@ stdcall AVIBuildFilterW(wstr long long) AVIBuildFilterW @ stdcall AVIBuildFilterW(wstr long long) AVIBuildFilterW
......
...@@ -195,10 +195,9 @@ DWORD WINAPI AVIFILE_DllCanUnloadNow(void) ...@@ -195,10 +195,9 @@ DWORD WINAPI AVIFILE_DllCanUnloadNow(void)
} }
/***************************************************************************** /*****************************************************************************
* AVIFILE_DllMain [internal] * DllMain [AVIFIL32.init]
*/ */
BOOL WINAPI AVIFILE_DllMain(HINSTANCE hInstDll, DWORD fdwReason, BOOL WINAPI DllMain(HINSTANCE hInstDll, DWORD fdwReason, LPVOID lpvReserved)
LPVOID lpvReserved)
{ {
TRACE("(%p,%lu,%p)\n", hInstDll, fdwReason, lpvReserved); TRACE("(%p,%lu,%p)\n", hInstDll, fdwReason, lpvReserved);
......
init COMCAT_DllEntryPoint
@ stdcall DllCanUnloadNow() COMCAT_DllCanUnloadNow @ stdcall DllCanUnloadNow() COMCAT_DllCanUnloadNow
@ stdcall DllGetClassObject(ptr ptr ptr) COMCAT_DllGetClassObject @ stdcall DllGetClassObject(ptr ptr ptr) COMCAT_DllGetClassObject
@ stdcall DllRegisterServer() COMCAT_DllRegisterServer @ stdcall DllRegisterServer() COMCAT_DllRegisterServer
......
...@@ -62,9 +62,9 @@ static struct regsvr_entry regsvr_entries[6] = { ...@@ -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); TRACE("%p 0x%lx %p\n", hinstDLL, fdwReason, fImpLoad);
......
init COMCTL32_LibMain
# Functions exported by the Win95 comctl32.dll # Functions exported by the Win95 comctl32.dll
# (these need to have these exact ordinals, because some win95 dlls # (these need to have these exact ordinals, because some win95 dlls
# import comctl32.dll by ordinal) # import comctl32.dll by ordinal)
......
...@@ -127,7 +127,7 @@ static const WORD wPattern55AA[] = ...@@ -127,7 +127,7 @@ static const WORD wPattern55AA[] =
/*********************************************************************** /***********************************************************************
* COMCTL32_LibMain [Internal] Initializes the internal 'COMCTL32.DLL'. * DllMain [Internal] Initializes the internal 'COMCTL32.DLL'.
* *
* PARAMS * PARAMS
* hinstDLL [I] handle to the 'dlls' instance * hinstDLL [I] handle to the 'dlls' instance
...@@ -139,8 +139,7 @@ static const WORD wPattern55AA[] = ...@@ -139,8 +139,7 @@ static const WORD wPattern55AA[] =
* Failure: FALSE * Failure: FALSE
*/ */
BOOL WINAPI BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
COMCTL32_LibMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{ {
TRACE("%p,%lx,%p\n", hinstDLL, fdwReason, lpvReserved); TRACE("%p,%lx,%p\n", hinstDLL, fdwReason, lpvReserved);
......
...@@ -52,7 +52,7 @@ BOOL (WINAPI *COMDLG32_SHGetFolderPathA)(HWND,int,HANDLE,DWORD,LPSTR); ...@@ -52,7 +52,7 @@ BOOL (WINAPI *COMDLG32_SHGetFolderPathA)(HWND,int,HANDLE,DWORD,LPSTR);
BOOL (WINAPI *COMDLG32_SHGetFolderPathW)(HWND,int,HANDLE,DWORD,LPWSTR); BOOL (WINAPI *COMDLG32_SHGetFolderPathW)(HWND,int,HANDLE,DWORD,LPWSTR);
/*********************************************************************** /***********************************************************************
* COMDLG32_DllEntryPoint (COMDLG32.init) * DllMain (COMDLG32.init)
* *
* Initialization code for the COMDLG32 DLL * 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"; ...@@ -68,7 +68,7 @@ static char * GPA_string = "Failed to get entry point %s for hinst = 0x%08x\n";
return FALSE; \ 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); TRACE("(%08x, %08lx, %p)\n", hInstance, Reason, Reserved);
......
init COMDLG32_DllEntryPoint
@ stdcall ChooseColorA(ptr) ChooseColorA @ stdcall ChooseColorA(ptr) ChooseColorA
@ stdcall ChooseColorW(ptr) ChooseColorW @ stdcall ChooseColorW(ptr) ChooseColorW
@ stdcall ChooseFontA(ptr) ChooseFontA @ stdcall ChooseFontA(ptr) ChooseFontA
......
# Old C runtime library. All functions provided by msvcrt # Old C runtime library. All functions provided by msvcrt
init CRTDLL_Init
@ forward ??2@YAPAXI@Z msvcrt.??2@YAPAXI@Z @ forward ??2@YAPAXI@Z msvcrt.??2@YAPAXI@Z
@ forward ??3@YAXPAX@Z msvcrt.??3@YAXPAX@Z @ forward ??3@YAXPAX@Z msvcrt.??3@YAXPAX@Z
......
...@@ -77,9 +77,9 @@ static void convert_struct_stat( struct crtdll_stat *dst, const struct _stat *sr ...@@ -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); TRACE("(%p,%ld,%p)\n",hinstDLL,fdwReason,lpvReserved);
......
init D3D8_DllMain
@ stdcall D3D8GetSWInfo() D3D8GetSWInfo @ stdcall D3D8GetSWInfo() D3D8GetSWInfo
@ stdcall DebugSetMute() DebugSetMute @ stdcall DebugSetMute() DebugSetMute
@ stdcall Direct3DCreate8(long) Direct3DCreate8 @ stdcall Direct3DCreate8(long) Direct3DCreate8
......
...@@ -70,7 +70,7 @@ IDirect3D8* WINAPI Direct3DCreate8(UINT SDKVersion) ...@@ -70,7 +70,7 @@ IDirect3D8* WINAPI Direct3DCreate8(UINT SDKVersion)
} }
/* At process attach */ /* 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); TRACE("fdwReason=%ld\n", fdwReason);
if (fdwReason == DLL_PROCESS_ATTACH) if (fdwReason == DLL_PROCESS_ATTACH)
......
init DDRAW_DllMain
@ stub DDHAL32_VidMemAlloc @ stub DDHAL32_VidMemAlloc
@ stub DDHAL32_VidMemFree @ stub DDHAL32_VidMemFree
@ stub DDInternalLock @ stub DDInternalLock
......
...@@ -498,7 +498,7 @@ static int DDRAW_ChooseDefaultDriver(void) ...@@ -498,7 +498,7 @@ static int DDRAW_ChooseDefaultDriver(void)
return best; 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 /* If we were sufficiently cool, DDraw drivers would just be COM
* objects, registered with a particular component category. */ * objects, registered with a particular component category. */
......
init Init
@ stdcall DirectInputCreateA(long long ptr ptr) DirectInputCreateA @ stdcall DirectInputCreateA(long long ptr ptr) DirectInputCreateA
@ stub DirectInputCreateW @ stub DirectInputCreateW
@ stdcall DirectInputCreateEx(long long ptr ptr ptr) DirectInputCreateEx @ stdcall DirectInputCreateEx(long long ptr ptr ptr) DirectInputCreateEx
......
...@@ -50,7 +50,7 @@ static ICOM_VTABLE(IDirectInput8A) ddi8avt; ...@@ -50,7 +50,7 @@ static ICOM_VTABLE(IDirectInput8A) ddi8avt;
static dinput_device * dinput_devices[MAX_WINE_DINPUT_DEVICES]; static dinput_device * dinput_devices[MAX_WINE_DINPUT_DEVICES];
static int nrof_dinput_devices = 0; 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) switch(reason)
{ {
......
init DPLAYX_LibMain
1 stdcall DirectPlayCreate(ptr ptr ptr) DirectPlayCreate 1 stdcall DirectPlayCreate(ptr ptr ptr) DirectPlayCreate
2 stdcall DirectPlayEnumerateA(ptr ptr) DirectPlayEnumerateA 2 stdcall DirectPlayEnumerateA(ptr ptr) DirectPlayEnumerateA
3 stdcall DirectPlayEnumerateW(ptr ptr) DirectPlayEnumerateW 3 stdcall DirectPlayEnumerateW(ptr ptr) DirectPlayEnumerateW
......
...@@ -30,7 +30,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(dplay); ...@@ -30,7 +30,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(dplay);
DWORD gdwDPlaySPRefCount = 0; /* FIXME: Should it be initialized here? */ 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 ); TRACE( "(%p,0x%08lx,%p)\n", hinstDLL, fdwReason, lpvReserved );
......
init MAIN_GdiInit
# ordinal exports # ordinal exports
100 stdcall @(long long str str str) GDI_CallDevInstall16 100 stdcall @(long long str str str) GDI_CallDevInstall16
101 stdcall @(long str str ptr) GDI_CallExtDeviceModePropSheet16 101 stdcall @(long str str ptr) GDI_CallExtDeviceModePropSheet16
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
/*********************************************************************** /***********************************************************************
* GDI initialisation routine * 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; if (reason != DLL_PROCESS_ATTACH) return TRUE;
return GDI_Init(); return GDI_Init();
......
init IMAGEHLP_LibMain
@ stdcall BindImage(str str str) BindImage @ stdcall BindImage(str str str) BindImage
@ stdcall BindImageEx(long str str str ptr) BindImageEx @ stdcall BindImageEx(long str str str ptr) BindImageEx
@ stdcall CheckSumMappedFile(ptr long ptr ptr) CheckSumMappedFile @ stdcall CheckSumMappedFile(ptr long ptr ptr) CheckSumMappedFile
......
...@@ -33,10 +33,9 @@ HANDLE IMAGEHLP_hHeap = (HANDLE) NULL; ...@@ -33,10 +33,9 @@ HANDLE IMAGEHLP_hHeap = (HANDLE) NULL;
static API_VERSION IMAGEHLP_ApiVersion = { 4, 0, 0, 5 }; static API_VERSION IMAGEHLP_ApiVersion = { 4, 0, 0, 5 };
/*********************************************************************** /***********************************************************************
* IMAGEHLP_LibMain (IMAGEHLP.init) * DllMain (IMAGEHLP.init)
*/ */
BOOL WINAPI IMAGEHLP_LibMain( BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{ {
switch(fdwReason) switch(fdwReason)
{ {
......
init MSACM32_LibMain
@ stdcall acmDriverAddA(ptr long long long long) acmDriverAddA @ stdcall acmDriverAddA(ptr long long long long) acmDriverAddA
@ stdcall acmDriverAddW(ptr long long long long) acmDriverAddW @ stdcall acmDriverAddW(ptr long long long long) acmDriverAddW
@ stdcall acmDriverClose(long long) acmDriverClose @ stdcall acmDriverClose(long long) acmDriverClose
......
...@@ -36,9 +36,9 @@ WINE_DEFAULT_DEBUG_CHANNEL(msacm); ...@@ -36,9 +36,9 @@ WINE_DEFAULT_DEBUG_CHANNEL(msacm);
HINSTANCE MSACM_hInstance32 = 0; 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); TRACE("%p 0x%lx %p\n", hInstDLL, fdwReason, lpvReserved);
......
...@@ -50,9 +50,9 @@ static void MSISYS_UninitProcess( void ) ...@@ -50,9 +50,9 @@ static void MSISYS_UninitProcess( void )
} }
/*********************************************************************** /***********************************************************************
* MSISYS_DllMain * DllMain for MSISYS
*/ */
BOOL WINAPI MSISYS_DllMain( BOOL WINAPI DllMain(
HINSTANCE hInstDLL, HINSTANCE hInstDLL,
DWORD fdwReason, DWORD fdwReason,
LPVOID lpvReserved ) LPVOID lpvReserved )
......
init MSISYS_DllMain
@ stdcall DllCanUnloadNow() MSISYS_DllCanUnloadNow @ stdcall DllCanUnloadNow() MSISYS_DllCanUnloadNow
@ stdcall DllGetClassObject(ptr ptr ptr) MSISYS_DllGetClassObject @ stdcall DllGetClassObject(ptr ptr ptr) MSISYS_DllGetClassObject
@ stdcall DllRegisterServer() MSISYS_DllRegisterServer @ stdcall DllRegisterServer() MSISYS_DllRegisterServer
......
...@@ -39,7 +39,7 @@ typedef void (*MSVCRT_free_func)(void*); ...@@ -39,7 +39,7 @@ typedef void (*MSVCRT_free_func)(void*);
/********************************************************************* /*********************************************************************
* Init * Init
*/ */
BOOL WINAPI MSVCRT_Init(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{ {
MSVCRT_thread_data *tls; MSVCRT_thread_data *tls;
......
# msvcrt.dll - MS VC++ Run Time Library # msvcrt.dll - MS VC++ Run Time Library
init MSVCRT_Init
@ cdecl $I10_OUTPUT() MSVCRT_I10_OUTPUT @ cdecl $I10_OUTPUT() MSVCRT_I10_OUTPUT
@ cdecl ??0__non_rtti_object@@QAE@ABV0@@Z(ptr ptr) MSVCRT___non_rtti_object_copy_ctor @ cdecl ??0__non_rtti_object@@QAE@ABV0@@Z(ptr ptr) MSVCRT___non_rtti_object_copy_ctor
......
...@@ -1855,7 +1855,7 @@ LRESULT CALLBACK MSRLE32_DriverProc(DWORD dwDrvID, HDRVR hDrv, UINT uMsg, ...@@ -1855,7 +1855,7 @@ LRESULT CALLBACK MSRLE32_DriverProc(DWORD dwDrvID, HDRVR hDrv, UINT uMsg,
} }
/* DllMain - library initialization code */ /* 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); TRACE("(%p,%ld,%p)\n",(LPVOID)hModule,dwReason,lpReserved);
......
init MSRLE32_DllMain
@ stdcall DriverProc(long long long long long) MSRLE32_DriverProc @ stdcall DriverProc(long long long long long) MSRLE32_DriverProc
...@@ -183,8 +183,7 @@ static UCHAR NETBIOS_Astat(PNCB ncb) ...@@ -183,8 +183,7 @@ static UCHAR NETBIOS_Astat(PNCB ncb)
return NRC_GOODRET; return NRC_GOODRET;
} }
BOOL WINAPI BOOL WINAPI DllMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
NETAPI32_LibMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{ {
TRACE("%p,%lx,%p\n", hinstDLL, fdwReason, lpvReserved); TRACE("%p,%lx,%p\n", hinstDLL, fdwReason, lpvReserved);
......
init NETAPI32_LibMain
@ stub I_BrowserDebugCall @ stub I_BrowserDebugCall
@ stub I_BrowserDebugTrace @ stub I_BrowserDebugTrace
@ stdcall I_BrowserQueryEmulatedDomains(wstr ptr ptr) I_BrowserQueryEmulatedDomains @ stdcall I_BrowserQueryEmulatedDomains(wstr ptr ptr) I_BrowserQueryEmulatedDomains
......
init MAIN_OdbcInit
1 stdcall SQLAllocConnect(long ptr) SQLAllocConnect 1 stdcall SQLAllocConnect(long ptr) SQLAllocConnect
2 stdcall SQLAllocEnv(ptr) SQLAllocEnv 2 stdcall SQLAllocEnv(ptr) SQLAllocEnv
3 stdcall SQLAllocStmt(long ptr) SQLAllocStmt 3 stdcall SQLAllocStmt(long ptr) SQLAllocStmt
......
...@@ -156,7 +156,7 @@ SQLRETURN SQLDummyFunc() ...@@ -156,7 +156,7 @@ SQLRETURN SQLDummyFunc()
} }
/*********************************************************************** /***********************************************************************
* MAIN_OdbcInit [Internal] Initializes the internal 'ODBC32.DLL'. * DllMain [Internal] Initializes the internal 'ODBC32.DLL'.
* *
* PARAMS * PARAMS
* hinstDLL [I] handle to the DLL's instance * hinstDLL [I] handle to the DLL's instance
...@@ -168,8 +168,7 @@ SQLRETURN SQLDummyFunc() ...@@ -168,8 +168,7 @@ SQLRETURN SQLDummyFunc()
* Failure: FALSE * Failure: FALSE
*/ */
BOOL WINAPI BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
MAIN_OdbcInit(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{ {
int i; int i;
TRACE("Initializing or Finalizing proxy ODBC: %p,%lx,%p\n", hinstDLL, fdwReason, lpvReserved); TRACE("Initializing or Finalizing proxy ODBC: %p,%lx,%p\n", hinstDLL, fdwReason, lpvReserved);
......
init OLE32_DllEntryPoint
1 stub BindMoniker # stdcall (ptr long ptr ptr) return 0,ERR_NOTIMPLEMENTED 1 stub BindMoniker # stdcall (ptr long ptr ptr) return 0,ERR_NOTIMPLEMENTED
2 stdcall CLSIDFromProgID(wstr ptr) CLSIDFromProgID 2 stdcall CLSIDFromProgID(wstr ptr) CLSIDFromProgID
3 stdcall CLSIDFromString(wstr ptr) CLSIDFromString 3 stdcall CLSIDFromString(wstr ptr) CLSIDFromString
......
...@@ -29,10 +29,10 @@ WINE_DEFAULT_DEBUG_CHANNEL(ole); ...@@ -29,10 +29,10 @@ WINE_DEFAULT_DEBUG_CHANNEL(ole);
HINSTANCE OLE32_hInstance = 0; 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); TRACE("0x%x 0x%lx %p\n", hinstDLL, fdwReason, fImpLoad);
......
init OpenGL32_Init
@ stdcall wglCreateContext(long) wglCreateContext @ stdcall wglCreateContext(long) wglCreateContext
@ stdcall wglCreateLayerContext(long long) wglCreateLayerContext @ stdcall wglCreateLayerContext(long long) wglCreateLayerContext
@ stdcall wglCopyContext(long long long) wglCopyContext @ stdcall wglCopyContext(long long long) wglCopyContext
......
...@@ -647,7 +647,7 @@ static void process_detach(void) ...@@ -647,7 +647,7 @@ static void process_detach(void)
/*********************************************************************** /***********************************************************************
* OpenGL initialisation routine * OpenGL initialisation routine
*/ */
BOOL WINAPI OpenGL32_Init( HINSTANCE hinst, DWORD reason, LPVOID reserved ) BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved )
{ {
switch(reason) switch(reason)
{ {
......
init RICHED32_LibMain
2 stdcall DllGetVersion (ptr) RICHED32_DllGetVersion 2 stdcall DllGetVersion (ptr) RICHED32_DllGetVersion
...@@ -53,7 +53,7 @@ HANDLE RICHED32_hHeap = (HANDLE)NULL; ...@@ -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 * PARAMS
* hinstDLL [I] handle to the DLL's instance * hinstDLL [I] handle to the DLL's instance
...@@ -65,8 +65,7 @@ HANDLE RICHED32_hHeap = (HANDLE)NULL; ...@@ -65,8 +65,7 @@ HANDLE RICHED32_hHeap = (HANDLE)NULL;
* Failure: FALSE * Failure: FALSE
*/ */
BOOL WINAPI BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
RICHED32_LibMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{ {
TRACE("\n"); TRACE("\n");
switch (fdwReason) switch (fdwReason)
......
init RPCRT4_LibMain
@ stub DceErrorInqTextA @ stub DceErrorInqTextA
@ stub DceErrorInqTextW @ stub DceErrorInqTextW
@ stdcall DllRegisterServer() RPCRT4_DllRegisterServer @ stdcall DllRegisterServer() RPCRT4_DllRegisterServer
......
...@@ -144,7 +144,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(ole); ...@@ -144,7 +144,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(ole);
static UUID uuid_nil; static UUID uuid_nil;
/*********************************************************************** /***********************************************************************
* RPCRT4_LibMain * DllMain
* *
* PARAMS * PARAMS
* hinstDLL [I] handle to the DLL's instance * hinstDLL [I] handle to the DLL's instance
...@@ -156,8 +156,7 @@ static UUID uuid_nil; ...@@ -156,8 +156,7 @@ static UUID uuid_nil;
* Failure: FALSE * Failure: FALSE
*/ */
BOOL WINAPI BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
RPCRT4_LibMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{ {
switch (fdwReason) { switch (fdwReason) {
case DLL_PROCESS_ATTACH: case DLL_PROCESS_ATTACH:
......
...@@ -47,7 +47,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(comm); ...@@ -47,7 +47,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(comm);
HMODULE SERIALUI_hModule = 0; HMODULE SERIALUI_hModule = 0;
/*********************************************************************** /***********************************************************************
* SERIALUI_LibMain [Internal] Initializes the internal 'SERIALUI.DLL'. * DllMain [Internal] Initializes the internal 'SERIALUI.DLL'.
* *
* PARAMS * PARAMS
* hinstDLL [I] handle to the DLL's instance * hinstDLL [I] handle to the DLL's instance
...@@ -59,8 +59,7 @@ HMODULE SERIALUI_hModule = 0; ...@@ -59,8 +59,7 @@ HMODULE SERIALUI_hModule = 0;
* Failure: FALSE * Failure: FALSE
*/ */
BOOL WINAPI BOOL WINAPI DllMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
SERIALUI_LibMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{ {
TRACE("%p,%lx,%p\n", hinstDLL, fdwReason, lpvReserved); TRACE("%p,%lx,%p\n", hinstDLL, fdwReason, lpvReserved);
......
init SERIALUI_LibMain
2 stdcall EnumPropPages(ptr ptr ptr) SERIALUI_EnumPropPages 2 stdcall EnumPropPages(ptr ptr ptr) SERIALUI_EnumPropPages
3 stdcall drvCommConfigDialog(ptr long ptr) SERIALUI_CommConfigDialog 3 stdcall drvCommConfigDialog(ptr long ptr) SERIALUI_CommConfigDialog
4 stdcall drvSetDefaultCommConfig(str ptr long) SERIALUI_SetDefaultCommConfig 4 stdcall drvSetDefaultCommConfig(str ptr long) SERIALUI_SetDefaultCommConfig
......
init Shell32LibMain
# Functions exported by the Win95 shell32.dll # Functions exported by the Win95 shell32.dll
# (these need to have these exact ordinals, for some # (these need to have these exact ordinals, for some
# win95 and winNT dlls import shell32.dll by ordinal) # win95 and winNT dlls import shell32.dll by ordinal)
......
...@@ -944,13 +944,13 @@ HIMAGELIST ShellBigIconList = 0; ...@@ -944,13 +944,13 @@ HIMAGELIST ShellBigIconList = 0;
/************************************************************************* /*************************************************************************
* SHELL32 LibMain * SHELL32 DllMain
* *
* NOTES * NOTES
* calling oleinitialize here breaks sone apps. * 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); TRACE("0x%x 0x%lx %p\n", hinstDLL, fdwReason, fImpLoad);
......
init SHLWAPI_LibMain
1 stdcall @(str ptr) SHLWAPI_1 1 stdcall @(str ptr) SHLWAPI_1
2 stdcall @(wstr ptr) SHLWAPI_2 2 stdcall @(wstr ptr) SHLWAPI_2
3 stdcall @(str long) SHLWAPI_3 3 stdcall @(str long) SHLWAPI_3
......
...@@ -40,12 +40,12 @@ HMODULE SHLWAPI_hversion = 0; ...@@ -40,12 +40,12 @@ HMODULE SHLWAPI_hversion = 0;
DWORD SHLWAPI_ThreadRef_index = -1; DWORD SHLWAPI_ThreadRef_index = -1;
/************************************************************************* /*************************************************************************
* SHLWAPI LibMain * SHLWAPI DllMain
* *
* NOTES * NOTES
* calling oleinitialize here breaks sone apps. * 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); TRACE("%p 0x%lx %p\n", hinstDLL, fdwReason, fImpLoad);
switch (fdwReason) switch (fdwReason)
......
...@@ -27,9 +27,9 @@ ...@@ -27,9 +27,9 @@
WINE_DEFAULT_DEBUG_CHANNEL(snmpapi); WINE_DEFAULT_DEBUG_CHANNEL(snmpapi);
/*********************************************************************** /***********************************************************************
* SNMPAPI_DllMain * DllMain for SNMPAPI
*/ */
BOOL WINAPI SNMPAPI_DllMain( BOOL WINAPI DllMain(
HINSTANCE hInstDLL, HINSTANCE hInstDLL,
DWORD fdwReason, DWORD fdwReason,
LPVOID lpvReserved) LPVOID lpvReserved)
......
init SNMPAPI_DllMain
@ stub SnmpSvcAddrIsIpx @ stub SnmpSvcAddrIsIpx
@ stub SnmpSvcAddrToSocket @ stub SnmpSvcAddrToSocket
@ stub SnmpSvcBufRevAndCpy @ stub SnmpSvcBufRevAndCpy
......
init TTYDRV_Init
# GDI driver # GDI driver
@ cdecl Arc(ptr long long long long long long long long) TTYDRV_DC_Arc @ cdecl Arc(ptr long long long long long long long long) TTYDRV_DC_Arc
......
...@@ -74,7 +74,7 @@ static void process_detach(void) ...@@ -74,7 +74,7 @@ static void process_detach(void)
/*********************************************************************** /***********************************************************************
* TTYDRV initialisation routine * TTYDRV initialisation routine
*/ */
BOOL WINAPI TTYDRV_Init( HINSTANCE hinst, DWORD reason, LPVOID reserved ) BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved )
{ {
switch(reason) switch(reason)
{ {
......
...@@ -26,8 +26,7 @@ ...@@ -26,8 +26,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(twain); WINE_DEFAULT_DEBUG_CHANNEL(twain);
BOOL WINAPI BOOL WINAPI DllMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
TWAIN_LibMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{ {
TRACE("%p,%lx,%p\n", hinstDLL, fdwReason, lpvReserved); TRACE("%p,%lx,%p\n", hinstDLL, fdwReason, lpvReserved);
......
init TWAIN_LibMain
@ stdcall DSM_Entry(ptr ptr long long long ptr) DSM_Entry @ stdcall DSM_Entry(ptr ptr long long long ptr) DSM_Entry
init URLMON_DllEntryPoint
1 stub CDLGetLongPathNameA 1 stub CDLGetLongPathNameA
2 stub CDLGetLongPathNameW 2 stub CDLGetLongPathNameW
@ stub AsyncGetClassBits @ stub AsyncGetClassBits
......
...@@ -31,10 +31,9 @@ WINE_DEFAULT_DEBUG_CHANNEL(urlmon); ...@@ -31,10 +31,9 @@ WINE_DEFAULT_DEBUG_CHANNEL(urlmon);
HINSTANCE URLMON_hInstance = 0; HINSTANCE URLMON_hInstance = 0;
/*********************************************************************** /***********************************************************************
* DllEntryPoint (OLE32.@) * DllMain (URLMON.init)
*/ */
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
BOOL WINAPI URLMON_DllEntryPoint(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
{ {
TRACE("%p 0x%lx %p\n", hinstDLL, fdwReason, fImpLoad); TRACE("%p 0x%lx %p\n", hinstDLL, fdwReason, fImpLoad);
......
...@@ -56,7 +56,7 @@ static CRITICAL_SECTION ASPI_CritSection = CRITICAL_SECTION_INIT("ASPI_CritSecti ...@@ -56,7 +56,7 @@ static CRITICAL_SECTION ASPI_CritSection = CRITICAL_SECTION_INIT("ASPI_CritSecti
#endif /* defined(linux) */ #endif /* defined(linux) */
BOOL WINAPI WNASPI32_LibMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID fImpLoad) BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID fImpLoad)
{ {
#ifdef linux #ifdef linux
switch( fdwReason ) switch( fdwReason )
......
init WNASPI32_LibMain
# we have several ordinal clashes here, it seems... # we have several ordinal clashes here, it seems...
1 cdecl GetASPI32SupportInfo() GetASPI32SupportInfo 1 cdecl GetASPI32SupportInfo() GetASPI32SupportInfo
......
...@@ -668,9 +668,9 @@ void DOSVM_RealModeInterrupt( BYTE intnum, CONTEXT86 *context ) ...@@ -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); TRACE_(module)("(%p,%ld,%p)\n", hinstDLL, fdwReason, lpvReserved);
......
init DOSVM_Init
@ stdcall LoadDosExe(str long) MZ_LoadImage @ stdcall LoadDosExe(str long) MZ_LoadImage
@ stdcall EmulateInterruptPM(ptr long) DOSVM_EmulateInterruptPM @ stdcall EmulateInterruptPM(ptr long) DOSVM_EmulateInterruptPM
......
...@@ -100,12 +100,12 @@ static LOGFONTA DefaultLogFont = { ...@@ -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); TRACE("(%p, 0x%08lx, %p)\n", hinst, reason, reserved);
......
init PSDRV_Init
# GDI driver # GDI driver
@ cdecl Arc(ptr long long long long long long long long) PSDRV_Arc @ cdecl Arc(ptr long long long long long long long long) PSDRV_Arc
......
...@@ -97,7 +97,7 @@ LPWORKREQUEST lpHeadWorkQueue; ...@@ -97,7 +97,7 @@ LPWORKREQUEST lpHeadWorkQueue;
LPWORKREQUEST lpWorkQueueTail; LPWORKREQUEST lpWorkQueueTail;
/*********************************************************************** /***********************************************************************
* WININET_LibMain [Internal] Initializes the internal 'WININET.DLL'. * DllMain [Internal] Initializes the internal 'WININET.DLL'.
* *
* PARAMS * PARAMS
* hinstDLL [I] handle to the DLL's instance * hinstDLL [I] handle to the DLL's instance
...@@ -109,8 +109,7 @@ LPWORKREQUEST lpWorkQueueTail; ...@@ -109,8 +109,7 @@ LPWORKREQUEST lpWorkQueueTail;
* Failure: FALSE * Failure: FALSE
*/ */
BOOL WINAPI BOOL WINAPI DllMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
WININET_LibMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{ {
TRACE("%p,%lx,%p\n", hinstDLL, fdwReason, lpvReserved); TRACE("%p,%lx,%p\n", hinstDLL, fdwReason, lpvReserved);
......
init WININET_LibMain
@ stdcall InternetInitializeAutoProxyDll(long) InternetInitializeAutoProxyDll @ stdcall InternetInitializeAutoProxyDll(long) InternetInitializeAutoProxyDll
@ stub ShowCertificate @ stub ShowCertificate
@ stdcall CommitUrlCacheEntryA(str str long long long str long str str) CommitUrlCacheEntryA @ stdcall CommitUrlCacheEntryA(str str long long long str long str str) CommitUrlCacheEntryA
......
...@@ -118,7 +118,7 @@ static DWORD MCI_SendCommandAsync(UINT wDevID, UINT wMsg, DWORD dwParam1, ...@@ -118,7 +118,7 @@ static DWORD MCI_SendCommandAsync(UINT wDevID, UINT wMsg, DWORD dwParam1,
HINSTANCE MCIAVI_hInstance = 0; 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) { switch (fdwReason) {
case DLL_PROCESS_ATTACH: case DLL_PROCESS_ATTACH:
......
init MCIAVI_LibMain
@ stdcall DriverProc(long long long long long) MCIAVI_DriverProc @ stdcall DriverProc(long long long long long) MCIAVI_DriverProc
...@@ -108,12 +108,12 @@ BOOL WINMM_CheckForMMSystem(void) ...@@ -108,12 +108,12 @@ BOOL WINMM_CheckForMMSystem(void)
} }
/************************************************************************** /**************************************************************************
* DllEntryPoint (WINMM.init) * DllMain (WINMM.init)
* *
* WINMM DLL entry point * 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); TRACE("%p 0x%lx %p\n", hInstDLL, fdwReason, fImpLoad);
......
init WINMM_LibMain
# ordinal exports # ordinal exports
1 stdcall @(ptr long long) PlaySoundA 1 stdcall @(ptr long long) PlaySoundA
3 stub @ 3 stub @
......
...@@ -428,9 +428,9 @@ static void WINSOCK_DeleteIData(void) ...@@ -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); TRACE("%p 0x%lx %p\n", hInstDLL, fdwReason, fImpLoad);
switch (fdwReason) { switch (fdwReason) {
......
...@@ -2,9 +2,6 @@ ...@@ -2,9 +2,6 @@
# #
# Export table information obtained from Windows 2000 ws2_32.dll # Export table information obtained from Windows 2000 ws2_32.dll
init WS_LibMain
# EXPORTS ***********
1 stdcall accept(long ptr ptr) WS_accept 1 stdcall accept(long ptr ptr) WS_accept
2 stdcall bind(long ptr long) WS_bind 2 stdcall bind(long ptr long) WS_bind
3 stdcall closesocket(long) WS_closesocket 3 stdcall closesocket(long) WS_closesocket
......
init WINSPOOL_EntryPoint
100 stub @ 100 stub @
@ stub ADVANCEDSETUPDIALOG @ stub ADVANCEDSETUPDIALOG
@ stub AbortPrinter @ stub AbortPrinter
......
...@@ -28,14 +28,12 @@ WINE_DEFAULT_DEBUG_CHANNEL(winspool); ...@@ -28,14 +28,12 @@ WINE_DEFAULT_DEBUG_CHANNEL(winspool);
/****************************************************************************** /******************************************************************************
* WINSPOOL_EntryPoint * DllMain
* *
* Winspool entry point. * Winspool entry point.
* *
*/ */
BOOL WINAPI WINSPOOL_EntryPoint(HINSTANCE hInstance, BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD reason, LPVOID lpReserved)
DWORD reason,
LPVOID lpReserved)
{ {
switch (reason) switch (reason)
{ {
......
init X11DRV_Init
# GDI driver # GDI driver
@ cdecl Arc(ptr long long long long long long long long) X11DRV_Arc @ cdecl Arc(ptr long long long long long long long long) X11DRV_Arc
......
...@@ -432,7 +432,7 @@ struct x11drv_thread_data *x11drv_init_thread_data(void) ...@@ -432,7 +432,7 @@ struct x11drv_thread_data *x11drv_init_thread_data(void)
/*********************************************************************** /***********************************************************************
* X11DRV initialisation routine * X11DRV initialisation routine
*/ */
BOOL WINAPI X11DRV_Init( HINSTANCE hinst, DWORD reason, LPVOID reserved ) BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved )
{ {
switch(reason) switch(reason)
{ {
......
...@@ -598,6 +598,16 @@ void BuildSpec32File( FILE *outfile ) ...@@ -598,6 +598,16 @@ void BuildSpec32File( FILE *outfile )
{ {
case SPEC_MODE_DLL: case SPEC_MODE_DLL:
if (init_func) fprintf( outfile, "extern void %s();\n", init_func ); 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; characteristics = IMAGE_FILE_DLL;
break; break;
case SPEC_MODE_GUIEXE: case SPEC_MODE_GUIEXE:
...@@ -790,7 +800,7 @@ void BuildSpec32File( FILE *outfile ) ...@@ -790,7 +800,7 @@ void BuildSpec32File( FILE *outfile )
fprintf( outfile, " { 0x%04x,\n", IMAGE_NT_OPTIONAL_HDR_MAGIC ); /* Magic */ fprintf( outfile, " { 0x%04x,\n", IMAGE_NT_OPTIONAL_HDR_MAGIC ); /* Magic */
fprintf( outfile, " 0, 0,\n" ); /* Major/MinorLinkerVersion */ fprintf( outfile, " 0, 0,\n" ); /* Major/MinorLinkerVersion */
fprintf( outfile, " 0, 0, 0,\n" ); /* SizeOfCode/Data */ 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, " 0, 0,\n" ); /* BaseOfCode/Data */
fprintf( outfile, " pe_header,\n" ); /* ImageBase */ fprintf( outfile, " pe_header,\n" ); /* ImageBase */
fprintf( outfile, " %ld,\n", page_size ); /* SectionAlignment */ fprintf( outfile, " %ld,\n", page_size ); /* SectionAlignment */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment