IVssBackupComponents::SetRangesFilePath method

The SetRangesFilePath method is used when a partial file operation requires a ranges file, and that file has been restored to a location other than its original one.

Syntax


HRESULT SetRangesFilePath(
  [in]  VSS_ID writerId,
  [in]  VSS_COMPONENT_TYPE ct,
  [in]  LPCWSTR wszLogicalPath,
  [in]  LPCWSTR wszComponentName,
  [in]  UINT iPartialFile,
  [in]  LPCWSTR wszRangesFile
);

Parameters

writerId [in]

Globally unique identifier (GUID) of the writer class containing the files involved in the partial file operation.

ct [in]

Identifies the type of the component. Refer to VSS_COMPONENT_TYPE for possible return values.

wszLogicalPath [in]

Null-terminated wide character string containing the logical path of the component containing the files that are participating in the partial file operation. For more information, see Logical Pathing of Components.

The value of the string containing the logical path used here should be the same as was used when the component was added to the backup set using IVssBackupComponents::AddComponent.

The logical path can be NULL.

There are no restrictions on the characters that can appear in a non-NULL logical path.

wszComponentName [in]

Null-terminated wide character string containing the name of the component containing the files that are participating in the partial file operation.

The string cannot be NULL and should contain the same component name as was used when the component was added to the backup set using IVssBackupComponents::AddComponent.

iPartialFile [in]

Index number of the partial file. The value of this parameter is an integer from 0 to n–1 inclusive, where n is the total number of partial files associated with a given component. The value of n is returned by IVssComponent::GetPartialFileCount.

wszRangesFile [in]

Null-terminated wide character string containing the fully qualified path of a ranges file.

Return value

The following are the valid return codes for this method.

ValueMeaning
S_OK

Successfully added the new restore target.

E_INVALIDARG

One of the parameter values is not valid.

E_OUTOFMEMORY

The caller is out of memory or other system resources.

VSS_E_BAD_STATE

The backup components object is not initialized, or this method has been called other than during a restore operation.

VSS_E_OBJECT_NOT_FOUND

The component does not exist or the path and file specification do not match a component and file specification in the component.

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

Calling SetRangesFilePath is not necessary if ranges files are restored in place.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

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

Library

VssApi.lib

See also

IVssBackupComponents
IVssComponent::GetPartialFileCount
IVssComponent::GetPartialFile
IVssComponent::AddPartialFile

 

 

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.