VirtualFree function Null safety kernel32

int VirtualFree (
  1. Pointer<NativeType> lpAddress,
  2. int dwSize,
  3. int dwFreeType
)

Releases, decommits, or releases and decommits a region of pages within the virtual address space of the calling process.

BOOL VirtualFree(
  LPVOID lpAddress,
  SIZE_T dwSize,
  DWORD  dwFreeType
);

Implementation

int VirtualFree(Pointer lpAddress, int dwSize, int dwFreeType) {
  final _VirtualFree = _kernel32.lookupFunction<
      Int32 Function(Pointer lpAddress, IntPtr dwSize, Uint32 dwFreeType),
      int Function(
          Pointer lpAddress, int dwSize, int dwFreeType)>('VirtualFree');
  return _VirtualFree(lpAddress, dwSize, dwFreeType);
}