FreeLibrary function Null safety kernel32

int FreeLibrary(
  1. int hLibModule

Frees the loaded dynamic-link library (DLL) module and, if necessary, decrements its reference count. When the reference count reaches zero, the module is unloaded from the address space of the calling process and the handle is no longer valid.

BOOL FreeLibrary(
  HMODULE hLibModule


int FreeLibrary(int hLibModule) {
  final _FreeLibrary = _kernel32.lookupFunction<
      Int32 Function(IntPtr hLibModule),
      int Function(int hLibModule)>('FreeLibrary');
  return _FreeLibrary(hLibModule);