Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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.
Syntax
LONG GetContext();
Return value
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.
Requirements
| Requirement | Value |
|---|---|
| Minimum supported client | Windows Vista [desktop apps only] |
| Minimum supported server | Windows Server 2003 [desktop apps only] |
| Target Platform | Windows |
| Header | vswriter.h (include Vss.h, VsWriter.h) |
| Library | VssApi.lib |
See also
IVssBackupComponents::DoSnapshotSet