Commit 10897a1f authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

webservices: Call WSACleanup when the dll is unloaded.

parent 70cedb3e
......@@ -31,6 +31,8 @@
WINE_DEFAULT_DEBUG_CHANNEL(webservices);
HINSTANCE webservices_instance;
static BOOL winsock_loaded;
static BOOL WINAPI winsock_startup( INIT_ONCE *once, void *param, void **ctx )
......@@ -48,6 +50,26 @@ void winsock_init(void)
InitOnceExecuteOnce( &once, winsock_startup, NULL, NULL );
}
/******************************************************************
* DllMain (webservices.@)
*/
BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, void *reserved )
{
switch (reason)
{
case DLL_PROCESS_ATTACH:
webservices_instance = hinst;
DisableThreadLibraryCalls( hinst );
break;
case DLL_PROCESS_DETACH:
if (reserved) break;
if (winsock_loaded) WSACleanup();
break;
}
return TRUE;
}
static const struct prop_desc listener_props[] =
{
{ sizeof(ULONG), FALSE }, /* WS_LISTENER_PROPERTY_LISTEN_BACKLOG */
......
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