winemac.drv: Added ThreadDetach entry point and use it instead of DllMain.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2016-08-25 14:36:54 +02:00 committed by Alexandre Julliard
parent f0e7bd248e
commit 8f0557940a
2 changed files with 4 additions and 5 deletions

View File

@ -290,9 +290,9 @@ static BOOL process_attach(void)
/***********************************************************************
* thread_detach
* ThreadDetach (MACDRV.@)
*/
static void thread_detach(void)
void CDECL macdrv_ThreadDetach(void)
{
struct macdrv_thread_data *data = macdrv_thread_data();
@ -382,12 +382,10 @@ BOOL WINAPI DllMain(HINSTANCE hinst, DWORD reason, LPVOID reserved)
switch(reason)
{
case DLL_PROCESS_ATTACH:
DisableThreadLibraryCalls( hinst );
macdrv_module = hinst;
ret = process_attach();
break;
case DLL_THREAD_DETACH:
thread_detach();
break;
}
return ret;
}

View File

@ -42,6 +42,7 @@
@ cdecl ShowWindow(long long ptr long) macdrv_ShowWindow
@ cdecl SysCommand(long long long) macdrv_SysCommand
@ cdecl SystemParametersInfo(long long ptr long) macdrv_SystemParametersInfo
@ cdecl ThreadDetach() macdrv_ThreadDetach
@ cdecl ToUnicodeEx(long long ptr ptr long long long) macdrv_ToUnicodeEx
@ cdecl UnregisterHotKey(long long long) macdrv_UnregisterHotKey
@ cdecl UpdateLayeredWindow(long ptr ptr) macdrv_UpdateLayeredWindow