FreeLibraryAndExitThread function kernel32

void FreeLibraryAndExitThread(
  1. HMODULE hLibModule,
  2. int dwExitCode
)

Decrements the reference count of a loaded dynamic-link library (DLL) by one, then calls ExitThread to terminate the calling thread.

To learn more, see learn.microsoft.com/windows/win32/api/libloaderapi/nf-libloaderapi-freelibraryandexitthread.

Implementation

@pragma('vm:prefer-inline')
void FreeLibraryAndExitThread(HMODULE hLibModule, int dwExitCode) =>
    _FreeLibraryAndExitThread(hLibModule, dwExitCode);