3.2.4.4.1.25 IVolumeClient::EnumVolumeMembers (Opnum 29)

The EnumVolumeMembers method enumerates the regions of the specified dynamic volume.<90>

 HRESULT EnumVolumeMembers(
   [in] LdmObjectId volumeId,
   [in, out] unsigned long* memberCount,
   [out, size_is(,*memberCount)] LdmObjectId** memberList
 );

volumeId: Specifies the OID of the volume for which regions are being enumerated.

memberCount: Pointer to the number of disk regions returned in memberList.

memberList: Array of LdmObjectId objects that store the identification handles of the regions. Memory for the array is allocated by the server and freed by the client.

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]; see also section 2.2.1 for HRESULT values predefined by the Disk Management Remote Protocol).<91>

Upon receiving this message, the server MUST validate parameters:

  • Verify that the dynamic volume specified by volumeId is in the list of storage objects.

  • Verify that memberCount and memberList 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:

  1. Enumerate all disk region objects belonging to the dynamic volume from the list of storage objects.

  2. Allocate a buffer large enough to contain the identifiers of all enumerated disk region objects.

  3. Populate the buffer with the identifiers of all enumerated disk region objects.

  4. The buffer MUST be returned to the client in the output parameter memberList.

  5. The number of identifiers in the buffer MUST be returned in the output parameter memberCount.

  6. 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.