Skip to content

Latest commit

 

History

History
105 lines (73 loc) · 3.98 KB

nf-vswriter-cvsswriter-getcontext.md

File metadata and controls

105 lines (73 loc) · 3.98 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.CVssWriter.GetContext
CVssWriter::GetContext (vswriter.h)
The GetContext information returns the current context for any ongoing or possible shadow copies.
CVssWriter interface [VSS]
GetContext method
CVssWriter.GetContext
CVssWriter::GetContext
GetContext
GetContext method [VSS]
GetContext method [VSS]
CVssWriter interface
_win32_cvsswriter_getcontext
base.cvsswriter_getcontext
vswriter/CVssWriter::GetContext
base\cvsswriter_getcontext.htm
base
efe2f43b-fbcf-4b30-a6d4-31d563d321c5
12/05/2018
CVssWriter interface [VSS],GetContext method, CVssWriter.GetContext, CVssWriter::GetContext, GetContext, GetContext method [VSS], GetContext method [VSS],CVssWriter interface, _win32_cvsswriter_getcontext, base.cvsswriter_getcontext, vswriter/CVssWriter::GetContext
vswriter.h
Vss.h, VsWriter.h
Windows
Windows Vista [desktop apps only]
Windows Server 2003 [desktop apps only]
VssApi.lib
Windows
19H1
CVssWriter::GetContext
vswriter/CVssWriter::GetContext
c++
APIRef
kbSyntax
COM
VssApi.lib
VssApi.dll
CVssWriter.GetContext

CVssWriter::GetContext

-description

The GetContext information returns the current context for any ongoing or possible shadow copies.

GetContext is a protected method implemented by the CVssWriter base class.

-returns

This method returns the context for any shadow copies involving the writer as a bit mask (or bitwise OR) of _VSS_SNAPSHOT_CONTEXT and _VSS_VOLUME_SNAPSHOT_ATTRIBUTES values.

-remarks

The default context for a shadow copy is VSS_CTX_BACKUP.

A requester can set the context for a shadow copy by calling IVssBackupComponents::SetContext at any time prior to creating a shadow copy with IVssBackupComponents::DoSnapshotSet.

IVssBackupComponents::DoSnapshotSet generates a number of events (PrepareForSnapshot, Freeze, Thaw, PostSnapshot), the first of which is PrepareForSnapshot.

Therefore, if a writer is participating in a shadow copy operation, a definitive value of that shadow copy's context cannot be found when GetContext is called prior to CVssWriter::OnPrepareSnapshot.

-see-also

CVssWriter

CVssWriter::OnPrepareSnapshot

IVssBackupComponents::DoSnapshotSet

IVssBackupComponents::SetContext

_VSS_SNAPSHOT_CONTEXT

_VSS_VOLUME_SNAPSHOT_ATTRIBUTES