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) {
  final result_ = GetLogicalDriveStringsW_Wrapper(
    nBufferLength,
    lpBuffer ?? nullptr,
  );
  return Win32Result(value: result_.value.u32, error: result_.error);
}