string ExposeSnapshot( Guid snapshotId, string pathFromRoot, VssVolumeSnapshotAttributes attributes, string expose )
Function ExposeSnapshot ( snapshotId As Guid, pathFromRoot As String, attributes As VssVolumeSnapshotAttributes, expose As String ) As String
String^ ExposeSnapshot( Guid snapshotId, String^ pathFromRoot, VssVolumeSnapshotAttributes attributes, String^ expose )
The path to the portion of the volume made available when exposing a shadow copy as a file share. The value of this parameter must be NULL when exposing a shadow copy locally; that is, by mounting to a drive letter or a mount point.
The path cannot contain environment variables (for example, %MyEnv%) or wildcard characters.
There is no requirement that the path end with a backslash ("\"). It is up to applications that retrieve this information to check.
|ArgumentException||One of the parameter values is not valid.|
|UnauthorizedAccessException||The caller does not have sufficient backup privileges or is not an administrator.|
|OutOfMemoryException||Out of memory or other system resources.|
|SystemException||Unexpected VSS system error. The error code is logged in the event log.|
|VssBadStateException||The backup components object is not initialized, this method has been called during a restore operation, or this method has not been called within the correct sequence.|
|VssObjectNotFoundException||The specified shadow copy does not exist.|
|VssProviderVetoException||Expected provider error. The provider logged the error in the event log.|
|VssUnexpectedProviderErrorException||Unexpected provider error. The error code is logged in the error log.|
When exposing a persistent shadow copy, it remains exposed through subsequent boots.
When exposing a shadow copy of a volume, the shadow copy may be treated either as a mountable device or as a file system available for file sharing.
When it is exposed as a device, as with other mountable devices, the shadow copy of a volume is exposed at its mount point starting with its root.
When exposed as a file share, subsets (indicated by pathFromRoot) of the volume can be shared.