GetLogicalDriveStrings function Null safety kernel32

int GetLogicalDriveStrings(
  1. int nBufferLength,
  2. Pointer<Utf16> lpBuffer

Fills a buffer with strings that specify valid drives in the system.

DWORD GetLogicalDriveStringsW(
  DWORD  nBufferLength,
  LPWSTR lpBuffer


int GetLogicalDriveStrings(int nBufferLength, Pointer<Utf16> lpBuffer) {
  final _GetLogicalDriveStrings = _kernel32.lookupFunction<
      Uint32 Function(Uint32 nBufferLength, Pointer<Utf16> lpBuffer),
      int Function(int nBufferLength,
          Pointer<Utf16> lpBuffer)>('GetLogicalDriveStringsW');
  return _GetLogicalDriveStrings(nBufferLength, lpBuffer);