CVssWriterEx::SubscribeEx method (vswriter.h)
Causes the writer to subscribe to VSS events.
Syntax
HRESULT SubscribeEx(
[in] DWORD dwUnsubscribeTimeout,
[in] DWORD dwEventFlags
);
Parameters
[in] dwUnsubscribeTimeout
The length of time, in milliseconds, that the method will wait before timing out.
[in] dwEventFlags
A bitmask 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 |
---|---|
|
The writer has successfully subscribed. |
|
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 Vista [desktop apps only] |
Minimum supported server | Windows Server 2008 [desktop apps only] |
Target Platform | Windows |
Header | vswriter.h (include Vss.h, VsWriter.h) |
Library | VssApi.lib |