IVssWMFiledesc::GetPath method

The GetPath method obtains the fully qualified directory path or the UNC path of the remote file share to obtain the list of files described in the current IVssWMFiledesc object.

A querying method used this path and a file specification to return the current IVssWMFiledesc object.

Syntax


HRESULT GetPath(
  [out] BSTR *pbstrPath
);

Parameters

pbstrPath [out]

The address of a caller-allocated variable that receives a NULL-terminated wide character string specifying the fully qualified directory path or the UNC path of the remote file share directory.

The path can be a long or short file name and can use the prefix "\\?\". For more information, see Naming a File.

Users of this method need to check to determine whether this path ends with a backslash ("\").

Return value

The following are the valid return codes for this method.

ValueMeaning
S_OK

Successfully returned the path information.

E_INVALIDARG

One of the parameter values is not valid.

E_OUTOFMEMORY

The caller is out of memory or other system resources.

VSS_E_INVALID_XML_DOCUMENT

The XML document is not valid. Check the event log for details. For more information, see Event and Error Handling Under VSS.

VSS_E_UNEXPECTED

Unexpected error. The error code is logged in the error log file. For more information, see Event and Error Handling Under VSS.

Windows Server 2008, Windows Vista, Windows Server 2003 and Windows XP:  This value is not supported until Windows Server 2008 R2 and Windows 7. E_UNEXPECTED is used instead.

 

Remarks

Windows 7, Windows Server 2008 R2, Windows Vista, Windows Server 2008, Windows XP and Windows Server 2003:  Remote file shares are not supported until Windows 8 and Windows Server 2012.

The caller must call SysFreeString to free the memory held by the pbstrPath parameter.

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

VsWriter.h (include Vss.h or VsWriter.h)

Library

VssApi.lib

See also

IVssWMFiledesc

 

 

Show: