3.1.4.12 DeleteShareMapping (Opnum 11)
The DeleteShareMapping method deletes the mapping of a share's shadow copy from a shadow copy set.
-
DWORD DeleteShareMapping( [in] handle_t hBinding, [in] GUID ShadowCopySetId, [in] GUID ShadowCopyId, [in] [string] LPWSTR ShareName);
hBinding: An RPC binding handle (as defined in [C706]).
ShadowCopySetId: The GUID of the shadow copy set.
ShadowCopyId: The GUID of the shadow copy.
ShareName: The name of the share for which the share mapping is to be deleted.
Return Values: The method returns one of the values as specified in section 2.2.4. The most common error codes are listed in the following table:
-
Return value/code
Description
0x80070005
E_ACCESSDENIED
The caller does not have the permissions to perform the operation.
0x80070057
E_INVALIDARG
One or more arguments are invalid.
0x80042308
FSRVP_E_OBJECT_NOT_FOUND
The specified object does not exist.
0x80042501
FSRVP_E_SHADOWCOPYSET_ID_MISMATCH
The provided ShadowCopySetId does not exist.
The server MUST fail the call with E_INVALIDARG if ShadowCopySetId, ShadowCopyId, or ShareName is set to NULL.
The server MUST look up the ShadowCopySet from GlobalShadowCopysetTable using the index ShadowCopySetId. If no shadow copy set is found, the server MUST fail the call with FSRVP_E_OBJECT_NOT_FOUND.
If ShadowCopySet.Status is not "Exposed" or "Recovered", the server MUST fail the call with FSRVP_E_BAD_STATE.
The server MUST look up the ShadowCopy in ShadowCopySet.ShadowCopyList where ShadowCopy.ShadowCopyId matches "ShadowCopyId". If no entry is found, the server MUST fail the call with FSRVP_E_OBJECT_NOT_FOUND.
The server MUST look up the ShareMapping in ShadowCopy.ShareMappingList where ShareMapping.ShareName matches "ShareName". If no entry is found, the server MUST fail the call with FSRVP_E_OBJECT_NOT_FOUND.
The server MUST delete the file share identified by MappedShare. ShadowCopyShareName.
The server MUST delete the MappedShare from ShadowCopy.ShareMappingList and free the MappedShare object.
If ShadowCopy.ShareMappingList is now empty, the server SHOULD remove the shadow copy for the file store identified by ShadowCopy.VolumeName and MUST delete ShadowCopy from ShadowCopySet.ShadowCopyList and free the ShadowCopy object.
If the ShadowCopySet.ShadowCopyList is now empty, the server MUST remove the ShadowCopySet from GlobalShadowCopySetTable and free the ShadowCopySet object.
The server MUST return ZERO to the caller.