Kernel32FreeLibraryAndExitThread Method
Decrements the reference count of a loaded dynamic-link library (DLL) by one, then calls ExitThread to terminate the calling thread.
This function does not return a value. Invalid module handles are ignored.
Namespace: DevCase.Win32.NativeMethodsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("Kernel32.dll", ExactSpelling = true)]
public static void FreeLibraryAndExitThread(
IntPtr hModule,
uint exitCode
)
<DllImportAttribute("Kernel32.dll", ExactSpelling := true>]
Public Shared Sub FreeLibraryAndExitThread (
hModule As IntPtr,
exitCode As UInteger
)
Dim hModule As IntPtr
Dim exitCode As UInteger
Kernel32.FreeLibraryAndExitThread(hModule,
exitCode)
public:
[DllImportAttribute(L"Kernel32.dll", ExactSpelling = true)]
static void FreeLibraryAndExitThread(
[InAttribute] IntPtr hModule,
unsigned int exitCode
)
[<DllImportAttribute("Kernel32.dll", ExactSpelling = true)>]
static member FreeLibraryAndExitThread :
hModule : IntPtr *
exitCode : uint32 -> unit
No code example is currently available or this language may not be supported.
Parameters
- hModule IntPtr
-
A handle to the DLL module whose reference count the function decrements.
The LoadLibrary(String) or GetModuleHandleEx(GetModuleHandleExFlags, String, IntPtr) function returns this handle.
Do not call this function with a handle returned by the GetModuleHandle(String) function,
since this function does not maintain a reference count for the module.
- exitCode UInt32
-
The exit code for the calling thread.