aboutsummaryrefslogtreecommitdiffstats
path: root/api/entry.c
diff options
context:
space:
mode:
authorSimon Rozman <simon@rozman.si>2020-11-03 12:29:34 +0100
committerSimon Rozman <simon@rozman.si>2020-11-04 13:21:42 +0100
commitf657e6fd278732d054b064bb4836702d06e176f0 (patch)
tree3f113195349908e0390b1abc8f315619df4d598e /api/entry.c
parentexample: account for adapter reuse (diff)
downloadwintun-f657e6fd278732d054b064bb4836702d06e176f0.tar.xz
wintun-f657e6fd278732d054b064bb4836702d06e176f0.zip
api: use GetLastError() to report failures like standard Win32
Signed-off-by: Simon Rozman <simon@rozman.si>
Diffstat (limited to 'api/entry.c')
-rw-r--r--api/entry.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/api/entry.c b/api/entry.c
index 4b56a12..6afccbc 100644
--- a/api/entry.c
+++ b/api/entry.c
@@ -22,7 +22,8 @@ HINSTANCE ResourceModule;
HANDLE ModuleHeap;
SECURITY_ATTRIBUTES SecurityAttributes = { .nLength = sizeof(SECURITY_ATTRIBUTES) };
-static FARPROC WINAPI DelayedLoadLibraryHook(unsigned dliNotify, PDelayLoadInfo pdli)
+static FARPROC WINAPI
+DelayedLoadLibraryHook(unsigned dliNotify, PDelayLoadInfo pdli)
{
if (dliNotify != dliNotePreLoadLibrary)
return NULL;
@@ -53,7 +54,7 @@ DllMain(_In_ HINSTANCE hinstDLL, _In_ DWORD fdwReason, _In_ LPVOID lpvReserved)
break;
case DLL_PROCESS_DETACH:
- NamespaceCleanup();
+ NamespaceDone();
LocalFree(SecurityAttributes.lpSecurityDescriptor);
HeapDestroy(ModuleHeap);
break;