3.2.4.13 CprepDiskGetUniqueIds (Opnum 22)

The CprepDiskGetUniqueIds method returns device ID data about the ClusPrepDisk.

 HRESULT CprepDiskGetUniqueIds(
   [in] CPREP_DISKID DiskId,
   [in] unsigned long cbData,
   [out, size_is(cbData), length_is(*pcbDataOut)] 
     byte* pbData,
   [out] unsigned long* pcbDataOut,
   [out] unsigned long* pcbNeeded
 );

DiskId: The identifier representing the ClusPrepDisk for which to retrieve the device ID data.

cbData: The size, in bytes, of the pbData buffer passed to the server.

pbData: The output buffer for the device ID data.

pcbDataOut: The size, in bytes, of the amount of data written to pbData on a successful return.

pcbNeeded: If ERROR_INSUFFICIENT_BUFFER is returned, then this parameter contains the size, in bytes, of the buffer required for a successful call.

Return Values: A signed 32-bit value that indicates return status. If the method returns a negative value, it has failed. Zero or positive values indicate success, with the lower 16 bits in positive nonzero values containing warnings or flags defined in the method implementation. For more information about Win32 error codes and HRESULT values, see [MS-ERREF] sections 2.2 and 2.1.

Return value/code

Description

0x00000000

S_OK

The call was successful.

0x8007007A

ERROR_INSUFFICIENT_BUFFER

pbData is not large enough.

0x80070032

ERROR_NOT_SUPPORTED

The disk does not support device ID data.

0x80070548

ERROR_INVALID_SERVER_STATE

The server's Prepare State is not Online.

For any other condition, this method MUST return a value that is not one of the values listed in the preceding table. The client MUST behave in one consistent, identical manner for all values that are not listed in the preceding table.

Exceptions Thrown: No exceptions are thrown beyond those thrown by the underlying RPC protocol [MS-RPCE].

The opnum field value for this method is 22.

When processing this call, the server MUST do the following:

  • Obtain the ClusPrepDisk identified by the DiskId parameter as described in section 3.2.4.

  • Retrieve the page 83h SCSI data defined in [SPC-3] section 7.6.3.1 in an implementation-specific way for the given disk.

  • If the retrieved 83h SCSI data does not contain at least one identifier of the type SCSI name string, EUI-64 based  or NAA as defined in [SPC-3] section 7.6.3.1, then return ERROR_NOT_SUPPORTED.

  • If the data buffer pbData with size cbData is not large enough to store the SCSI page 83 data formatted as a STORAGE_DEVICE_ID_DESCRIPTOR structure, then return ERROR_INSUFFICIENT_BUFFER.

  • Pack the data pbData formatted as a STORAGE_DEVICE_ID_DESCRIPTOR structure.

The server returns the following data to the client:

  • A STORAGE_DEVICE_ID_DESCRIPTOR with SCSI page 83h data for the disk