3.2.4.4.1.1 IVolumeClient::EnumDisks (Opnum 3)
The EnumDisks method enumerates the server's mass storage devices.
-
HRESULT EnumDisks( [out] unsigned long* diskCount, [out, size_is(,*diskCount)] DISK_INFO** diskList );
diskCount: Number of pointers in diskList.
diskList: Pointer to an array of DISK_INFO structures.
Return Values: The method MUST return 0 or a nonerror HRESULT on success, or an implementation-specific nonzero error code on failure (as specified in [MS-ERREF] section 2.1; see also section 2.2.1 for HRESULT values predefined by the Disk Management Remote Protocol).
Upon receiving this message, the server MUST validate parameters:
Verify that diskCount and diskList are not NULL.
If parameter validation fails, the server MUST fail the operation immediately, returning an appropriate error as its response to the client.
Otherwise, the server MUST compose a response to the client as follows:
Enumerate all disk objects from the list of storage objects.
Allocate a buffer large enough to contain DISK_INFO structures that describe all enumerated disks.
Populate each DISK_INFO structure in the buffer with information about the disk.
The buffer MUST be returned to the client in the output parameter diskList.
The number of DISK_INFO structures in the buffer MUST be returned in the output parameter diskCount.
Return a response that contains the output parameters mentioned previously and the status of the operation.
The server MUST NOT change the list of storage objects as part of processing this message.