2006-02-17 00:04:10 +00:00
|
|
|
/* Copyright 2001 Mike McCormack
|
|
|
|
* Copyright 2003 Juan Lang
|
|
|
|
*
|
|
|
|
* 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
|
2007-07-27 09:46:28 +00:00
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
2006-02-17 00:04:10 +00:00
|
|
|
*/
|
|
|
|
|
2013-06-13 21:20:45 +00:00
|
|
|
#include "netapi32.h"
|
2012-11-05 22:51:08 +00:00
|
|
|
|
2014-05-03 12:53:58 +00:00
|
|
|
WINE_DEFAULT_DEBUG_CHANNEL(netapi32);
|
2006-02-17 00:04:10 +00:00
|
|
|
|
|
|
|
BOOL WINAPI DllMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
|
|
|
|
{
|
2007-07-27 09:46:28 +00:00
|
|
|
TRACE("%p,%x,%p\n", hinstDLL, fdwReason, lpvReserved);
|
2006-02-17 00:04:10 +00:00
|
|
|
|
|
|
|
switch (fdwReason) {
|
|
|
|
case DLL_PROCESS_ATTACH:
|
2019-03-10 21:19:12 +00:00
|
|
|
InitializeListHead(&g_EnumContextListHead);
|
|
|
|
InitializeCriticalSection(&g_EnumContextListLock);
|
2006-02-17 00:04:10 +00:00
|
|
|
DisableThreadLibraryCalls(hinstDLL);
|
|
|
|
NetBIOSInit();
|
|
|
|
NetBTInit();
|
|
|
|
break;
|
|
|
|
case DLL_PROCESS_DETACH:
|
2014-05-03 12:53:58 +00:00
|
|
|
if (lpvReserved) break;
|
2006-02-17 00:04:10 +00:00
|
|
|
NetBIOSShutdown();
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
}
|