3.2.4.2.2 Adding Shadow Copies to the Shadow Copy Set
If ShadowCopySet.Status is not "Started" or "Added", the client MUST return an implementation-defined error code to the caller.
The client MUST normalize the UNC ShareName supplied by the caller into the format specified by ShadowCopySet.PathFormat in an implementation-specific manner. The client MUST verify whether a duplicate entry exists in ShadowCopySet.ShadowCopyList, where ShadowCopy.ShareName matches the normalized path. If such an entry exists, the client MUST return FSRVP_E_OBJECT_ALREADY_EXISTS to the caller.
The client MUST call the RPC AddToShadowCopySet method, with ClientShadowCopyId set to the caller-supplied ShadowCopyId, ShadowCopySetId set to ShadowCopySet.ServerShadowCopySetId, and ShareName set to the caller-supplied ShareName. If the server returns an error, the client MUST return the same error code to the caller. If the server returns ZERO, the client MUST create a new ShadowCopy, as specified in section 3.2.1.3, with the following values:
ShadowCopyId is set to the caller-supplied ShadowCopyId.
ServerShadowCopyId is set to the ShadowCopyId returned by the server.
ServerName is set to the server name identified from the caller-supplied ShareName.
ShareName is set to the caller-supplied ShareName.
ExposedName is set to an empty string.
CreationTimeStamp is set to zero.
If IsLastShareToAdd is TRUE, the client MUST perform the following:
The client MUST call an RPC PrepareShadowCopySet message, with ShadowCopySetId set to ShadowCopySet.ServerShadowCopySetId and TimeOutInMilliSeconds set to PrepareTimeout.
If the server returns an error, the client MUST return the same error code to the caller.
The client MUST return ZERO to the caller.