#ifndef _NTLDR_H #if (PHNT_MODE != PHNT_MODE_KERNEL) NTSYSAPI NTSTATUS NTAPI LdrUnloadDll( _In_ PVOID DllHandle ); #endif #endif View code on GitHub
In fact, ModuleHandle is virtual address of loaded module, not a typical HANDLE to object.
ModuleHandle
HANDLE
LdrLoadDll
NtLoadDriver
NtUnloadDriver