CVssWriter::Subscribe method (vswriter.h)
The Subscribe method subscribes the writer with VSS.
Subscribe is a public method implemented by the base class.
Syntax
HRESULT Subscribe(
[in] DWORD dwEventFlags
);
Parameters
[in] dwEventFlags
A bit mask (or bitwise OR) of VSS_SUBSCRIBE_MASK values indicating the events that VSS should notify the writer about.
The default value for this argument is (VSS_SM_BACKUP_EVENTS_FLAG | VSS_SM_RESTORE_EVENTS_FLAG). Currently, the caller should not override the default value.
This parameter is reserved for future use.
Return value
The following are the valid return codes for this method.
Value | Meaning |
---|---|
|
Successfully subscribed the writer object. |
|
The caller does not have sufficient backup privileges or is not an administrator. |
|
The caller is out of memory or other system resources. |
|
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. |
|
The writer has previously called this method. |
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows XP [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 |