FindNextVolume function Null safety kernel32

int FindNextVolume(
  1. int hFindVolume,
  2. Pointer<Utf16> lpszVolumeName,
  3. int cchBufferLength
)

Continues a volume search started by a call to the FindFirstVolume function. FindNextVolume finds one volume per call.

BOOL FindNextVolumeW(
  HANDLE hFindVolume,
  LPWSTR lpszVolumeName,
  DWORD  cchBufferLength
);

Implementation

int FindNextVolume(
    int hFindVolume, Pointer<Utf16> lpszVolumeName, int cchBufferLength) {
  final _FindNextVolume = _kernel32.lookupFunction<
      Int32 Function(IntPtr hFindVolume, Pointer<Utf16> lpszVolumeName,
          Uint32 cchBufferLength),
      int Function(int hFindVolume, Pointer<Utf16> lpszVolumeName,
          int cchBufferLength)>('FindNextVolumeW');
  return _FindNextVolume(hFindVolume, lpszVolumeName, cchBufferLength);
}