wintun/api/api.c
Simon Rozman 6f55786c65 api: port tun\wintun\namespace_windows.go from wireguard-go
Signed-off-by: Simon Rozman <simon@rozman.si>
2020-10-30 16:50:58 +01:00

28 lines
521 B
C

/* SPDX-License-Identifier: GPL-2.0
*
* Copyright (C) 2018-2020 WireGuard LLC. All Rights Reserved.
*/
#include "api.h"
HINSTANCE ResourceModule;
BOOL APIENTRY
DllMain(_In_ HINSTANCE hinstDLL, _In_ DWORD fdwReason, _In_ LPVOID lpvReserved)
{
UNREFERENCED_PARAMETER(lpvReserved);
switch (fdwReason)
{
case DLL_PROCESS_ATTACH:
ResourceModule = hinstDLL;
NamespaceInit();
break;
case DLL_PROCESS_DETACH:
NamespaceCleanup();
break;
}
return TRUE;
}