SetupQueryDrivesInDiskSpaceList

[New for Windows NT 4.0 Service Pack 3.]

The SetupQueryDrivesInDiskSpaceList function fills a caller-supplied buffer with a list of the drives referenced by the file operations listed in the disk-space list.

BOOL SetupQueryDrivesInDiskSpaceList(
  HDSKSPC DiskSpace,   // handle to the disk-space list
  PSTR ReturnBuffer,   // optional, receives the drive list
  DWORD ReturnBufferSize,  // specifies the size of ReturnBuffer
  PDWORD RequiredSize  // optional, receives the required buffer size
);
 

Parameters

DiskSpace
Supplies a handle to the disk-space list.
ReturnBuffer
This optional parameter points to a buffer that receives the drive specifications, such as "X:" or "\\server\share". This list null-terminated.

If this parameter is not specified and no error occurs, the function returns a non-zero value and RequiredSize receives the buffer size required to hold the drive specifications.

ReturnBufferSize
Supplies the size (in characters for Unicode, bytes for ANSI) of the buffer pointed by ReturnBuffer. This parameter is ignored if ReturnBuffer is not specified.
RequiredSize
This optional parameter receives the size of the buffer required to hold the null-terminated list of drives.

Return Values

If the function succeeds, the return value is a non-zero value.

If the function fails, the return value is zero. To get extended error information, call GetLastError.

If the GetLastError function returns ERROR_INSUFFICIENT_BUFFER, ReturnBuffer was specified, but ReturnBufferSize indicated that the supplied buffer was too small.

QuickInfo

  Windows NT: Use version 4.0 SP3 and later.
  Windows: Use Windows 95 and later.
  Windows CE: Unsupported.
  Header: Declared in setupapi.h.
  Import Library: Link with setupapi.lib.

See Also

Overview, Functions, SetupQuerySpaceRequiredOnDrive