GetSystemDirectory function Null safety kernel32

int GetSystemDirectory(
  1. Pointer<Utf16> lpBuffer,
  2. int uSize

Retrieves the path of the system directory. The system directory contains system files such as dynamic-link libraries and drivers.

UINT GetSystemDirectoryW(
  LPWSTR lpBuffer,
  UINT   uSize


int GetSystemDirectory(Pointer<Utf16> lpBuffer, int uSize) {
  final _GetSystemDirectory = _kernel32.lookupFunction<
      Uint32 Function(Pointer<Utf16> lpBuffer, Uint32 uSize),
      int Function(Pointer<Utf16> lpBuffer, int uSize)>('GetSystemDirectoryW');
  return _GetSystemDirectory(lpBuffer, uSize);