Skip to content

Latest commit

 

History

History
209 lines (156 loc) · 6.76 KB

nf-vswriter-ivsscomponent-getpartialfile.md

File metadata and controls

209 lines (156 loc) · 6.76 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:vswriter.IVssComponent.GetPartialFile
IVssComponent::GetPartialFile (vswriter.h)
The GetPartialFile method returns information on a partial file associated with this component.
GetPartialFile
GetPartialFile method [VSS]
GetPartialFile method [VSS]
IVssComponent interface
IVssComponent interface [VSS]
GetPartialFile method
IVssComponent.GetPartialFile
IVssComponent::GetPartialFile
_win32_ivsscomponent_getpartialfile
base.ivsscomponent_getpartialfile
vswriter/IVssComponent::GetPartialFile
base\ivsscomponent_getpartialfile.htm
base
ed589ae8-2abb-4c3b-9695-12649fc89818
12/05/2018
GetPartialFile, GetPartialFile method [VSS], GetPartialFile method [VSS],IVssComponent interface, IVssComponent interface [VSS],GetPartialFile method, IVssComponent.GetPartialFile, IVssComponent::GetPartialFile, _win32_ivsscomponent_getpartialfile, base.ivsscomponent_getpartialfile, vswriter/IVssComponent::GetPartialFile
vswriter.h
Vss.h, VsWriter.h
Windows
Windows XP [desktop apps only]
Windows Server 2003 [desktop apps only]
VssApi.lib
Windows
19H1
IVssComponent::GetPartialFile
vswriter/IVssComponent::GetPartialFile
c++
APIRef
kbSyntax
COM
VssApi.lib
VssApi.dll
IVssComponent.GetPartialFile

IVssComponent::GetPartialFile

-description

The GetPartialFile method returns information on a partial file associated with this component.

-parameters

-param 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.

-param pbstrPath [out]

Pointer to a string containing the path of the partial file.

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

-param pbstrFilename [out]

Pointer to a string containing the name of the partial file.

-param pbstrRange [out]

A pointer to a string containing either a listing of file offsets and lengths that make up the partial file support range (the sections of the file that were backed up), or the name of a file containing such a list.

-param pbstrMetadata [out]

Pointer to a string containing any additional metadata required by a writer to validate a partial file restore operation. The information in this metadata string will be opaque to requesters.

Additional metadata is not required, so pbstrMetadata may also be empty (zero length).

-returns

The following are the valid return codes for this method.

Value Meaning
S_OK
Successfully returned the attribute value.
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 caller is not in the correct state (either backup or restore) for the operation.
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_OBJECT_NOT_FOUND
The specified item was not found.

-remarks

The caller should free the memory held by the pbstrPath, pbstrFilename, pbstrRange, and pbstrMetadata parameters by calling SysFreeString.

A range indicates a subsection of a given file that is to be backed up, independent of the rest of the file.

The syntax of the range listing (pbstrRanges) is that of a comma-separated list of the form offset1:length1, offset2:length2, where each offset and length is a 64-bit integer specifying a byte offset and length in bytes, respectively. The offset and length can be expressed either as hexadecimal or decimal values.

If pbstrRanges refers to a file containing all the offsets and lengths (a ranges file), pbstrRanges should contain the full path to the file.

If wszRange refers to a file containing all the offsets and lengths (a ranges file), wszRange should contain the full path to the file.

A ranges file must be a binary file with the following format:

  1. A 64-bit integer indicating the number of distinct file ranges that need to be backed up.
  2. Each range expressed as a pair of 64-bit integers: the offset into the file being backed up, in bytes, and the length of data starting from that offset to be backed up.
A ranges file should have been backed up along with the partial file and typically is restored to the same location that it was backed up from.

However, the location to which a ranges file is restored might be altered by the requester, which uses IVssBackupComponents::SetRangesFilePath to indicate this and to update the Backup Components Document so that pbstrRanges indicates the correct ranges file.

A requester would use the ranges information returned by GetPartialFile to restore the backed-up sections to the appropriate location within the copy of the file on disk at restore time.

-see-also

IVssBackupComponents::SetRangesFilePath

IVssComponent

IVssComponent::AddPartialFile

IVssComponent::GetPartialFileCount