3.1.4.13 PrepareShadowCopySet (Opnum 12)

The PrepareShadowCopySet method is invoked by the client to ensure that the server has completed preparation for creating the shadow copy set.

 DWORD PrepareShadowCopySet(
         [in] handle_t hBinding,
         [in] GUID ShadowCopySetId,
         [in] unsigned long TimeOutInMilliseconds);
  

hBinding: An RPC binding handle (as defined in [C706]).

ShadowCopySetId: The GUID of the shadow copy set, assigned by the server.

TimeOutInMilliseconds: The time in milliseconds for which the server MUST wait for the shadow copy preparation process to complete.

Return Values: The method returns one of the values as specified in section 2.2.4. The most common error codes are listed below.

Return value/code

Description

0x80070005

E_ACCESSDENIED

The caller does not have permission to perform the operation.

0x80070057

E_INVALIDARG

One or more arguments are invalid.

0x80042301

FSRVP_E_BAD_STATE

The method call is invalid because of the state of the server.

0x00000102

FSRVP_E_WAIT_TIMEOUT

The wait for shadow copy preparation operation has timed out.

0xFFFFFFFF

FSRVP_E_WAIT_FAILED

The wait for shadow copy preparation operation has failed.

0x80042501

FSRVP_E_SHADOWCOPYSET_ID_MISMATCH

The provided ShadowCopySetId does not exist.

The server MUST look up the ShadowCopySet from GlobalShadowCopysetTable using the index ShadowCopySetId. If no entry is found, the server MUST fail the call with FSRVP_E_SHADOWCOPYSET_ID_MISMATCH.

If ShadowCopySet.Status is not "Added", the server MUST fail the call with FSRVP_E_BAD_STATE.

The server MUST stop the Message Sequence Timer specified in section 3.1.2.

The server MUST start the shadow copy preparation process in the underlying shadow copy utility and MUST wait for the completion of the operation.

If the wait for the preparation operation fails, the server MUST start the Message Sequence Timer as specified in section 3.1.2 with a timeout value of 180 seconds, and fail the call with FSRVP_E_WAIT_FAILED.

If the preparation operation for does not complete within TimeOutInMilliseconds, the server MUST start the Message Sequence Timer as specified in section 3.1.2 with a timeout value of 180 seconds, and return FSRVP_E_WAIT_TIMEOUT.

If the preparation operation returns an error, the server MUST start the Message Sequence Timer as specified in section 3.1.2 with a timeout value of 180 seconds, and fail the call with the same error code.

If the shadow copy preparation operation completes within TimeOutInMilliseconds, the server MUST start the Message Sequence Timer as specified in section 3.1.2 with a timeout value of 1800 seconds, and return ZERO to the caller.