| vsbackup.h (6.1.7601.17514-Windows_7.0) | | vsbackup.h (6.3.9600.17415-Windows_8.1) |
| | |
| skipping to change at line 17 | | skipping to change at line 17 |
| vsbackup.h | | vsbackup.h |
| | |
| Abstract: | | Abstract: |
| | |
| Declaration of backup interfaces. | | Declaration of backup interfaces. |
| | |
| --*/ | | --*/ |
| | |
| #ifndef _VSBACKUP_H_ | | #ifndef _VSBACKUP_H_ |
| #define _VSBACKUP_H_ | | #define _VSBACKUP_H_ |
|
| | #include <winapifamily.h> |
| | |
| | #pragma region Desktop Family |
| | #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) |
| | |
| const IID IID_IVssExamineWriterMetadata = // 902fcf7f-b7fd-42f8-81f1-b2e4
00b1e5bd | | const IID IID_IVssExamineWriterMetadata = // 902fcf7f-b7fd-42f8-81f1-b2e4
00b1e5bd |
| { | | { |
| 0x902fcf7f, | | 0x902fcf7f, |
| 0xb7fd, | | 0xb7fd, |
| 0x42f8, | | 0x42f8, |
| {0x81, 0xf1, 0xb2, 0xe4, 0x00, 0xb1, 0xe5, 0xbd } | | {0x81, 0xf1, 0xb2, 0xe4, 0x00, 0xb1, 0xe5, 0xbd } |
| }; | | }; |
| | |
| const IID IID_IVssExamineWriterMetadataEx = // 0c0e5ec0-ca44-472b-b702-e652db1
c0451 | | const IID IID_IVssExamineWriterMetadataEx = // 0c0e5ec0-ca44-472b-b702-e652db1
c0451 |
| | |
| skipping to change at line 74 | | skipping to change at line 78 |
| }; | | }; |
| | |
| const IID IID_IVssBackupComponentsEx3 = // c191bfbc-b602-4675-8bd1-67d642f
529d5 | | const IID IID_IVssBackupComponentsEx3 = // c191bfbc-b602-4675-8bd1-67d642f
529d5 |
| { | | { |
| 0xc191bfbc, | | 0xc191bfbc, |
| 0xb602, | | 0xb602, |
| 0x4675, | | 0x4675, |
| { 0x8b, 0xd1, 0x67, 0xd6, 0x42, 0xf5, 0x29, 0xd5 } | | { 0x8b, 0xd1, 0x67, 0xd6, 0x42, 0xf5, 0x29, 0xd5 } |
| }; | | }; |
| | |
|
| | const IID IID_IVssBackupComponentsEx4 = // f434c2fd-b553-4961-a9f9-a8e90b6 |
| | 73e53 |
| | { |
| | 0xf434c2fd, |
| | 0xb553, |
| | 0x4961, |
| | { 0xa9, 0xf9, 0xa8, 0xe9, 0x0b, 0x67, 0x3e, 0x53 } |
| | }; |
| | |
| // description of a component | | // description of a component |
| typedef struct _VSS_COMPONENTINFO | | typedef struct _VSS_COMPONENTINFO |
| { | | { |
| VSS_COMPONENT_TYPE type; // either VSS_CT_DATABASE or VSS_CT_FILEGROUP | | VSS_COMPONENT_TYPE type; // either VSS_CT_DATABASE or VSS_CT_FILEGROUP |
| BSTR bstrLogicalPath; // logical path to component | | BSTR bstrLogicalPath; // logical path to component |
| BSTR bstrComponentName; // component name | | BSTR bstrComponentName; // component name |
| BSTR bstrCaption; // description of component | | BSTR bstrCaption; // description of component |
| BYTE *pbIcon; // icon | | BYTE *pbIcon; // icon |
| UINT cbIcon; // icon | | UINT cbIcon; // icon |
| bool bRestoreMetadata; // whether component supplies restore metadata | | bool bRestoreMetadata; // whether component supplies restore metadata |
| | |
| skipping to change at line 103 | | skipping to change at line 115 |
| | |
| typedef const VSS_COMPONENTINFO *PVSSCOMPONENTINFO; | | typedef const VSS_COMPONENTINFO *PVSSCOMPONENTINFO; |
| | |
| // component information | | // component information |
| class IVssWMComponent : public IUnknown | | class IVssWMComponent : public IUnknown |
| { | | { |
| public: | | public: |
| // get component information | | // get component information |
| STDMETHOD(GetComponentInfo) | | STDMETHOD(GetComponentInfo) |
| ( | | ( |
|
| __out PVSSCOMPONENTINFO *ppInfo | | _Out_ PVSSCOMPONENTINFO *ppInfo |
| ) = 0; | | ) = 0; |
| | |
| // free component information | | // free component information |
| STDMETHOD(FreeComponentInfo) | | STDMETHOD(FreeComponentInfo) |
| ( | | ( |
|
| __in PVSSCOMPONENTINFO pInfo | | _In_ PVSSCOMPONENTINFO pInfo |
| ) = 0; | | ) = 0; |
| | |
| // obtain a specific file in a file group | | // obtain a specific file in a file group |
| STDMETHOD(GetFile) | | STDMETHOD(GetFile) |
| ( | | ( |
|
| __in UINT iFile, | | _In_ UINT iFile, |
| __out IVssWMFiledesc **ppFiledesc | | _Out_ IVssWMFiledesc **ppFiledesc |
| ) = 0; | | ) = 0; |
| | |
| // obtain a specific physical database file for a database | | // obtain a specific physical database file for a database |
| STDMETHOD(GetDatabaseFile) | | STDMETHOD(GetDatabaseFile) |
| ( | | ( |
|
| __in UINT iDBFile, | | _In_ UINT iDBFile, |
| __out IVssWMFiledesc **ppFiledesc | | _Out_ IVssWMFiledesc **ppFiledesc |
| ) = 0; | | ) = 0; |
| | |
| // obtain a specific physical log file for a database | | // obtain a specific physical log file for a database |
| STDMETHOD(GetDatabaseLogFile) | | STDMETHOD(GetDatabaseLogFile) |
| ( | | ( |
|
| __in UINT iDbLogFile, | | _In_ UINT iDbLogFile, |
| __out IVssWMFiledesc **ppFiledesc | | _Out_ IVssWMFiledesc **ppFiledesc |
| ) = 0; | | ) = 0; |
| | |
| STDMETHOD(GetDependency) | | STDMETHOD(GetDependency) |
| ( | | ( |
|
| __in UINT iDependency, | | _In_ UINT iDependency, |
| __out IVssWMDependency **ppDependency | | _Out_ IVssWMDependency **ppDependency |
| ) = 0; | | ) = 0; |
| }; | | }; |
| | |
| // interface to examine writer metadata | | // interface to examine writer metadata |
| class __declspec(uuid("902fcf7f-b7fd-42f8-81f1-b2e400b1e5bd")) IVssExamineWriter
Metadata : public IUnknown | | class __declspec(uuid("902fcf7f-b7fd-42f8-81f1-b2e400b1e5bd")) IVssExamineWriter
Metadata : public IUnknown |
| { | | { |
| public: | | public: |
| // obtain identity of the writer | | // obtain identity of the writer |
| STDMETHOD(GetIdentity) | | STDMETHOD(GetIdentity) |
| ( | | ( |
|
| __out VSS_ID *pidInstance, | | _Out_ VSS_ID *pidInstance, |
| __out VSS_ID *pidWriter, | | _Out_ VSS_ID *pidWriter, |
| __out BSTR *pbstrWriterName, | | _Out_ BSTR *pbstrWriterName, |
| __out VSS_USAGE_TYPE *pUsage, | | _Out_ VSS_USAGE_TYPE *pUsage, |
| __out VSS_SOURCE_TYPE *pSource | | _Out_ VSS_SOURCE_TYPE *pSource |
| ) = 0; | | ) = 0; |
| | |
| // obtain number of include files, exclude files, and components | | // obtain number of include files, exclude files, and components |
| STDMETHOD(GetFileCounts) | | STDMETHOD(GetFileCounts) |
| ( | | ( |
|
| __out UINT *pcIncludeFiles, | | _Out_ UINT *pcIncludeFiles, |
| __out UINT *pcExcludeFiles, | | _Out_ UINT *pcExcludeFiles, |
| __out UINT *pcComponents | | _Out_ UINT *pcComponents |
| ) = 0; | | ) = 0; |
| | |
| // obtain specific include files | | // obtain specific include files |
| STDMETHOD(GetIncludeFile) | | STDMETHOD(GetIncludeFile) |
| ( | | ( |
|
| __in UINT iFile, | | _In_ UINT iFile, |
| __out IVssWMFiledesc **ppFiledesc | | _Out_ IVssWMFiledesc **ppFiledesc |
| ) = 0; | | ) = 0; |
| | |
| // obtain specific exclude files | | // obtain specific exclude files |
| STDMETHOD(GetExcludeFile) | | STDMETHOD(GetExcludeFile) |
| ( | | ( |
|
| __in UINT iFile, | | _In_ UINT iFile, |
| __out IVssWMFiledesc **ppFiledesc | | _Out_ IVssWMFiledesc **ppFiledesc |
| ) = 0; | | ) = 0; |
| | |
| // obtain specific component | | // obtain specific component |
| STDMETHOD(GetComponent) | | STDMETHOD(GetComponent) |
| ( | | ( |
|
| __in UINT iComponent, | | _In_ UINT iComponent, |
| __out IVssWMComponent **ppComponent | | _Out_ IVssWMComponent **ppComponent |
| ) = 0; | | ) = 0; |
| | |
| // obtain restoration method | | // obtain restoration method |
| STDMETHOD(GetRestoreMethod) | | STDMETHOD(GetRestoreMethod) |
| ( | | ( |
|
| __out VSS_RESTOREMETHOD_ENUM *pMethod, | | _Out_ VSS_RESTOREMETHOD_ENUM *pMethod, |
| __out BSTR *pbstrService, | | _Out_ BSTR *pbstrService, |
| __out BSTR *pbstrUserProcedure, | | _Out_ BSTR *pbstrUserProcedure, |
| __out VSS_WRITERRESTORE_ENUM *pwriterRestore, | | _Out_ VSS_WRITERRESTORE_ENUM *pwriterRestore, |
| __out bool *pbRebootRequired, | | _Out_ bool *pbRebootRequired, |
| __out UINT *pcMappings | | _Out_ UINT *pcMappings |
| ) = 0; | | ) = 0; |
| | |
| // obtain a specific alternative location mapping | | // obtain a specific alternative location mapping |
| STDMETHOD(GetAlternateLocationMapping) | | STDMETHOD(GetAlternateLocationMapping) |
| ( | | ( |
|
| __in UINT iMapping, | | _In_ UINT iMapping, |
| __out IVssWMFiledesc **ppFiledesc | | _Out_ IVssWMFiledesc **ppFiledesc |
| ) = 0; | | ) = 0; |
| | |
| // get the backup schema | | // get the backup schema |
| STDMETHOD(GetBackupSchema) | | STDMETHOD(GetBackupSchema) |
| ( | | ( |
|
| __out DWORD *pdwSchemaMask | | _Out_ DWORD *pdwSchemaMask |
| ) = 0; | | ) = 0; |
| | |
| // obtain reference to actual XML document | | // obtain reference to actual XML document |
| STDMETHOD(GetDocument) | | STDMETHOD(GetDocument) |
| ( | | ( |
|
| __out IXMLDOMDocument **pDoc | | _Out_ IXMLDOMDocument **pDoc |
| ) = 0; | | ) = 0; |
| | |
| // convert document to a XML string | | // convert document to a XML string |
| STDMETHOD(SaveAsXML) | | STDMETHOD(SaveAsXML) |
| ( | | ( |
|
| __in BSTR *pbstrXML | | _In_ BSTR *pbstrXML |
| ) = 0; | | ) = 0; |
| | |
| // load document from an XML string | | // load document from an XML string |
| STDMETHOD(LoadFromXML) | | STDMETHOD(LoadFromXML) |
| ( | | ( |
|
| __in BSTR bstrXML | | _In_ BSTR bstrXML |
| ) = 0; | | ) = 0; |
| }; | | }; |
| | |
| class __declspec(uuid("0c0e5ec0-ca44-472b-b702-e652db1c0451")) IVssExamineWriter
MetadataEx : public IVssExamineWriterMetadata | | class __declspec(uuid("0c0e5ec0-ca44-472b-b702-e652db1c0451")) IVssExamineWriter
MetadataEx : public IVssExamineWriterMetadata |
| { | | { |
| public: | | public: |
| // obtain identity of the writer | | // obtain identity of the writer |
| STDMETHOD(GetIdentityEx) | | STDMETHOD(GetIdentityEx) |
| ( | | ( |
|
| __out VSS_ID *pidInstance, | | _Out_ VSS_ID *pidInstance, |
| __out VSS_ID *pidWriter, | | _Out_ VSS_ID *pidWriter, |
| __out BSTR *pbstrWriterName, | | _Out_ BSTR *pbstrWriterName, |
| __out BSTR* pbstrInstanceName, | | _Out_ BSTR* pbstrInstanceName, |
| __out VSS_USAGE_TYPE *pUsage, | | _Out_ VSS_USAGE_TYPE *pUsage, |
| __out VSS_SOURCE_TYPE *pSource | | _Out_ VSS_SOURCE_TYPE *pSource |
| ) = 0; | | ) = 0; |
| }; | | }; |
| | |
| class __declspec(uuid("ce115780-a611-431b-b57f-c38303ab6aee")) IVssExamineWriter
MetadataEx2 : public IVssExamineWriterMetadataEx | | class __declspec(uuid("ce115780-a611-431b-b57f-c38303ab6aee")) IVssExamineWriter
MetadataEx2 : public IVssExamineWriterMetadataEx |
| { | | { |
| public: | | public: |
| STDMETHOD(GetVersion) | | STDMETHOD(GetVersion) |
| ( | | ( |
|
| __out DWORD* pdwMajorVersion, | | _Out_ DWORD* pdwMajorVersion, |
| __out DWORD* pdwMinorVersion | | _Out_ DWORD* pdwMinorVersion |
| ) = 0; | | ) = 0; |
| | |
| STDMETHOD(GetExcludeFromSnapshotCount) | | STDMETHOD(GetExcludeFromSnapshotCount) |
| ( | | ( |
|
| __out UINT* pcExcludedFromSnapshot | | _Out_ UINT* pcExcludedFromSnapshot |
| ) = 0; | | ) = 0; |
| | |
| // obtain specific exclude files | | // obtain specific exclude files |
| STDMETHOD(GetExcludeFromSnapshotFile) | | STDMETHOD(GetExcludeFromSnapshotFile) |
| ( | | ( |
|
| __in UINT iFile, | | _In_ UINT iFile, |
| __out IVssWMFiledesc **ppFiledesc | | _Out_ IVssWMFiledesc **ppFiledesc |
| ) = 0; | | ) = 0; |
| }; | | }; |
| | |
| class IVssWriterComponentsExt : | | class IVssWriterComponentsExt : |
| public IVssWriterComponents, | | public IVssWriterComponents, |
| public IUnknown | | public IUnknown |
| { | | { |
| }; | | }; |
| | |
| // backup components interface | | // backup components interface |
| class __declspec(uuid("665c1d5f-c218-414d-a05d-7fef5f9d5c86")) IVssBackupCompone
nts : public IUnknown | | class __declspec(uuid("665c1d5f-c218-414d-a05d-7fef5f9d5c86")) IVssBackupCompone
nts : public IUnknown |
| { | | { |
| public: | | public: |
| // get count of writer components | | // get count of writer components |
| STDMETHOD(GetWriterComponentsCount) | | STDMETHOD(GetWriterComponentsCount) |
| ( | | ( |
|
| __out UINT *pcComponents | | _Out_ UINT *pcComponents |
| ) = 0; | | ) = 0; |
| | |
| // obtain a specific writer component | | // obtain a specific writer component |
| STDMETHOD(GetWriterComponents) | | STDMETHOD(GetWriterComponents) |
| ( | | ( |
|
| __in UINT iWriter, | | _In_ UINT iWriter, |
| __out IVssWriterComponentsExt **ppWriter | | _Out_ IVssWriterComponentsExt **ppWriter |
| ) = 0; | | ) = 0; |
| | |
| // initialize and create BACKUP_COMPONENTS document | | // initialize and create BACKUP_COMPONENTS document |
| STDMETHOD(InitializeForBackup) | | STDMETHOD(InitializeForBackup) |
| ( | | ( |
|
| __in_opt BSTR bstrXML = NULL | | _In_opt_ BSTR bstrXML = NULL |
| ) = 0; | | ) = 0; |
| | |
| // set state describing backup | | // set state describing backup |
| STDMETHOD(SetBackupState) | | STDMETHOD(SetBackupState) |
| ( | | ( |
|
| __in bool bSelectComponents, | | _In_ bool bSelectComponents, |
| __in bool bBackupBootableSystemState, | | _In_ bool bBackupBootableSystemState, |
| __in VSS_BACKUP_TYPE backupType, | | _In_ VSS_BACKUP_TYPE backupType, |
| __in bool bPartialFileSupport = false | | _In_ bool bPartialFileSupport = false |
| ) = 0; | | ) = 0; |
| | |
| STDMETHOD(InitializeForRestore) | | STDMETHOD(InitializeForRestore) |
| ( | | ( |
|
| __in BSTR bstrXML | | _In_ BSTR bstrXML |
| ) = 0; | | ) = 0; |
| | |
| // set state describing restore | | // set state describing restore |
| STDMETHOD(SetRestoreState) | | STDMETHOD(SetRestoreState) |
| ( | | ( |
|
| __in VSS_RESTORE_TYPE restoreType | | _In_ VSS_RESTORE_TYPE restoreType |
| ) = 0; | | ) = 0; |
| | |
| // gather writer metadata | | // gather writer metadata |
| STDMETHOD(GatherWriterMetadata) | | STDMETHOD(GatherWriterMetadata) |
| ( | | ( |
|
| __out IVssAsync **pAsync | | _Out_ IVssAsync **pAsync |
| ) = 0; | | ) = 0; |
| | |
| // get count of writers with metadata | | // get count of writers with metadata |
| STDMETHOD(GetWriterMetadataCount) | | STDMETHOD(GetWriterMetadataCount) |
| ( | | ( |
|
| __out UINT *pcWriters | | _Out_ UINT *pcWriters |
| ) = 0; | | ) = 0; |
| | |
| // get writer metadata for a specific writer | | // get writer metadata for a specific writer |
| STDMETHOD(GetWriterMetadata) | | STDMETHOD(GetWriterMetadata) |
| ( | | ( |
|
| __in UINT iWriter, | | _In_ UINT iWriter, |
| __out VSS_ID *pidInstance, | | _Out_ VSS_ID *pidInstance, |
| __out IVssExamineWriterMetadata **ppMetadata | | _Out_ IVssExamineWriterMetadata **ppMetadata |
| ) = 0; | | ) = 0; |
| | |
| // free writer metadata | | // free writer metadata |
| STDMETHOD(FreeWriterMetadata)() = 0; | | STDMETHOD(FreeWriterMetadata)() = 0; |
| | |
| // add a component to the BACKUP_COMPONENTS document | | // add a component to the BACKUP_COMPONENTS document |
| STDMETHOD(AddComponent) | | STDMETHOD(AddComponent) |
| ( | | ( |
|
| __in VSS_ID instanceId, | | _In_ VSS_ID instanceId, |
| __in VSS_ID writerId, | | _In_ VSS_ID writerId, |
| __in VSS_COMPONENT_TYPE ct, | | _In_ VSS_COMPONENT_TYPE ct, |
| __in LPCWSTR wszLogicalPath, | | _In_ LPCWSTR wszLogicalPath, |
| __in LPCWSTR wszComponentName | | _In_ LPCWSTR wszComponentName |
| ) = 0; | | ) = 0; |
| | |
| // dispatch PrepareForBackup event to writers | | // dispatch PrepareForBackup event to writers |
| STDMETHOD(PrepareForBackup) | | STDMETHOD(PrepareForBackup) |
| ( | | ( |
|
| __out IVssAsync **ppAsync | | _Out_ IVssAsync **ppAsync |
| ) = 0; | | ) = 0; |
| | |
| // abort the backup | | // abort the backup |
| STDMETHOD(AbortBackup)() = 0; | | STDMETHOD(AbortBackup)() = 0; |
| | |
| // dispatch the Identify event so writers can expose their metadata | | // dispatch the Identify event so writers can expose their metadata |
| STDMETHOD(GatherWriterStatus) | | STDMETHOD(GatherWriterStatus) |
| ( | | ( |
|
| __out IVssAsync **pAsync | | _Out_ IVssAsync **pAsync |
| ) = 0; | | ) = 0; |
| | |
| // get count of writers with status | | // get count of writers with status |
| STDMETHOD(GetWriterStatusCount) | | STDMETHOD(GetWriterStatusCount) |
| ( | | ( |
|
| __out UINT *pcWriters | | _Out_ UINT *pcWriters |
| ) = 0; | | ) = 0; |
| | |
| STDMETHOD(FreeWriterStatus)() = 0; | | STDMETHOD(FreeWriterStatus)() = 0; |
| | |
| STDMETHOD(GetWriterStatus) | | STDMETHOD(GetWriterStatus) |
| ( | | ( |
|
| __in UINT iWriter, | | _In_ UINT iWriter, |
| __out VSS_ID *pidInstance, | | _Out_ VSS_ID *pidInstance, |
| __out VSS_ID *pidWriter, | | _Out_ VSS_ID *pidWriter, |
| __out BSTR *pbstrWriter, | | _Out_ BSTR *pbstrWriter, |
| __out VSS_WRITER_STATE *pnStatus, | | _Out_ VSS_WRITER_STATE *pnStatus, |
| __out HRESULT *phResultFailure | | _Out_ HRESULT *phResultFailure |
| ) = 0; | | ) = 0; |
| | |
| // indicate whether backup succeeded on a component | | // indicate whether backup succeeded on a component |
| STDMETHOD(SetBackupSucceeded) | | STDMETHOD(SetBackupSucceeded) |
| ( | | ( |
|
| __in VSS_ID instanceId, | | _In_ VSS_ID instanceId, |
| __in VSS_ID writerId, | | _In_ VSS_ID writerId, |
| __in VSS_COMPONENT_TYPE ct, | | _In_ VSS_COMPONENT_TYPE ct, |
| __in LPCWSTR wszLogicalPath, | | _In_ LPCWSTR wszLogicalPath, |
| __in LPCWSTR wszComponentName, | | _In_ LPCWSTR wszComponentName, |
| __in bool bSucceded | | _In_ bool bSucceded |
| ) = 0; | | ) = 0; |
| | |
| // set backup options for the writer | | // set backup options for the writer |
| STDMETHOD(SetBackupOptions) | | STDMETHOD(SetBackupOptions) |
| ( | | ( |
|
| __in VSS_ID writerId, | | _In_ VSS_ID writerId, |
| __in VSS_COMPONENT_TYPE ct, | | _In_ VSS_COMPONENT_TYPE ct, |
| __in LPCWSTR wszLogicalPath, | | _In_ LPCWSTR wszLogicalPath, |
| __in LPCWSTR wszComponentName, | | _In_ LPCWSTR wszComponentName, |
| __in LPCWSTR wszBackupOptions | | _In_ LPCWSTR wszBackupOptions |
| ) = 0; | | ) = 0; |
| | |
| // indicate that a given component is selected to be restored | | // indicate that a given component is selected to be restored |
| STDMETHOD(SetSelectedForRestore) | | STDMETHOD(SetSelectedForRestore) |
| ( | | ( |
|
| __in VSS_ID writerId, | | _In_ VSS_ID writerId, |
| __in VSS_COMPONENT_TYPE ct, | | _In_ VSS_COMPONENT_TYPE ct, |
| __in LPCWSTR wszLogicalPath, | | _In_ LPCWSTR wszLogicalPath, |
| __in LPCWSTR wszComponentName, | | _In_ LPCWSTR wszComponentName, |
| __in bool bSelectedForRestore | | _In_ bool bSelectedForRestore |
| ) = 0; | | ) = 0; |
| | |
| // set restore options for the writer | | // set restore options for the writer |
| STDMETHOD(SetRestoreOptions) | | STDMETHOD(SetRestoreOptions) |
| ( | | ( |
|
| __in VSS_ID writerId, | | _In_ VSS_ID writerId, |
| __in VSS_COMPONENT_TYPE ct, | | _In_ VSS_COMPONENT_TYPE ct, |
| __in LPCWSTR wszLogicalPath, | | _In_ LPCWSTR wszLogicalPath, |
| __in LPCWSTR wszComponentName, | | _In_ LPCWSTR wszComponentName, |
| __in LPCWSTR wszRestoreOptions | | _In_ LPCWSTR wszRestoreOptions |
| ) = 0; | | ) = 0; |
| | |
| // indicate that additional restores will follow | | // indicate that additional restores will follow |
| STDMETHOD(SetAdditionalRestores) | | STDMETHOD(SetAdditionalRestores) |
| ( | | ( |
|
| __in VSS_ID writerId, | | _In_ VSS_ID writerId, |
| __in VSS_COMPONENT_TYPE ct, | | _In_ VSS_COMPONENT_TYPE ct, |
| __in LPCWSTR wszLogicalPath, | | _In_ LPCWSTR wszLogicalPath, |
| __in LPCWSTR wszComponentName, | | _In_ LPCWSTR wszComponentName, |
| __in bool bAdditionalRestores | | _In_ bool bAdditionalRestores |
| ) = 0; | | ) = 0; |
| | |
| // set the backup stamp that the differential or incremental | | // set the backup stamp that the differential or incremental |
| // backup is based on | | // backup is based on |
| STDMETHOD(SetPreviousBackupStamp) | | STDMETHOD(SetPreviousBackupStamp) |
| ( | | ( |
|
| __in VSS_ID writerId, | | _In_ VSS_ID writerId, |
| __in VSS_COMPONENT_TYPE ct, | | _In_ VSS_COMPONENT_TYPE ct, |
| __in LPCWSTR wszLogicalPath, | | _In_ LPCWSTR wszLogicalPath, |
| __in LPCWSTR wszComponentName, | | _In_ LPCWSTR wszComponentName, |
| __in LPCWSTR wszPreviousBackupStamp | | _In_ LPCWSTR wszPreviousBackupStamp |
| ) = 0; | | ) = 0; |
| | |
| // save BACKUP_COMPONENTS document as XML string | | // save BACKUP_COMPONENTS document as XML string |
| STDMETHOD(SaveAsXML) | | STDMETHOD(SaveAsXML) |
| ( | | ( |
|
| __in BSTR *pbstrXML | | _In_ BSTR *pbstrXML |
| ) = 0; | | ) = 0; |
| | |
| // signal BackupComplete event to the writers | | // signal BackupComplete event to the writers |
| STDMETHOD(BackupComplete) | | STDMETHOD(BackupComplete) |
| ( | | ( |
|
| __out IVssAsync **ppAsync | | _Out_ IVssAsync **ppAsync |
| ) = 0; | | ) = 0; |
| | |
| // add an alternate mapping on restore | | // add an alternate mapping on restore |
| STDMETHOD(AddAlternativeLocationMapping) | | STDMETHOD(AddAlternativeLocationMapping) |
| ( | | ( |
|
| __in VSS_ID writerId, | | _In_ VSS_ID writerId, |
| __in VSS_COMPONENT_TYPE componentType, | | _In_ VSS_COMPONENT_TYPE componentType, |
| __in LPCWSTR wszLogicalPath, | | _In_ LPCWSTR wszLogicalPath, |
| __in LPCWSTR wszComponentName, | | _In_ LPCWSTR wszComponentName, |
| __in LPCWSTR wszPath, | | _In_ LPCWSTR wszPath, |
| __in LPCWSTR wszFilespec, | | _In_ LPCWSTR wszFilespec, |
| __in bool bRecursive, | | _In_ bool bRecursive, |
| __in LPCWSTR wszDestination | | _In_ LPCWSTR wszDestination |
| ) = 0; | | ) = 0; |
| | |
| // add a subcomponent to be restored | | // add a subcomponent to be restored |
| STDMETHOD(AddRestoreSubcomponent) | | STDMETHOD(AddRestoreSubcomponent) |
| ( | | ( |
|
| __in VSS_ID writerId, | | _In_ VSS_ID writerId, |
| __in VSS_COMPONENT_TYPE componentType, | | _In_ VSS_COMPONENT_TYPE componentType, |
| __in LPCWSTR wszLogicalPath, | | _In_ LPCWSTR wszLogicalPath, |
| __in LPCWSTR wszComponentName, | | _In_ LPCWSTR wszComponentName, |
| __in LPCWSTR wszSubComponentLogicalPath, | | _In_ LPCWSTR wszSubComponentLogicalPath, |
| __in LPCWSTR wszSubComponentName, | | _In_ LPCWSTR wszSubComponentName, |
| __in bool bRepair | | _In_ bool bRepair |
| ) = 0; | | ) = 0; |
| | |
| // requestor indicates whether files were successfully restored | | // requestor indicates whether files were successfully restored |
| STDMETHOD(SetFileRestoreStatus) | | STDMETHOD(SetFileRestoreStatus) |
| ( | | ( |
|
| __in VSS_ID writerId, | | _In_ VSS_ID writerId, |
| __in VSS_COMPONENT_TYPE ct, | | _In_ VSS_COMPONENT_TYPE ct, |
| __in LPCWSTR wszLogicalPath, | | _In_ LPCWSTR wszLogicalPath, |
| __in LPCWSTR wszComponentName, | | _In_ LPCWSTR wszComponentName, |
| __in VSS_FILE_RESTORE_STATUS status | | _In_ VSS_FILE_RESTORE_STATUS status |
| ) = 0; | | ) = 0; |
| | |
| // add a new location target for a file to be restored | | // add a new location target for a file to be restored |
| STDMETHOD(AddNewTarget) | | STDMETHOD(AddNewTarget) |
| ( | | ( |
|
| __in VSS_ID writerId, | | _In_ VSS_ID writerId, |
| __in VSS_COMPONENT_TYPE ct, | | _In_ VSS_COMPONENT_TYPE ct, |
| __in LPCWSTR wszLogicalPath, | | _In_ LPCWSTR wszLogicalPath, |
| __in LPCWSTR wszComponentName, | | _In_ LPCWSTR wszComponentName, |
| __in LPCWSTR wszPath, | | _In_ LPCWSTR wszPath, |
| __in LPCWSTR wszFileName, | | _In_ LPCWSTR wszFileName, |
| __in bool bRecursive, | | _In_ bool bRecursive, |
| __in LPCWSTR wszAlternatePath | | _In_ LPCWSTR wszAlternatePath |
| ) = 0; | | ) = 0; |
| | |
| // add a new location for the ranges file in case it was restored to | | // add a new location for the ranges file in case it was restored to |
| // a different location | | // a different location |
| STDMETHOD(SetRangesFilePath) | | STDMETHOD(SetRangesFilePath) |
| ( | | ( |
|
| __in VSS_ID writerId, | | _In_ VSS_ID writerId, |
| __in VSS_COMPONENT_TYPE ct, | | _In_ VSS_COMPONENT_TYPE ct, |
| __in LPCWSTR wszLogicalPath, | | _In_ LPCWSTR wszLogicalPath, |
| __in LPCWSTR wszComponentName, | | _In_ LPCWSTR wszComponentName, |
| __in UINT iPartialFile, | | _In_ UINT iPartialFile, |
| __in LPCWSTR wszRangesFile | | _In_ LPCWSTR wszRangesFile |
| ) = 0; | | ) = 0; |
| | |
| // signal PreRestore event to the writers | | // signal PreRestore event to the writers |
| STDMETHOD(PreRestore) | | STDMETHOD(PreRestore) |
| ( | | ( |
|
| __out IVssAsync **ppAsync | | _Out_ IVssAsync **ppAsync |
| ) = 0; | | ) = 0; |
| | |
| // signal PostRestore event to the writers | | // signal PostRestore event to the writers |
| STDMETHOD(PostRestore) | | STDMETHOD(PostRestore) |
| ( | | ( |
|
| __out IVssAsync **ppAsync | | _Out_ IVssAsync **ppAsync |
| ) = 0; | | ) = 0; |
| | |
| // Called to set the context for subsequent snapshot-related operations | | // Called to set the context for subsequent snapshot-related operations |
| STDMETHOD(SetContext) | | STDMETHOD(SetContext) |
| ( | | ( |
|
| __in LONG lContext | | _In_ LONG lContext |
| ) = 0; | | ) = 0; |
| | |
| // start a snapshot set | | // start a snapshot set |
| STDMETHOD(StartSnapshotSet) | | STDMETHOD(StartSnapshotSet) |
| ( | | ( |
|
| __out VSS_ID *pSnapshotSetId | | _Out_ VSS_ID *pSnapshotSetId |
| ) = 0; | | ) = 0; |
| | |
| // add a volume to a snapshot set | | // add a volume to a snapshot set |
| STDMETHOD(AddToSnapshotSet) | | STDMETHOD(AddToSnapshotSet) |
| ( | | ( |
|
| __in_z VSS_PWSZ pwszVolumeName, | | _In_z_ VSS_PWSZ pwszVolumeName, |
| __in VSS_ID ProviderId, | | _In_ VSS_ID ProviderId, |
| __out VSS_ID *pidSnapshot | | _Out_ VSS_ID *pidSnapshot |
| ) = 0; | | ) = 0; |
| | |
| // create the snapshot set | | // create the snapshot set |
| STDMETHOD(DoSnapshotSet) | | STDMETHOD(DoSnapshotSet) |
| ( | | ( |
|
| __out IVssAsync** ppAsync | | _Out_ IVssAsync** ppAsync |
| ) = 0; | | ) = 0; |
| | |
| STDMETHOD(DeleteSnapshots) | | STDMETHOD(DeleteSnapshots) |
| ( | | ( |
|
| __in VSS_ID SourceObjectId, | | _In_ VSS_ID SourceObjectId, |
| __in VSS_OBJECT_TYPE eSourceObjectType, | | _In_ VSS_OBJECT_TYPE eSourceObjectType, |
| __in BOOL bForceDelete, | | _In_ BOOL bForceDelete, |
| __in LONG* plDeletedSnapshots, | | _In_ LONG* plDeletedSnapshots, |
| __in VSS_ID* pNondeletedSnapshotID | | _In_ VSS_ID* pNondeletedSnapshotID |
| ) = 0; | | ) = 0; |
| | |
| STDMETHOD(ImportSnapshots) | | STDMETHOD(ImportSnapshots) |
| ( | | ( |
|
| __out IVssAsync** ppAsync | | _Out_ IVssAsync** ppAsync |
| ) = 0; | | ) = 0; |
| | |
| STDMETHOD(BreakSnapshotSet) | | STDMETHOD(BreakSnapshotSet) |
| ( | | ( |
|
| __in VSS_ID SnapshotSetId | | _In_ VSS_ID SnapshotSetId |
| ) = 0; | | ) = 0; |
| | |
| STDMETHOD(GetSnapshotProperties) | | STDMETHOD(GetSnapshotProperties) |
| ( | | ( |
|
| __in VSS_ID SnapshotId, | | _In_ VSS_ID SnapshotId, |
| __out VSS_SNAPSHOT_PROP *pProp | | _Out_ VSS_SNAPSHOT_PROP *pProp |
| ) = 0; | | ) = 0; |
| | |
| STDMETHOD(Query) | | STDMETHOD(Query) |
| ( | | ( |
|
| __in VSS_ID QueriedObjectId, | | _In_ VSS_ID QueriedObjectId, |
| __in VSS_OBJECT_TYPE eQueriedObjectType, | | _In_ VSS_OBJECT_TYPE eQueriedObjectType, |
| __in VSS_OBJECT_TYPE eReturnedObjectsType, | | _In_ VSS_OBJECT_TYPE eReturnedObjectsType, |
| __in IVssEnumObject **ppEnum | | _In_ IVssEnumObject **ppEnum |
| ) = 0; | | ) = 0; |
| | |
| STDMETHOD(IsVolumeSupported) | | STDMETHOD(IsVolumeSupported) |
| ( | | ( |
|
| __in VSS_ID ProviderId, | | _In_ VSS_ID ProviderId, |
| __in_z VSS_PWSZ pwszVolumeName, | | _In_z_ VSS_PWSZ pwszVolumeName, |
| __in BOOL * pbSupportedByThisProvider | | _In_ BOOL * pbSupportedByThisProvider |
| ) = 0; | | ) = 0; |
| | |
| STDMETHOD(DisableWriterClasses) | | STDMETHOD(DisableWriterClasses) |
| ( | | ( |
|
| __in const VSS_ID *rgWriterClassId, | | _In_ const VSS_ID *rgWriterClassId, |
| __in UINT cClassId | | _In_ UINT cClassId |
| ) = 0; | | ) = 0; |
| | |
| STDMETHOD(EnableWriterClasses) | | STDMETHOD(EnableWriterClasses) |
| ( | | ( |
|
| __in const VSS_ID *rgWriterClassId, | | _In_ const VSS_ID *rgWriterClassId, |
| __in UINT cClassId | | _In_ UINT cClassId |
| ) = 0; | | ) = 0; |
| | |
| STDMETHOD(DisableWriterInstances) | | STDMETHOD(DisableWriterInstances) |
| ( | | ( |
|
| __in const VSS_ID *rgWriterInstanceId, | | _In_ const VSS_ID *rgWriterInstanceId, |
| __in UINT cInstanceId | | _In_ UINT cInstanceId |
| ) = 0; | | ) = 0; |
| | |
| // called to expose a snapshot | | // called to expose a snapshot |
| STDMETHOD(ExposeSnapshot) | | STDMETHOD(ExposeSnapshot) |
| ( | | ( |
|
| __in VSS_ID SnapshotId, | | _In_ VSS_ID SnapshotId, |
| __in_z VSS_PWSZ wszPathFromRoot, | | _In_z_ VSS_PWSZ wszPathFromRoot, |
| __in LONG lAttributes, | | _In_ LONG lAttributes, |
| __in_z VSS_PWSZ wszExpose, | | _In_z_ VSS_PWSZ wszExpose, |
| __out_z VSS_PWSZ *pwszExposed | | _Outptr_result_z_ VSS_PWSZ *pwszExposed |
| ) = 0; | | ) = 0; |
| | |
| STDMETHOD(RevertToSnapshot) | | STDMETHOD(RevertToSnapshot) |
| ( | | ( |
|
| __in VSS_ID SnapshotId, | | _In_ VSS_ID SnapshotId, |
| __in BOOL bForceDismount | | _In_ BOOL bForceDismount |
| ) = 0; | | ) = 0; |
| | |
| STDMETHOD(QueryRevertStatus) | | STDMETHOD(QueryRevertStatus) |
| ( | | ( |
|
| __in_z VSS_PWSZ pwszVolume, | | _In_z_ VSS_PWSZ pwszVolume, |
| __out IVssAsync **ppAsync | | _Out_ IVssAsync **ppAsync |
| ) = 0; | | ) = 0; |
| }; | | }; |
| | |
| class __declspec(uuid("963f03ad-9e4c-4a34-ac15-e4b6174e5036")) IVssBackupCompone
ntsEx : public IVssBackupComponents | | class __declspec(uuid("963f03ad-9e4c-4a34-ac15-e4b6174e5036")) IVssBackupCompone
ntsEx : public IVssBackupComponents |
| { | | { |
| public: | | public: |
| // get writer metadata for a specific writer | | // get writer metadata for a specific writer |
| STDMETHOD(GetWriterMetadataEx) | | STDMETHOD(GetWriterMetadataEx) |
| ( | | ( |
|
| __in UINT iWriter, | | _In_ UINT iWriter, |
| __out VSS_ID *pidInstance, | | _Out_ VSS_ID *pidInstance, |
| __out IVssExamineWriterMetadataEx **ppMetadata | | _Out_ IVssExamineWriterMetadataEx **ppMetadata |
| ) = 0; | | ) = 0; |
| | |
| // indicate that a given component is selected to be restored | | // indicate that a given component is selected to be restored |
| STDMETHOD(SetSelectedForRestoreEx) | | STDMETHOD(SetSelectedForRestoreEx) |
| ( | | ( |
|
| __in VSS_ID writerId, | | _In_ VSS_ID writerId, |
| __in VSS_COMPONENT_TYPE ct, | | _In_ VSS_COMPONENT_TYPE ct, |
| __in LPCWSTR wszLogicalPath, | | _In_ LPCWSTR wszLogicalPath, |
| __in LPCWSTR wszComponentName, | | _In_ LPCWSTR wszComponentName, |
| __in bool bSelectedForRestore, | | _In_ bool bSelectedForRestore, |
| __in VSS_ID instanceId = GUID_NULL | | _In_ VSS_ID instanceId = GUID_NULL |
| ) = 0; | | ) = 0; |
| }; | | }; |
| | |
| class __declspec(uuid("acfe2b3a-22c9-4ef8-bd03-2f9ca230084e")) IVssBackupCompone
ntsEx2 : public IVssBackupComponentsEx | | class __declspec(uuid("acfe2b3a-22c9-4ef8-bd03-2f9ca230084e")) IVssBackupCompone
ntsEx2 : public IVssBackupComponentsEx |
| { | | { |
| public: | | public: |
| STDMETHOD(UnexposeSnapshot) | | STDMETHOD(UnexposeSnapshot) |
| ( | | ( |
|
| __in VSS_ID snapshotId | | _In_ VSS_ID snapshotId |
| ) = 0; | | ) = 0; |
| | |
| STDMETHOD(SetAuthoritativeRestore) | | STDMETHOD(SetAuthoritativeRestore) |
| ( | | ( |
|
| __in VSS_ID writerId, | | _In_ VSS_ID writerId, |
| __in VSS_COMPONENT_TYPE ct, | | _In_ VSS_COMPONENT_TYPE ct, |
| __in LPCWSTR wszLogicalPath, | | _In_ LPCWSTR wszLogicalPath, |
| __in LPCWSTR wszComponentName, | | _In_ LPCWSTR wszComponentName, |
| __in bool bAuth | | _In_ bool bAuth |
| )= 0; | | )= 0; |
| | |
| STDMETHOD(SetRollForward) | | STDMETHOD(SetRollForward) |
| ( | | ( |
|
| __in VSS_ID writerId, | | _In_ VSS_ID writerId, |
| __in VSS_COMPONENT_TYPE ct, | | _In_ VSS_COMPONENT_TYPE ct, |
| __in LPCWSTR wszLogicalPath, | | _In_ LPCWSTR wszLogicalPath, |
| __in LPCWSTR wszComponentName, | | _In_ LPCWSTR wszComponentName, |
| __in VSS_ROLLFORWARD_TYPE rollType, | | _In_ VSS_ROLLFORWARD_TYPE rollType, |
| __in LPCWSTR wszRollForwardPoint | | _In_ LPCWSTR wszRollForwardPoint |
| )= 0; | | )= 0; |
| | |
| STDMETHOD(SetRestoreName) | | STDMETHOD(SetRestoreName) |
| ( | | ( |
|
| __in VSS_ID writerId, | | _In_ VSS_ID writerId, |
| __in VSS_COMPONENT_TYPE ct, | | _In_ VSS_COMPONENT_TYPE ct, |
| __in LPCWSTR wszLogicalPath, | | _In_ LPCWSTR wszLogicalPath, |
| __in LPCWSTR wszComponentName, | | _In_ LPCWSTR wszComponentName, |
| __in LPCWSTR wszRestoreName | | _In_ LPCWSTR wszRestoreName |
| ) = 0; | | ) = 0; |
| | |
| STDMETHOD(BreakSnapshotSetEx) | | STDMETHOD(BreakSnapshotSetEx) |
| ( | | ( |
|
| __in VSS_ID SnapshotSetID, | | _In_ VSS_ID SnapshotSetID, |
| __in DWORD dwBreakFlags, | | _In_ DWORD dwBreakFlags, |
| __out IVssAsync** ppAsync | | _Out_ IVssAsync** ppAsync |
| ) = 0; | | ) = 0; |
| | |
| STDMETHOD(PreFastRecovery) | | STDMETHOD(PreFastRecovery) |
| ( | | ( |
|
| __in VSS_ID SnapshotSetID, | | _In_ VSS_ID SnapshotSetID, |
| __in DWORD dwPreFastRecoveryFlags, | | _In_ DWORD dwPreFastRecoveryFlags, |
| __out IVssAsync** ppAsync | | _Out_ IVssAsync** ppAsync |
| ) = 0; | | ) = 0; |
| | |
| STDMETHOD(FastRecovery) | | STDMETHOD(FastRecovery) |
| ( | | ( |
|
| __in VSS_ID SnapshotSetID, | | _In_ VSS_ID SnapshotSetID, |
| __in DWORD dwFastRecoveryFlags, | | _In_ DWORD dwFastRecoveryFlags, |
| __out IVssAsync** ppAsync | | _Out_ IVssAsync** ppAsync |
| ) = 0; | | ) = 0; |
| }; | | }; |
| | |
| class __declspec(uuid("c191bfbc-b602-4675-8bd1-67d642f529d5")) IVssBackupCompone
ntsEx3 : public IVssBackupComponentsEx2 | | class __declspec(uuid("c191bfbc-b602-4675-8bd1-67d642f529d5")) IVssBackupCompone
ntsEx3 : public IVssBackupComponentsEx2 |
| { | | { |
| public: | | public: |
| | |
| STDMETHOD(GetWriterStatusEx) | | STDMETHOD(GetWriterStatusEx) |
| ( | | ( |
|
| __in UINT iWriter, | | _In_ UINT iWriter, |
| __out VSS_ID *pidInstance, | | _Out_ VSS_ID *pidInstance, |
| __out VSS_ID *pidWriter, | | _Out_ VSS_ID *pidWriter, |
| __out BSTR *pbstrWriter, | | _Out_ BSTR *pbstrWriter, |
| __out VSS_WRITER_STATE *pnStatus, | | _Out_ VSS_WRITER_STATE *pnStatus, |
| __out HRESULT *phrFailureWriter, | | _Out_ HRESULT *phrFailureWriter, |
| __out_opt HRESULT *phrApplication = NULL, | | _Out_opt_ HRESULT *phrApplication = NULL, |
| __out_opt BSTR *pbstrApplicationMessage = NULL | | _Out_opt_ BSTR *pbstrApplicationMessage = NULL |
| ) = 0; | | ) = 0; |
| | |
| STDMETHOD(AddSnapshotToRecoverySet) | | STDMETHOD(AddSnapshotToRecoverySet) |
| ( | | ( |
|
| __in VSS_ID snapshotId, | | _In_ VSS_ID snapshotId, |
| __in DWORD dwFlags, | | _In_ DWORD dwFlags, |
| __in_opt VSS_PWSZ pwszDestinationVolume = NULL | | _In_opt_ VSS_PWSZ pwszDestinationVolume = NULL |
| ) = 0; | | ) = 0; |
| | |
| STDMETHOD(RecoverSet) | | STDMETHOD(RecoverSet) |
| ( | | ( |
|
| __in DWORD dwFlags, | | _In_ DWORD dwFlags, |
| __deref_out IVssAsync** ppAsync | | _Outptr_ IVssAsync** ppAsync |
| ) = 0; | | ) = 0; |
| | |
| STDMETHOD(GetSessionId) | | STDMETHOD(GetSessionId) |
| ( | | ( |
|
| __out VSS_ID *idSession | | _Out_ VSS_ID *idSession |
| | ) = 0; |
| | }; |
| | |
| | class __declspec(uuid("f434c2fd-b553-4961-a9f9-a8e90b673e53")) IVssBackupCompone |
| | ntsEx4 : public IVssBackupComponentsEx3 |
| | { |
| | public: |
| | |
| | STDMETHOD(GetRootAndLogicalPrefixPaths) |
| | ( |
| | _In_ VSS_PWSZ pwszFilePath, |
| | _Outptr_ VSS_PWSZ* ppwszRootPath, |
| | _Outptr_ VSS_PWSZ* ppwszLogicalPrefix, |
| | _In_opt_ BOOL bNormalizeFQDNforRootPath = FALSE |
| ) = 0; | | ) = 0; |
| }; | | }; |
| | |
| #define VSS_SW_BOOTABLE_STATE (1 << 0) | | #define VSS_SW_BOOTABLE_STATE (1 << 0) |
| | |
| extern "C" { | | extern "C" { |
| HRESULT STDAPICALLTYPE CreateVssBackupComponentsInternal | | HRESULT STDAPICALLTYPE CreateVssBackupComponentsInternal |
| ( | | ( |
|
| __out IVssBackupComponents **ppBackup | | _Out_ IVssBackupComponents **ppBackup |
| ); | | ); |
| | |
| HRESULT STDAPICALLTYPE CreateVssExamineWriterMetadataInternal | | HRESULT STDAPICALLTYPE CreateVssExamineWriterMetadataInternal |
| ( | | ( |
|
| __in BSTR bstrXML, | | _In_ BSTR bstrXML, |
| __out IVssExamineWriterMetadata **ppMetadata | | _Out_ IVssExamineWriterMetadata **ppMetadata |
| ); | | ); |
| | |
| HRESULT APIENTRY IsVolumeSnapshottedInternal | | HRESULT APIENTRY IsVolumeSnapshottedInternal |
| ( | | ( |
|
| __in_z VSS_PWSZ pwszVolumeName, | | _In_z_ VSS_PWSZ pwszVolumeName, |
| __out BOOL *pbSnapshotsPresent, | | _Out_ BOOL *pbSnapshotsPresent, |
| __out LONG *plSnapshotCapability | | _Out_ LONG *plSnapshotCapability |
| ); | | ); |
| | |
| ///////////////////////////////////////////////////////////////////// | | ///////////////////////////////////////////////////////////////////// |
| // Life-management methods for structure members | | // Life-management methods for structure members |
| | |
| void APIENTRY VssFreeSnapshotPropertiesInternal( | | void APIENTRY VssFreeSnapshotPropertiesInternal( |
|
| __in VSS_SNAPSHOT_PROP* pProp | | _In_ VSS_SNAPSHOT_PROP* pProp |
| ); | | ); |
| | |
| HRESULT APIENTRY GetProviderMgmtInterfaceInternal( | | HRESULT APIENTRY GetProviderMgmtInterfaceInternal( |
|
| __in VSS_ID ProviderId, | | _In_ VSS_ID ProviderId, |
| __in IID InterfaceId, | | _In_ IID InterfaceId, |
| __out IUnknown** ppItf | | _Out_ IUnknown** ppItf |
| ); | | ); |
| | |
| HRESULT APIENTRY ShouldBlockRevertInternal | | HRESULT APIENTRY ShouldBlockRevertInternal |
| ( | | ( |
|
| __in LPCWSTR wszVolumeName, | | _In_ LPCWSTR wszVolumeName, |
| __out bool* pbBlock | | _Out_ bool* pbBlock |
| ); | | ); |
| } | | } |
| | |
| inline HRESULT CreateVssBackupComponents | | inline HRESULT CreateVssBackupComponents |
| ( | | ( |
|
| __out IVssBackupComponents **ppBackup | | _Out_ IVssBackupComponents **ppBackup |
| ) | | ) |
| { | | { |
| return CreateVssBackupComponentsInternal(ppBackup); | | return CreateVssBackupComponentsInternal(ppBackup); |
| } | | } |
| | |
| inline HRESULT CreateVssExamineWriterMetadata | | inline HRESULT CreateVssExamineWriterMetadata |
| ( | | ( |
|
| __in BSTR bstrXML, | | _In_ BSTR bstrXML, |
| __out IVssExamineWriterMetadata **ppMetadata | | _Out_ IVssExamineWriterMetadata **ppMetadata |
| ) | | ) |
| { | | { |
| return CreateVssExamineWriterMetadataInternal(bstrXML, ppMetadata); | | return CreateVssExamineWriterMetadataInternal(bstrXML, ppMetadata); |
| } | | } |
| | |
| inline HRESULT IsVolumeSnapshotted | | inline HRESULT IsVolumeSnapshotted |
| ( | | ( |
|
| __in_z VSS_PWSZ pwszVolumeName, | | _In_z_ VSS_PWSZ pwszVolumeName, |
| __out BOOL *pbSnapshotsPresent, | | _Out_ BOOL *pbSnapshotsPresent, |
| __out LONG *plSnapshotCapability | | _Out_ LONG *plSnapshotCapability |
| ) | | ) |
| { | | { |
| return IsVolumeSnapshottedInternal(pwszVolumeName, pbSnapshotsPresent, plSna
pshotCapability); | | return IsVolumeSnapshottedInternal(pwszVolumeName, pbSnapshotsPresent, plSna
pshotCapability); |
| } | | } |
| | |
| inline void VssFreeSnapshotProperties | | inline void VssFreeSnapshotProperties |
| ( | | ( |
|
| __in VSS_SNAPSHOT_PROP* pProp | | _In_ VSS_SNAPSHOT_PROP* pProp |
| ) | | ) |
| { | | { |
| return VssFreeSnapshotPropertiesInternal(pProp); | | return VssFreeSnapshotPropertiesInternal(pProp); |
| } | | } |
| | |
| inline HRESULT GetProviderMgmtInterface | | inline HRESULT GetProviderMgmtInterface |
| ( | | ( |
|
| __in VSS_ID ProviderId, | | _In_ VSS_ID ProviderId, |
| __in IID InterfaceId, | | _In_ IID InterfaceId, |
| __out IUnknown** ppItf | | _Out_ IUnknown** ppItf |
| ) | | ) |
| { | | { |
| return GetProviderMgmtInterfaceInternal(ProviderId, InterfaceId, ppItf); | | return GetProviderMgmtInterfaceInternal(ProviderId, InterfaceId, ppItf); |
| } | | } |
| | |
| inline HRESULT ShouldBlockRevert | | inline HRESULT ShouldBlockRevert |
| ( | | ( |
|
| __in LPCWSTR wszVolumeName, | | _In_ LPCWSTR wszVolumeName, |
| __out bool* pbBlock | | _Out_ bool* pbBlock |
| ) | | ) |
| { | | { |
| return ShouldBlockRevertInternal(wszVolumeName, pbBlock); | | return ShouldBlockRevertInternal(wszVolumeName, pbBlock); |
| } | | } |
| | |
|
| | #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */ |
| | #pragma endregion |
| | |
| #endif // _VSBACKUP_H_ | | #endif // _VSBACKUP_H_ |
| | |
| End of changes. 94 change blocks. |
| 255 lines changed or deleted | | 285 lines changed or added |
|
| vswriter.h (6.1.7601.17514-Windows_7.0) | | vswriter.h (6.3.9600.17415-Windows_8.1) |
| | |
| skipping to change at line 15 | | skipping to change at line 15 |
| Abstract: | | Abstract: |
| | |
| @doc | | @doc |
| @module Writer.h | Declaration of Writer | | @module Writer.h | Declaration of Writer |
| @end | | @end |
| --*/ | | --*/ |
| | |
| #ifndef __CVSS_WRITER_H_ | | #ifndef __CVSS_WRITER_H_ |
| #define __CVSS_WRITER_H_ | | #define __CVSS_WRITER_H_ |
| | |
|
| | #include <winapifamily.h> |
| | |
| | #pragma region Desktop Family |
| | #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) |
| | |
| #include "vsserror.h" | | #include "vsserror.h" |
| | |
| const IID IID_IVssComponent = // d2c72c96-c121-4518-b627-e5a93
d010ead | | const IID IID_IVssComponent = // d2c72c96-c121-4518-b627-e5a93
d010ead |
| { | | { |
| 0xd2c72c96, | | 0xd2c72c96, |
| 0xc121, | | 0xc121, |
| 0x4518, | | 0x4518, |
| { 0xb6, 0x27, 0xe5, 0xa9, 0x3d, 0x01, 0x0e, 0xad } | | { 0xb6, 0x27, 0xe5, 0xa9, 0x3d, 0x01, 0x0e, 0xad } |
| }; | | }; |
| | |
| | |
| skipping to change at line 164 | | skipping to change at line 169 |
| | |
| class IVssExamineWriterMetadata; | | class IVssExamineWriterMetadata; |
| | |
| // file description | | // file description |
| class IVssWMFiledesc | | class IVssWMFiledesc |
| : public IUnknown | | : public IUnknown |
| { | | { |
| public: | | public: |
| // get path to toplevel directory | | // get path to toplevel directory |
| STDMETHOD(GetPath)( | | STDMETHOD(GetPath)( |
|
| __out BSTR *pbstrPath | | _Out_ BSTR *pbstrPath |
| ) = 0; | | ) = 0; |
| | |
| // get filespec (may include wildcards) | | // get filespec (may include wildcards) |
| STDMETHOD(GetFilespec)( | | STDMETHOD(GetFilespec)( |
|
| __out BSTR *pbstrFilespec | | _Out_ BSTR *pbstrFilespec |
| ) = 0; | | ) = 0; |
| | |
| // is path a directory or root of a tree | | // is path a directory or root of a tree |
| STDMETHOD(GetRecursive)( | | STDMETHOD(GetRecursive)( |
|
| __out bool *pbRecursive | | _Out_ bool *pbRecursive |
| ) = 0; | | ) = 0; |
| | |
| // alternate location for files | | // alternate location for files |
| STDMETHOD(GetAlternateLocation)( | | STDMETHOD(GetAlternateLocation)( |
|
| __out BSTR *pbstrAlternateLocation | | _Out_ BSTR *pbstrAlternateLocation |
| ) = 0; | | ) = 0; |
| | |
| // backup type | | // backup type |
| STDMETHOD(GetBackupTypeMask)( | | STDMETHOD(GetBackupTypeMask)( |
|
| __out DWORD *pdwTypeMask | | _Out_ DWORD *pdwTypeMask |
| ) = 0; | | ) = 0; |
| }; | | }; |
| | |
| // dependency description | | // dependency description |
| class IVssWMDependency | | class IVssWMDependency |
| : public IUnknown | | : public IUnknown |
| { | | { |
| public: | | public: |
| STDMETHOD(GetWriterId)(OUT VSS_ID *pWriterId) = 0; | | STDMETHOD(GetWriterId)(OUT VSS_ID *pWriterId) = 0; |
| STDMETHOD(GetLogicalPath)(OUT BSTR *pbstrLogicalPath) = 0; | | STDMETHOD(GetLogicalPath)(OUT BSTR *pbstrLogicalPath) = 0; |
| | |
| skipping to change at line 480 | | skipping to change at line 485 |
| ) = 0; | | ) = 0; |
| }; | | }; |
| | |
| class __declspec(uuid("156c8b5e-f131-4bd7-9c97-d1923be7e1fa")) IVssComponentEx | | class __declspec(uuid("156c8b5e-f131-4bd7-9c97-d1923be7e1fa")) IVssComponentEx |
| : public IVssComponent | | : public IVssComponent |
| { | | { |
| public: | | public: |
| // set a failure message during prepareforbackup | | // set a failure message during prepareforbackup |
| STDMETHOD(SetPrepareForBackupFailureMsg) | | STDMETHOD(SetPrepareForBackupFailureMsg) |
| ( | | ( |
|
| __in LPCWSTR wszFailureMsg | | _In_ LPCWSTR wszFailureMsg |
| ) = 0; | | ) = 0; |
| | |
| // set a failure message during postsnapshot | | // set a failure message during postsnapshot |
| STDMETHOD(SetPostSnapshotFailureMsg) | | STDMETHOD(SetPostSnapshotFailureMsg) |
| ( | | ( |
|
| __in LPCWSTR wszFailureMsg | | _In_ LPCWSTR wszFailureMsg |
| ) = 0; | | ) = 0; |
| | |
| // get the failure message set during prepareforbackup | | // get the failure message set during prepareforbackup |
| STDMETHOD(GetPrepareForBackupFailureMsg) | | STDMETHOD(GetPrepareForBackupFailureMsg) |
| ( | | ( |
|
| __deref_out_opt BSTR* pbstrFailureMsg | | _Outptr_result_maybenull_ BSTR* pbstrFailureMsg |
| ) = 0; | | ) = 0; |
| | |
| // get the failure message set during postsnapshot | | // get the failure message set during postsnapshot |
| STDMETHOD(GetPostSnapshotFailureMsg) | | STDMETHOD(GetPostSnapshotFailureMsg) |
| ( | | ( |
|
| __deref_out_opt BSTR* pbstrFailureMsg | | _Outptr_result_maybenull_ BSTR* pbstrFailureMsg |
| ) = 0; | | ) = 0; |
| | |
| // get the authoritative restore status | | // get the authoritative restore status |
| STDMETHOD(GetAuthoritativeRestore) | | STDMETHOD(GetAuthoritativeRestore) |
| ( | | ( |
|
| __out bool* pbAuth | | _Out_ bool* pbAuth |
| ) = 0; | | ) = 0; |
| | |
| // get the roll-forward status | | // get the roll-forward status |
| STDMETHOD(GetRollForward) | | STDMETHOD(GetRollForward) |
| ( | | ( |
|
| __out VSS_ROLLFORWARD_TYPE* pRollType, | | _Out_ VSS_ROLLFORWARD_TYPE* pRollType, |
| __deref_out_opt BSTR* pbstrPoint | | _Outptr_result_maybenull_ BSTR* pbstrPoint |
| ) = 0; | | ) = 0; |
| | |
| // get the restore name | | // get the restore name |
| STDMETHOD(GetRestoreName) | | STDMETHOD(GetRestoreName) |
| ( | | ( |
|
| __deref_out_opt BSTR* pbstrName | | _Outptr_result_maybenull_ BSTR* pbstrName |
| ) = 0; | | ) = 0; |
| }; | | }; |
| | |
| class __declspec(uuid("3b5be0f2-07a9-4e4b-bdd3-cfdc8e2c0d2d")) IVssComponentEx2 | | class __declspec(uuid("3b5be0f2-07a9-4e4b-bdd3-cfdc8e2c0d2d")) IVssComponentEx2 |
| : public IVssComponentEx | | : public IVssComponentEx |
| { | | { |
| public: | | public: |
| STDMETHOD(SetFailure) | | STDMETHOD(SetFailure) |
| ( | | ( |
|
| __in HRESULT hr, | | _In_ HRESULT hr, |
| __in HRESULT hrApplication, | | _In_ HRESULT hrApplication, |
| __in_opt LPCWSTR wszApplicationMessage, | | _In_opt_ LPCWSTR wszApplicationMessage, |
| __in DWORD dwReserved | | _In_ DWORD dwReserved |
| ) = 0; | | ) = 0; |
| | |
| STDMETHOD(GetFailure) | | STDMETHOD(GetFailure) |
| ( | | ( |
|
| __out HRESULT *phr, | | _Out_ HRESULT *phr, |
| __out HRESULT *phrApplication, | | _Out_ HRESULT *phrApplication, |
| __out BSTR *pbstrApplicationMessage, | | _Out_ BSTR *pbstrApplicationMessage, |
| __out DWORD *pdwReserved | | _Out_ DWORD *pdwReserved |
| ) = 0; | | ) = 0; |
| }; | | }; |
| | |
| // create backup metadata interface | | // create backup metadata interface |
| class IVssCreateWriterMetadata | | class IVssCreateWriterMetadata |
| { | | { |
| public: | | public: |
| // add files to include to metadata document | | // add files to include to metadata document |
| STDMETHOD(AddIncludeFiles) | | STDMETHOD(AddIncludeFiles) |
| ( | | ( |
| | |
| skipping to change at line 662 | | skipping to change at line 667 |
| // save document as an XML string | | // save document as an XML string |
| STDMETHOD(SaveAsXML)(BSTR *pbstrXML) = 0; | | STDMETHOD(SaveAsXML)(BSTR *pbstrXML) = 0; |
| }; | | }; |
| | |
| class __declspec(uuid("9f21981d-d469-4349-b807-39e64e4674e1")) IVssCreateWriterM
etadataEx : public IVssCreateWriterMetadata, public IUnknown | | class __declspec(uuid("9f21981d-d469-4349-b807-39e64e4674e1")) IVssCreateWriterM
etadataEx : public IVssCreateWriterMetadata, public IUnknown |
| { | | { |
| public: | | public: |
| // add files to exclude to metadata document | | // add files to exclude to metadata document |
| STDMETHOD(AddExcludeFilesFromSnapshot) | | STDMETHOD(AddExcludeFilesFromSnapshot) |
| ( | | ( |
|
| __in LPCWSTR wszPath, | | _In_ LPCWSTR wszPath, |
| __in LPCWSTR wszFilespec, | | _In_ LPCWSTR wszFilespec, |
| __in bool bRecursive | | _In_ bool bRecursive |
| ) = 0; | | ) = 0; |
| }; | | }; |
| | |
| // implementation class for writers | | // implementation class for writers |
| class IVssWriterImpl : public IUnknown | | class IVssWriterImpl : public IUnknown |
| { | | { |
| public: | | public: |
| // initialize writer | | // initialize writer |
| virtual HRESULT Initialize( | | virtual HRESULT Initialize( |
|
| __in VSS_ID writerId, | | _In_ VSS_ID writerId, |
| __in LPCWSTR wszWriterName, | | _In_ LPCWSTR wszWriterName, |
| __in LPCWSTR wszWriterInstanceName, | | _In_opt_ LPCWSTR wszWriterInstanceName, |
| __in DWORD dwMajorVersion, | | _In_ DWORD dwMajorVersion, |
| __in DWORD dwMinorVersion, | | _In_ DWORD dwMinorVersion, |
| __in VSS_USAGE_TYPE ut, | | _In_ VSS_USAGE_TYPE ut, |
| __in VSS_SOURCE_TYPE st, | | _In_ VSS_SOURCE_TYPE st, |
| __in VSS_APPLICATION_LEVEL nLevel, | | _In_ VSS_APPLICATION_LEVEL nLevel, |
| __in DWORD dwTimeout, | | _In_ DWORD dwTimeout, |
| __in VSS_ALTERNATE_WRITER_STATE aws, | | _In_ VSS_ALTERNATE_WRITER_STATE aws, |
| __in bool bIOThrottlingOnly | | _In_ bool bIOThrottlingOnly |
| ) = 0; | | ) = 0; |
| | |
| // subscribe to events | | // subscribe to events |
| virtual HRESULT Subscribe( | | virtual HRESULT Subscribe( |
|
| __in DWORD dwSubscribeTimeout, | | _In_ DWORD dwSubscribeTimeout, |
| __in DWORD dwEventFlags | | _In_ DWORD dwEventFlags |
| ) = 0; | | ) = 0; |
| | |
| // unsubscribe from events | | // unsubscribe from events |
| virtual HRESULT Unsubscribe() = 0; | | virtual HRESULT Unsubscribe() = 0; |
| | |
| virtual void Uninitialize() = 0; | | virtual void Uninitialize() = 0; |
| | |
| // get array of volume names | | // get array of volume names |
| virtual LPCWSTR *GetCurrentVolumeArray() const = 0; | | virtual LPCWSTR *GetCurrentVolumeArray() const = 0; |
| | |
| // get # of volumes in volume array | | // get # of volumes in volume array |
| virtual UINT GetCurrentVolumeCount() const = 0; | | virtual UINT GetCurrentVolumeCount() const = 0; |
| | |
| // get the snapshot device name for a particular volume | | // get the snapshot device name for a particular volume |
| virtual HRESULT GetSnapshotDeviceName( | | virtual HRESULT GetSnapshotDeviceName( |
|
| __in LPCWSTR wszOriginalVolume, | | _In_ LPCWSTR wszOriginalVolume, |
| __deref_out_opt LPCWSTR *ppwszSnapshotDevice | | _Outptr_result_maybenull_ LPCWSTR *ppwszSnapshotDevice |
| ) const = 0; | | ) const = 0; |
| | |
| // get id of snapshot set | | // get id of snapshot set |
| virtual VSS_ID GetCurrentSnapshotSetId() const = 0; | | virtual VSS_ID GetCurrentSnapshotSetId() const = 0; |
| | |
| // get the current backup context | | // get the current backup context |
| virtual LONG GetContext() const = 0; | | virtual LONG GetContext() const = 0; |
| | |
| // determine which Freeze event writer responds to | | // determine which Freeze event writer responds to |
| virtual VSS_APPLICATION_LEVEL GetCurrentLevel() const = 0; | | virtual VSS_APPLICATION_LEVEL GetCurrentLevel() const = 0; |
| | |
| // determine if path is included in the snapshot | | // determine if path is included in the snapshot |
|
| virtual bool IsPathAffected(__in LPCWSTR wszPath) const = 0; | | virtual bool IsPathAffected(_In_ LPCWSTR wszPath) const = 0; |
| | |
| // determine if bootable state is backed up | | // determine if bootable state is backed up |
| virtual bool IsBootableSystemStateBackedUp() const = 0; | | virtual bool IsBootableSystemStateBackedUp() const = 0; |
| | |
| // determine if the backup application is selecting components | | // determine if the backup application is selecting components |
| virtual bool AreComponentsSelected() const = 0; | | virtual bool AreComponentsSelected() const = 0; |
| | |
| // determine the backup type for the backup | | // determine the backup type for the backup |
| virtual VSS_BACKUP_TYPE GetBackupType() const = 0; | | virtual VSS_BACKUP_TYPE GetBackupType() const = 0; |
| | |
| // determine the type of restore | | // determine the type of restore |
| virtual VSS_RESTORE_TYPE GetRestoreType() const = 0; | | virtual VSS_RESTORE_TYPE GetRestoreType() const = 0; |
| | |
| // let writer pass back indication of reason for failure | | // let writer pass back indication of reason for failure |
| virtual HRESULT SetWriterFailure( | | virtual HRESULT SetWriterFailure( |
|
| __in HRESULT hr | | _In_ HRESULT hr |
| ) = 0; | | ) = 0; |
| | |
| // determine if requestor support partial file backups | | // determine if requestor support partial file backups |
| virtual bool IsPartialFileSupportEnabled() const = 0; | | virtual bool IsPartialFileSupportEnabled() const = 0; |
| | |
| virtual HRESULT InstallAlternateWriter( | | virtual HRESULT InstallAlternateWriter( |
|
| __in VSS_ID idWriter, | | _In_ VSS_ID idWriter, |
| __in CLSID clsid | | _In_ CLSID clsid |
| ) = 0; | | ) = 0; |
| | |
| // determine the current identity information | | // determine the current identity information |
| virtual IVssExamineWriterMetadata* GetIdentityInformation() const = 0; | | virtual IVssExamineWriterMetadata* GetIdentityInformation() const = 0; |
| | |
| // let writer pass back indication of reason for failure | | // let writer pass back indication of reason for failure |
| virtual HRESULT SetWriterFailureEx( | | virtual HRESULT SetWriterFailureEx( |
|
| __in HRESULT hr, | | _In_ HRESULT hr, |
| __in HRESULT hrApplication, | | _In_ HRESULT hrApplication, |
| __in LPCWSTR wszApplicationMessage | | _In_ LPCWSTR wszApplicationMessage |
| ) = 0; | | ) = 0; |
| | |
| virtual HRESULT GetSessionId( | | virtual HRESULT GetSessionId( |
|
| __out VSS_ID *idSession | | _Out_ VSS_ID *idSession |
| ) = 0; | | ) = 0; |
| | |
| virtual bool IsWriterShuttingDown( | | virtual bool IsWriterShuttingDown( |
| ) = 0; | | ) = 0; |
| }; | | }; |
| | |
| class __declspec(uuid("9c772e77-b26e-427f-92dd-c996f41ea5e3")) IVssCreateExpress
WriterMetadata | | class __declspec(uuid("9c772e77-b26e-427f-92dd-c996f41ea5e3")) IVssCreateExpress
WriterMetadata |
| : public IUnknown | | : public IUnknown |
| { | | { |
| public: | | public: |
| // add files to exclude to metadata document | | // add files to exclude to metadata document |
| STDMETHOD(AddExcludeFiles)( | | STDMETHOD(AddExcludeFiles)( |
|
| __in LPCWSTR wszPath, | | _In_ LPCWSTR wszPath, |
| __in LPCWSTR wszFilespec, | | _In_ LPCWSTR wszFilespec, |
| __in bool bRecursive | | _In_ bool bRecursive |
| ) = 0; | | ) = 0; |
| | |
| // add component to metadata document | | // add component to metadata document |
| STDMETHOD(AddComponent)( | | STDMETHOD(AddComponent)( |
|
| __in VSS_COMPONENT_TYPE ct, | | _In_ VSS_COMPONENT_TYPE ct, |
| __in LPCWSTR wszLogicalPath, | | _In_ LPCWSTR wszLogicalPath, |
| __in LPCWSTR wszComponentName, | | _In_ LPCWSTR wszComponentName, |
| __in LPCWSTR wszCaption, | | _In_ LPCWSTR wszCaption, |
| __in const BYTE *pbIcon, | | _In_ const BYTE *pbIcon, |
| __in UINT cbIcon, | | _In_ UINT cbIcon, |
| __in bool bRestoreMetadata, | | _In_ bool bRestoreMetadata, |
| __in bool bNotifyOnBackupComplete, | | _In_ bool bNotifyOnBackupComplete, |
| __in bool bSelectable, | | _In_ bool bSelectable, |
| __in bool bSelectableForRestore = false, | | _In_ bool bSelectableForRestore = false, |
| __in DWORD dwComponentFlags = 0 | | _In_ DWORD dwComponentFlags = 0 |
| ) = 0; | | ) = 0; |
| | |
| // add files to a FILE_GROUP component | | // add files to a FILE_GROUP component |
| STDMETHOD(AddFilesToFileGroup)( | | STDMETHOD(AddFilesToFileGroup)( |
|
| __in LPCWSTR wszLogicalPath, | | _In_ LPCWSTR wszLogicalPath, |
| __in LPCWSTR wszGroupName, | | _In_ LPCWSTR wszGroupName, |
| __in LPCWSTR wszPath, | | _In_ LPCWSTR wszPath, |
| __in LPCWSTR wszFilespec, | | _In_ LPCWSTR wszFilespec, |
| __in bool bRecursive, | | _In_ bool bRecursive, |
| __in LPCWSTR wszAlternateLocation, | | _In_ LPCWSTR wszAlternateLocation, |
| __in DWORD dwBackupTypeMask = (VSS_FSBT_ALL_BACKUP_REQUIRED | VSS_FSB | | _In_ DWORD dwBackupTypeMask = (VSS_FSBT_ALL_BACKUP_REQUIRED | VSS_FSB |
| T_ALL_SNAPSHOT_REQUIRED) | | T_ALL_SNAPSHOT_REQUIRED) |
| ) = 0; | | ) = 0; |
| | |
| // create a restore method | | // create a restore method |
| STDMETHOD(SetRestoreMethod)( | | STDMETHOD(SetRestoreMethod)( |
|
| __in VSS_RESTOREMETHOD_ENUM method, | | _In_ VSS_RESTOREMETHOD_ENUM method, |
| __in LPCWSTR wszService, | | _In_ LPCWSTR wszService, |
| __in LPCWSTR wszUserProcedure, | | _In_ LPCWSTR wszUserProcedure, |
| __in VSS_WRITERRESTORE_ENUM writerRestore, | | _In_ VSS_WRITERRESTORE_ENUM writerRestore, |
| __in bool bRebootRequired | | _In_ bool bRebootRequired |
| ) = 0; | | ) = 0; |
| | |
| // add a dependency to another writer's component | | // add a dependency to another writer's component |
| STDMETHOD(AddComponentDependency)( | | STDMETHOD(AddComponentDependency)( |
|
| __in LPCWSTR wszForLogicalPath, | | _In_ LPCWSTR wszForLogicalPath, |
| __in LPCWSTR wszForComponentName, | | _In_ LPCWSTR wszForComponentName, |
| __in VSS_ID onWriterId, | | _In_ VSS_ID onWriterId, |
| __in LPCWSTR wszOnLogicalPath, | | _In_ LPCWSTR wszOnLogicalPath, |
| __in LPCWSTR wszOnComponentName | | _In_ LPCWSTR wszOnComponentName |
| ) = 0; | | ) = 0; |
| | |
| // Set the schema used during backup | | // Set the schema used during backup |
| STDMETHOD(SetBackupSchema)( | | STDMETHOD(SetBackupSchema)( |
|
| __in DWORD dwSchemaMask | | _In_ DWORD dwSchemaMask |
| ) = 0; | | ) = 0; |
| | |
| // save document as an XML string | | // save document as an XML string |
| STDMETHOD(SaveAsXML)( | | STDMETHOD(SaveAsXML)( |
|
| __out BSTR *pbstrXML | | _Out_ BSTR *pbstrXML |
| ) = 0; | | ) = 0; |
| }; | | }; |
| | |
| class __declspec(uuid("e33affdc-59c7-47b1-97d5-4266598f6235")) IVssExpressWriter | | class __declspec(uuid("e33affdc-59c7-47b1-97d5-4266598f6235")) IVssExpressWriter |
| : public IUnknown | | : public IUnknown |
| { | | { |
| public: | | public: |
| STDMETHOD(CreateMetadata)( | | STDMETHOD(CreateMetadata)( |
|
| __in VSS_ID writerId, | | _In_ VSS_ID writerId, |
| __in LPCWSTR writerName, | | _In_ LPCWSTR writerName, |
| __in VSS_USAGE_TYPE usageType, | | _In_ VSS_USAGE_TYPE usageType, |
| __in DWORD versionMajor, | | _In_ DWORD versionMajor, |
| __in DWORD versionMinor, | | _In_ DWORD versionMinor, |
| __in DWORD reserved, | | _In_ DWORD reserved, |
| __out IVssCreateExpressWriterMetadata **ppMetadata | | _Out_ IVssCreateExpressWriterMetadata **ppMetadata |
| ) = 0; | | ) = 0; |
| | |
| STDMETHOD(LoadMetadata)( | | STDMETHOD(LoadMetadata)( |
|
| __in LPCWSTR metadata, | | _In_ LPCWSTR metadata, |
| __in DWORD reserved | | _In_ DWORD reserved |
| ) = 0; | | ) = 0; |
| | |
| STDMETHOD(Register)() = 0; | | STDMETHOD(Register)() = 0; |
| | |
| STDMETHOD(Unregister)( | | STDMETHOD(Unregister)( |
|
| __in VSS_ID writerId | | _In_ VSS_ID writerId |
| ) = 0; | | ) = 0; |
| }; | | }; |
| | |
| class CVssWriter; | | class CVssWriter; |
| | |
| ///////////////////////////////////////////////////////////////////////////// | | ///////////////////////////////////////////////////////////////////////////// |
| // CVssWriter | | // CVssWriter |
| | |
| extern "C" { | | extern "C" { |
|
| HRESULT STDAPICALLTYPE CreateWriter(__in CVssWriter* pWriter, __out IVssWrit
erImpl** pWriterImpl); | | HRESULT STDAPICALLTYPE CreateWriter(_In_ CVssWriter* pWriter, _Out_ IVssWrit
erImpl** pWriterImpl); |
| } | | } |
| | |
| class CVssWriter | | class CVssWriter |
| { | | { |
| // Constants | | // Constants |
| public: | | public: |
| | |
| // Constructors & Destructors | | // Constructors & Destructors |
| public: | | public: |
| STDMETHODCALLTYPE CVssWriter() | | STDMETHODCALLTYPE CVssWriter() |
| | |
| skipping to change at line 892 | | skipping to change at line 897 |
| m_pWriterImpl->Uninitialize(); | | m_pWriterImpl->Uninitialize(); |
| m_pWriterImpl->Release(); | | m_pWriterImpl->Release(); |
| m_pWriterImpl = NULL; | | m_pWriterImpl = NULL; |
| } | | } |
| } | | } |
| | |
| // Exposed operations | | // Exposed operations |
| public: | | public: |
| // initialize the writer object | | // initialize the writer object |
| HRESULT STDMETHODCALLTYPE Initialize( | | HRESULT STDMETHODCALLTYPE Initialize( |
|
| __in VSS_ID WriterId, | | _In_ VSS_ID WriterId, |
| __in LPCWSTR wszWriterName, | | _In_ LPCWSTR wszWriterName, |
| __in VSS_USAGE_TYPE ut, | | _In_ VSS_USAGE_TYPE ut, |
| __in VSS_SOURCE_TYPE st, | | _In_ VSS_SOURCE_TYPE st, |
| __in VSS_APPLICATION_LEVEL nLevel = VSS_APP_FRONT_END, | | _In_ VSS_APPLICATION_LEVEL nLevel = VSS_AP |
| __in DWORD dwTimeoutFreeze = 60000, // Maximum milliseconds betw | | P_FRONT_END, |
| een Freeze/Thaw | | _In_ DWORD dwTimeoutFreeze = 60000, |
| __in VSS_ALTERNATE_WRITER_STATE aws = VSS_AWS_NO_ALTERNATE_WRITER, | | // Maximum milliseconds between Freeze/Thaw |
| __in bool bIOThrottlingOnly = false, | | _In_ VSS_ALTERNATE_WRITER_STATE aws = VSS_AW |
| __in LPCWSTR wszWriterInstanceName = NULL | | S_NO_ALTERNATE_WRITER, |
| | _In_ bool bIOThrottlingOnly = false, |
| | _In_opt_ LPCWSTR wszWriterInstanceName = NULL |
| ) | | ) |
| { | | { |
| if (m_pWriterImpl != NULL) | | if (m_pWriterImpl != NULL) |
| return E_FAIL; | | return E_FAIL; |
| | |
| HRESULT hr = CreateWriter(this, &m_pWriterImpl); | | HRESULT hr = CreateWriter(this, &m_pWriterImpl); |
| if (FAILED(hr)) | | if (FAILED(hr)) |
| return hr; | | return hr; |
| | |
| hr = m_pWriterImpl->Initialize(WriterId, wszWriterName, wszWriterInstanc
eName, 0, 0, ut, st, nLevel, dwTimeoutFreeze, aws, bIOThrottlingOnly); | | hr = m_pWriterImpl->Initialize(WriterId, wszWriterName, wszWriterInstanc
eName, 0, 0, ut, st, nLevel, dwTimeoutFreeze, aws, bIOThrottlingOnly); |
| | |
| skipping to change at line 923 | | skipping to change at line 928 |
| m_pWriterImpl->Release(); | | m_pWriterImpl->Release(); |
| m_pWriterImpl = NULL; | | m_pWriterImpl = NULL; |
| } | | } |
| | |
| return hr; | | return hr; |
| } | | } |
| | |
| // cause the writer to subscribe to events. | | // cause the writer to subscribe to events. |
| HRESULT STDMETHODCALLTYPE Subscribe | | HRESULT STDMETHODCALLTYPE Subscribe |
| ( | | ( |
|
| __in DWORD dwEventFlags = VSS_SM_BACKUP_EVENTS_FLAG | VSS_SM_RESTORE_EVE
NTS_FLAG | | _In_ DWORD dwEventFlags = VSS_SM_BACKUP_EVENTS_FLAG | VSS_SM_RESTORE_EVE
NTS_FLAG |
| ) | | ) |
| { | | { |
| if (m_pWriterImpl == NULL) | | if (m_pWriterImpl == NULL) |
| return E_FAIL; | | return E_FAIL; |
| | |
| return m_pWriterImpl->Subscribe(0, dwEventFlags); | | return m_pWriterImpl->Subscribe(0, dwEventFlags); |
| } | | } |
| | |
| // cause the writer to unsubscribe from events | | // cause the writer to unsubscribe from events |
| HRESULT STDMETHODCALLTYPE Unsubscribe() | | HRESULT STDMETHODCALLTYPE Unsubscribe() |
| | |
| skipping to change at line 946 | | skipping to change at line 951 |
| return E_FAIL; | | return E_FAIL; |
| | |
| m_pWriterImpl->Unsubscribe(); | | m_pWriterImpl->Unsubscribe(); |
| | |
| return S_OK; | | return S_OK; |
| } | | } |
| | |
| // installs an alternative writer | | // installs an alternative writer |
| HRESULT STDMETHODCALLTYPE InstallAlternateWriter | | HRESULT STDMETHODCALLTYPE InstallAlternateWriter |
| ( | | ( |
|
| __in VSS_ID writerId, | | _In_ VSS_ID writerId, |
| __in CLSID persistentWriterClassId | | _In_ CLSID persistentWriterClassId |
| ) | | ) |
| { | | { |
| if (m_pWriterImpl == NULL) | | if (m_pWriterImpl == NULL) |
| return E_FAIL; | | return E_FAIL; |
| | |
| return m_pWriterImpl->InstallAlternateWriter(writerId, persistentWriterC
lassId); | | return m_pWriterImpl->InstallAlternateWriter(writerId, persistentWriterC
lassId); |
| } | | } |
| | |
| // Internal properties - accessible from OnXXX methods | | // Internal properties - accessible from OnXXX methods |
| protected: | | protected: |
| | |
| skipping to change at line 980 | | skipping to change at line 985 |
| { | | { |
| if (m_pWriterImpl == NULL) | | if (m_pWriterImpl == NULL) |
| return 0; | | return 0; |
| | |
| return m_pWriterImpl->GetCurrentVolumeCount(); | | return m_pWriterImpl->GetCurrentVolumeCount(); |
| } | | } |
| | |
| // get the name of the snapshot device corresponding to a given volume. | | // get the name of the snapshot device corresponding to a given volume. |
| HRESULT STDMETHODCALLTYPE GetSnapshotDeviceName | | HRESULT STDMETHODCALLTYPE GetSnapshotDeviceName |
| ( | | ( |
|
| __in LPCWSTR wszOriginalVolume, | | _In_ LPCWSTR wszOriginalVolume, |
| __deref_out_opt LPCWSTR* ppwszSnapshotDevice | | _Outptr_result_maybenull_ LPCWSTR* ppwszSnapshotDevice |
| ) const | | ) const |
| { | | { |
| if (m_pWriterImpl == NULL) | | if (m_pWriterImpl == NULL) |
| return E_FAIL; | | return E_FAIL; |
| | |
| return m_pWriterImpl->GetSnapshotDeviceName(wszOriginalVolume, ppwszSnap
shotDevice); | | return m_pWriterImpl->GetSnapshotDeviceName(wszOriginalVolume, ppwszSnap
shotDevice); |
| } | | } |
| | |
| // current snapshot set GUID | | // current snapshot set GUID |
| VSS_ID STDMETHODCALLTYPE GetCurrentSnapshotSetId() const | | VSS_ID STDMETHODCALLTYPE GetCurrentSnapshotSetId() const |
| | |
| skipping to change at line 1020 | | skipping to change at line 1025 |
| { | | { |
| if (m_pWriterImpl == NULL) | | if (m_pWriterImpl == NULL) |
| return VSS_APP_AUTO; | | return VSS_APP_AUTO; |
| | |
| return m_pWriterImpl->GetCurrentLevel(); | | return m_pWriterImpl->GetCurrentLevel(); |
| } | | } |
| | |
| // determine if path is in set of volumes being snapshotted | | // determine if path is in set of volumes being snapshotted |
| bool STDMETHODCALLTYPE IsPathAffected | | bool STDMETHODCALLTYPE IsPathAffected |
| ( | | ( |
|
| __in LPCWSTR wszPath | | _In_ LPCWSTR wszPath |
| ) const | | ) const |
| { | | { |
| if (m_pWriterImpl == NULL) | | if (m_pWriterImpl == NULL) |
| return false; | | return false; |
| | |
| return m_pWriterImpl->IsPathAffected(wszPath); | | return m_pWriterImpl->IsPathAffected(wszPath); |
| } | | } |
| | |
| // does the backup include bootable state (formerly system state backup) | | // does the backup include bootable state (formerly system state backup) |
| bool STDMETHODCALLTYPE IsBootableSystemStateBackedUp() const | | bool STDMETHODCALLTYPE IsBootableSystemStateBackedUp() const |
| | |
| skipping to change at line 1091 | | skipping to change at line 1096 |
| public: | | public: |
| // callback when request for metadata comes in | | // callback when request for metadata comes in |
| virtual bool STDMETHODCALLTYPE OnIdentify(IN IVssCreateWriterMetadata *pMeta
data) | | virtual bool STDMETHODCALLTYPE OnIdentify(IN IVssCreateWriterMetadata *pMeta
data) |
| { | | { |
| UNREFERENCED_PARAMETER(pMetadata); | | UNREFERENCED_PARAMETER(pMetadata); |
| return true; | | return true; |
| } | | } |
| | |
| // callback for prepare backup event | | // callback for prepare backup event |
| virtual bool STDMETHODCALLTYPE OnPrepareBackup( | | virtual bool STDMETHODCALLTYPE OnPrepareBackup( |
|
| __in IVssWriterComponents *pComponent | | _In_ IVssWriterComponents *pComponent |
| ) | | ) |
| { | | { |
| UNREFERENCED_PARAMETER(pComponent); | | UNREFERENCED_PARAMETER(pComponent); |
| return true; | | return true; |
| } | | } |
| | |
| // callback for prepare snapsot event | | // callback for prepare snapsot event |
| virtual bool STDMETHODCALLTYPE OnPrepareSnapshot() = 0; | | virtual bool STDMETHODCALLTYPE OnPrepareSnapshot() = 0; |
| | |
| // callback for freeze event | | // callback for freeze event |
| | |
| skipping to change at line 1113 | | skipping to change at line 1118 |
| | |
| // callback for thaw event | | // callback for thaw event |
| virtual bool STDMETHODCALLTYPE OnThaw() = 0; | | virtual bool STDMETHODCALLTYPE OnThaw() = 0; |
| | |
| // callback if current sequence is aborted | | // callback if current sequence is aborted |
| virtual bool STDMETHODCALLTYPE OnAbort() = 0; | | virtual bool STDMETHODCALLTYPE OnAbort() = 0; |
| | |
| // callback on backup complete event | | // callback on backup complete event |
| virtual bool STDMETHODCALLTYPE OnBackupComplete | | virtual bool STDMETHODCALLTYPE OnBackupComplete |
| ( | | ( |
|
| __in IVssWriterComponents *pComponent | | _In_ IVssWriterComponents *pComponent |
| ) | | ) |
| { | | { |
| UNREFERENCED_PARAMETER(pComponent); | | UNREFERENCED_PARAMETER(pComponent); |
| return true; | | return true; |
| } | | } |
| | |
| // callback indicating that the backup process has either completed or has s
hut down | | // callback indicating that the backup process has either completed or has s
hut down |
| virtual bool STDMETHODCALLTYPE OnBackupShutdown | | virtual bool STDMETHODCALLTYPE OnBackupShutdown |
| ( | | ( |
|
| __in VSS_ID SnapshotSetId | | _In_ VSS_ID SnapshotSetId |
| ) | | ) |
| { | | { |
| UNREFERENCED_PARAMETER(SnapshotSetId); | | UNREFERENCED_PARAMETER(SnapshotSetId); |
| return true; | | return true; |
| } | | } |
| | |
| // callback on pre-restore event | | // callback on pre-restore event |
| virtual bool STDMETHODCALLTYPE OnPreRestore | | virtual bool STDMETHODCALLTYPE OnPreRestore |
| ( | | ( |
|
| __in IVssWriterComponents *pComponent | | _In_ IVssWriterComponents *pComponent |
| ) | | ) |
| { | | { |
| UNREFERENCED_PARAMETER(pComponent); | | UNREFERENCED_PARAMETER(pComponent); |
| return true; | | return true; |
| } | | } |
| | |
| // callback on post-restore event | | // callback on post-restore event |
| virtual bool STDMETHODCALLTYPE OnPostRestore | | virtual bool STDMETHODCALLTYPE OnPostRestore |
| ( | | ( |
|
| __in IVssWriterComponents *pComponent | | _In_ IVssWriterComponents *pComponent |
| ) | | ) |
| { | | { |
| UNREFERENCED_PARAMETER(pComponent); | | UNREFERENCED_PARAMETER(pComponent); |
| return true; | | return true; |
| } | | } |
| | |
| // callback on post snapshot event | | // callback on post snapshot event |
| virtual bool STDMETHODCALLTYPE OnPostSnapshot | | virtual bool STDMETHODCALLTYPE OnPostSnapshot |
| ( | | ( |
|
| __in IVssWriterComponents *pComponent | | _In_ IVssWriterComponents *pComponent |
| ) | | ) |
| { | | { |
| UNREFERENCED_PARAMETER(pComponent); | | UNREFERENCED_PARAMETER(pComponent); |
| return true; | | return true; |
| } | | } |
| | |
| // callback on back off I/O volume event | | // callback on back off I/O volume event |
| virtual bool STDMETHODCALLTYPE OnBackOffIOOnVolume | | virtual bool STDMETHODCALLTYPE OnBackOffIOOnVolume |
| ( | | ( |
|
| __in VSS_PWSZ wszVolumeName, | | _In_ VSS_PWSZ wszVolumeName, |
| __in VSS_ID snapshotId, | | _In_ VSS_ID snapshotId, |
| __in VSS_ID providerId | | _In_ VSS_ID providerId |
| ) | | ) |
| { | | { |
| UNREFERENCED_PARAMETER(wszVolumeName); | | UNREFERENCED_PARAMETER(wszVolumeName); |
| UNREFERENCED_PARAMETER(snapshotId); | | UNREFERENCED_PARAMETER(snapshotId); |
| UNREFERENCED_PARAMETER(providerId); | | UNREFERENCED_PARAMETER(providerId); |
| | |
| return true; | | return true; |
| } | | } |
| | |
| // callback on Continue I/O on volume event | | // callback on Continue I/O on volume event |
| virtual bool STDMETHODCALLTYPE OnContinueIOOnVolume | | virtual bool STDMETHODCALLTYPE OnContinueIOOnVolume |
| ( | | ( |
|
| __in VSS_PWSZ wszVolumeName, | | _In_ VSS_PWSZ wszVolumeName, |
| __in VSS_ID snapshotId, | | _In_ VSS_ID snapshotId, |
| __in VSS_ID providerId | | _In_ VSS_ID providerId |
| ) | | ) |
| { | | { |
| UNREFERENCED_PARAMETER(wszVolumeName); | | UNREFERENCED_PARAMETER(wszVolumeName); |
| UNREFERENCED_PARAMETER(snapshotId); | | UNREFERENCED_PARAMETER(snapshotId); |
| UNREFERENCED_PARAMETER(providerId); | | UNREFERENCED_PARAMETER(providerId); |
| | |
| return true; | | return true; |
| } | | } |
| | |
| // callback to specify that the volume snaphost service is shutting down. U
sed | | // callback to specify that the volume snaphost service is shutting down. U
sed |
| | |
| skipping to change at line 1212 | | skipping to change at line 1217 |
| } | | } |
| | |
| protected: | | protected: |
| | |
| IVssWriterImpl *m_pWriterImpl; | | IVssWriterImpl *m_pWriterImpl; |
| }; | | }; |
| | |
| class CVssWriterEx; | | class CVssWriterEx; |
| extern "C" { | | extern "C" { |
| HRESULT STDMETHODCALLTYPE CreateWriterEx( | | HRESULT STDMETHODCALLTYPE CreateWriterEx( |
|
| __in CVssWriterEx *pWriter, | | _In_ CVssWriterEx *pWriter, |
| __out IVssWriterImpl **pWriterImpl | | _Out_ IVssWriterImpl **pWriterImpl |
| ); | | ); |
| } | | } |
| | |
| class CVssWriterEx : public CVssWriter | | class CVssWriterEx : public CVssWriter |
| { | | { |
| public: | | public: |
|
| HRESULT STDMETHODCALLTYPE Initialize | | HRESULT STDMETHODCALLTYPE Initialize( |
| ( | | _In_ VSS_ID WriterId, |
| __in VSS_ID WriterId, | | _In_ LPCWSTR wszWriterName, |
| __in LPCWSTR wszWriterName, | | _In_ VSS_USAGE_TYPE ut, |
| __in VSS_USAGE_TYPE ut, | | _In_ VSS_SOURCE_TYPE st, |
| __in VSS_SOURCE_TYPE st, | | _In_ VSS_APPLICATION_LEVEL nLevel = VSS_AP |
| __in VSS_APPLICATION_LEVEL nLevel = VSS_APP_FRONT_END, | | P_FRONT_END, |
| __in DWORD dwTimeoutFreeze = 60000, // Maximum milliseconds betw | | _In_ DWORD dwTimeoutFreeze = 60000, |
| een Freeze/Thaw | | // Maximum milliseconds between Freeze/Thaw |
| __in VSS_ALTERNATE_WRITER_STATE aws = VSS_AWS_NO_ALTERNATE_WRITER, | | _In_ VSS_ALTERNATE_WRITER_STATE aws = VSS_AW |
| __in bool bIOThrottlingOnly = false, | | S_NO_ALTERNATE_WRITER, |
| __in LPCWSTR wszWriterInstanceName = NULL | | _In_ bool bIOThrottlingOnly = false, |
| | _In_opt_ LPCWSTR wszWriterInstanceName = NULL |
| ) | | ) |
| { | | { |
| if (m_pWriterImpl != NULL) | | if (m_pWriterImpl != NULL) |
| return E_FAIL; | | return E_FAIL; |
| | |
| HRESULT hr = CreateWriterEx(this, &m_pWriterImpl); | | HRESULT hr = CreateWriterEx(this, &m_pWriterImpl); |
| if (FAILED(hr)) | | if (FAILED(hr)) |
| return hr; | | return hr; |
| | |
| hr = m_pWriterImpl->Initialize(WriterId, wszWriterName, wszWriterInstanc
eName, 0, 0, ut, st, nLevel, dwTimeoutFreeze, aws, bIOThrottlingOnly); | | hr = m_pWriterImpl->Initialize(WriterId, wszWriterName, wszWriterInstanc
eName, 0, 0, ut, st, nLevel, dwTimeoutFreeze, aws, bIOThrottlingOnly); |
| | |
| skipping to change at line 1252 | | skipping to change at line 1256 |
| { | | { |
| m_pWriterImpl->Release(); | | m_pWriterImpl->Release(); |
| m_pWriterImpl = NULL; | | m_pWriterImpl = NULL; |
| } | | } |
| | |
| return hr; | | return hr; |
| } | | } |
| | |
| HRESULT STDMETHODCALLTYPE InitializeEx | | HRESULT STDMETHODCALLTYPE InitializeEx |
| ( | | ( |
|
| __in VSS_ID WriterId, | | _In_ VSS_ID WriterId, |
| __in LPCWSTR wszWriterName, | | _In_ LPCWSTR wszWriterName, |
| __in DWORD dwMajorVersion, | | _In_ DWORD dwMajorVersion, |
| __in DWORD dwMinorVersion, | | _In_ DWORD dwMinorVersion, |
| __in VSS_USAGE_TYPE ut, | | _In_ VSS_USAGE_TYPE ut, |
| __in VSS_SOURCE_TYPE st, | | _In_ VSS_SOURCE_TYPE st, |
| __in VSS_APPLICATION_LEVEL nLevel = VSS_APP_FRONT_END, | | _In_ VSS_APPLICATION_LEVEL nLevel = VSS_AP |
| __in DWORD dwTimeoutFreeze = 60000, // Maximum milliseconds betw | | P_FRONT_END, |
| een Freeze/Thaw | | _In_ DWORD dwTimeoutFreeze = 60000, |
| __in VSS_ALTERNATE_WRITER_STATE aws = VSS_AWS_NO_ALTERNATE_WRITER, | | // Maximum milliseconds between Freeze/Thaw |
| __in bool bIOThrottlingOnly = false, | | _In_ VSS_ALTERNATE_WRITER_STATE aws = VSS_AW |
| __in LPCWSTR wszWriterInstanceName = NULL | | S_NO_ALTERNATE_WRITER, |
| | _In_ bool bIOThrottlingOnly = false, |
| | _In_opt_ LPCWSTR wszWriterInstanceName = NULL |
| ) | | ) |
| { | | { |
| if (m_pWriterImpl != NULL) | | if (m_pWriterImpl != NULL) |
| return E_FAIL; | | return E_FAIL; |
| | |
| HRESULT hr = CreateWriterEx(this, &m_pWriterImpl); | | HRESULT hr = CreateWriterEx(this, &m_pWriterImpl); |
| if (FAILED(hr)) | | if (FAILED(hr)) |
| return hr; | | return hr; |
| | |
| hr = m_pWriterImpl->Initialize(WriterId, wszWriterName, wszWriterInstanc
eName, dwMajorVersion, dwMinorVersion, ut, st, nLevel, dwTimeoutFreeze, aws, bIO
ThrottlingOnly); | | hr = m_pWriterImpl->Initialize(WriterId, wszWriterName, wszWriterInstanc
eName, dwMajorVersion, dwMinorVersion, ut, st, nLevel, dwTimeoutFreeze, aws, bIO
ThrottlingOnly); |
| | |
| skipping to change at line 1288 | | skipping to change at line 1292 |
| | |
| return hr; | | return hr; |
| } | | } |
| | |
| virtual bool STDMETHODCALLTYPE OnIdentify(IN IVssCreateWriterMetadata *pMeta
data) | | virtual bool STDMETHODCALLTYPE OnIdentify(IN IVssCreateWriterMetadata *pMeta
data) |
| { | | { |
| UNREFERENCED_PARAMETER(pMetadata); | | UNREFERENCED_PARAMETER(pMetadata); |
| return false; | | return false; |
| } | | } |
| | |
|
| virtual bool STDMETHODCALLTYPE OnIdentifyEx(__in IVssCreateWriterMetadataEx
*pMetadata) | | virtual bool STDMETHODCALLTYPE OnIdentifyEx(_In_ IVssCreateWriterMetadataEx
*pMetadata) |
| { | | { |
| UNREFERENCED_PARAMETER(pMetadata); | | UNREFERENCED_PARAMETER(pMetadata); |
| return false; | | return false; |
| } | | } |
| | |
| protected: | | protected: |
| HRESULT GetIdentifyInformation | | HRESULT GetIdentifyInformation |
| ( | | ( |
|
| __out IVssExamineWriterMetadata** ppMetadata | | _Out_ IVssExamineWriterMetadata** ppMetadata |
| ) | | ) |
| { | | { |
| UNREFERENCED_PARAMETER(ppMetadata); | | UNREFERENCED_PARAMETER(ppMetadata); |
| | |
| if (m_pWriterImpl == NULL) | | if (m_pWriterImpl == NULL) |
| return E_FAIL; | | return E_FAIL; |
| | |
| *ppMetadata = m_pWriterImpl->GetIdentityInformation(); | | *ppMetadata = m_pWriterImpl->GetIdentityInformation(); |
| | |
| return S_OK; | | return S_OK; |
| } | | } |
| | |
| // cause the writer to subscribe to events. | | // cause the writer to subscribe to events. |
| HRESULT STDMETHODCALLTYPE SubscribeEx | | HRESULT STDMETHODCALLTYPE SubscribeEx |
| ( | | ( |
|
| __in DWORD dwUnsubscribeTimeout, | | _In_ DWORD dwUnsubscribeTimeout, |
| __in DWORD dwEventFlags = VSS_SM_BACKUP_EVENTS_FLAG | VSS_SM_RESTORE_EVE | | _In_ DWORD dwEventFlags = VSS_SM_BACKUP_EVENTS_FLAG | VSS_SM_RESTORE_EVE |
| NTS_FLAG | | NTS_FLAG |
| ) | | ) |
| { | | { |
| if (m_pWriterImpl == NULL) | | if (m_pWriterImpl == NULL) |
| return E_FAIL; | | return E_FAIL; |
| | |
| return m_pWriterImpl->Subscribe(dwUnsubscribeTimeout, dwEventFlags); | | return m_pWriterImpl->Subscribe(dwUnsubscribeTimeout, dwEventFlags); |
| } | | } |
| }; | | }; |
| | |
| class CVssWriterEx2 : public CVssWriterEx | | class CVssWriterEx2 : public CVssWriterEx |
| { | | { |
| public: | | public: |
| | |
| HRESULT STDMETHODCALLTYPE SetWriterFailureEx( | | HRESULT STDMETHODCALLTYPE SetWriterFailureEx( |
|
| __in HRESULT hrWriter, | | _In_ HRESULT hrWriter, |
| __in HRESULT hrApplication = S_FALSE, | | _In_ HRESULT hrApplication = S_FALSE, |
| __in LPCWSTR wszApplicationMessage = NULL | | _In_ LPCWSTR wszApplicationMessage = NULL |
| ) | | ) |
| { | | { |
| if (m_pWriterImpl == NULL) | | if (m_pWriterImpl == NULL) |
| return E_FAIL; | | return E_FAIL; |
| | |
| return m_pWriterImpl->SetWriterFailureEx(hrWriter, hrApplication, wszApp
licationMessage); | | return m_pWriterImpl->SetWriterFailureEx(hrWriter, hrApplication, wszApp
licationMessage); |
| } | | } |
| | |
| HRESULT STDMETHODCALLTYPE GetSessionId( | | HRESULT STDMETHODCALLTYPE GetSessionId( |
|
| __out VSS_ID *idSession | | _Out_ VSS_ID *idSession |
| ) | | ) |
| { | | { |
| if (m_pWriterImpl == NULL) | | if (m_pWriterImpl == NULL) |
| return E_FAIL; | | return E_FAIL; |
| | |
| return m_pWriterImpl->GetSessionId(idSession); | | return m_pWriterImpl->GetSessionId(idSession); |
| } | | } |
| | |
| bool STDMETHODCALLTYPE IsWriterShuttingDown() | | bool STDMETHODCALLTYPE IsWriterShuttingDown() |
| { | | { |
| return m_pWriterImpl->IsWriterShuttingDown(); | | return m_pWriterImpl->IsWriterShuttingDown(); |
| } | | } |
| }; | | }; |
| | |
| extern "C" { | | extern "C" { |
| HRESULT STDAPICALLTYPE CreateVssExpressWriterInternal | | HRESULT STDAPICALLTYPE CreateVssExpressWriterInternal |
| ( | | ( |
|
| __out IVssExpressWriter **ppWriter | | _Out_ IVssExpressWriter **ppWriter |
| ); | | ); |
| } | | } |
| | |
| inline HRESULT CreateVssExpressWriter | | inline HRESULT CreateVssExpressWriter |
| ( | | ( |
|
| __out IVssExpressWriter **ppWriter | | _Out_ IVssExpressWriter **ppWriter |
| ) | | ) |
| { | | { |
| return CreateVssExpressWriterInternal(ppWriter); | | return CreateVssExpressWriterInternal(ppWriter); |
| } | | } |
| | |
|
| | #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */ |
| | #pragma endregion |
| | |
| #endif //__CVSS_WRITER_H_ | | #endif //__CVSS_WRITER_H_ |
| | |
| End of changes. 59 change blocks. |
| 157 lines changed or deleted | | 170 lines changed or added |
|