FreeLibraryAndExitThread function kernel32
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);