GetLogicalDriveStrings function kernel32

Win32Result<int> GetLogicalDriveStrings(
  1. int nBufferLength,
  2. PWSTR? lpBuffer
)

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

To learn more, see learn.microsoft.com/windows/win32/api/fileapi/nf-fileapi-getlogicaldrivestringsw.

Implementation

Win32Result<int> GetLogicalDriveStrings(int nBufferLength, PWSTR? lpBuffer) {
  resolveGetLastError();
  final result_ = _GetLogicalDriveStrings(nBufferLength, lpBuffer ?? nullptr);
  return .new(value: result_, error: GetLastError());
}