| vsbackup.h (6.0.6002.18005-Windows 6.0) | | vsbackup.h (6.1.7601.17514-Windows 7.0) |
| | |
| skipping to change at line 66 | | skipping to change at line 66 |
| }; | | }; |
| | |
| const IID IID_IVssBackupComponentsEx2 = // acfe2b3a-22c9-4ef8-bd03-2f9ca23
0084e | | const IID IID_IVssBackupComponentsEx2 = // acfe2b3a-22c9-4ef8-bd03-2f9ca23
0084e |
| { | | { |
| 0xacfe2b3a, | | 0xacfe2b3a, |
| 0x22c9, | | 0x22c9, |
| 0x4ef8, | | 0x4ef8, |
| { 0xbd, 0x03, 0x2f, 0x9c, 0xa2, 0x30, 0x08, 0x4e } | | { 0xbd, 0x03, 0x2f, 0x9c, 0xa2, 0x30, 0x08, 0x4e } |
| }; | | }; |
| | |
|
| | const IID IID_IVssBackupComponentsEx3 = // c191bfbc-b602-4675-8bd1-67d642f |
| | 529d5 |
| | { |
| | 0xc191bfbc, |
| | 0xb602, |
| | 0x4675, |
| | { 0x8b, 0xd1, 0x67, 0xd6, 0x42, 0xf5, 0x29, 0xd5 } |
| | }; |
| | |
| // 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 90 | | skipping to change at line 98 |
| UINT cFileCount; // # of files in file group | | UINT cFileCount; // # of files in file group |
| UINT cDatabases; // # of database files | | UINT cDatabases; // # of database files |
| UINT cLogFiles; // # of log files | | UINT cLogFiles; // # of log files |
| UINT cDependencies; // # of components that this component depends on | | UINT cDependencies; // # of components that this component depends on |
| } VSS_COMPONENTINFO; | | } VSS_COMPONENTINFO; |
| | |
| 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)(PVSSCOMPONENTINFO *ppInfo) = 0; | | STDMETHOD(GetComponentInfo) |
| | ( |
| | __out PVSSCOMPONENTINFO *ppInfo |
| | ) = 0; |
| | |
| // free component information | | // free component information |
|
| STDMETHOD(FreeComponentInfo)(PVSSCOMPONENTINFO pInfo) = 0; | | STDMETHOD(FreeComponentInfo) |
| | ( |
| | __in PVSSCOMPONENTINFO pInfo |
| | ) = 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, |
| 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)(IXMLDOMDocument **pDoc) = 0; | | STDMETHOD(GetDocument) |
| | ( |
| | __out IXMLDOMDocument **pDoc |
| | ) = 0; |
| | |
| // convert document to a XML string | | // convert document to a XML string |
|
| STDMETHOD(SaveAsXML)(BSTR *pbstrXML) = 0; | | STDMETHOD(SaveAsXML) |
| | ( |
| | __in BSTR *pbstrXML |
| | ) = 0; |
| | |
| // load document from an XML string | | // load document from an XML string |
|
| STDMETHOD(LoadFromXML)(BSTR bstrXML) = 0; | | STDMETHOD(LoadFromXML) |
| }; | | ( |
| | __in BSTR bstrXML |
| | ) = 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 |
| | |
| skipping to change at line 237 | | skipping to change at line 261 |
| ( | | ( |
| __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)(OUT UINT *pcComponents) = 0; | | STDMETHOD(GetWriterComponentsCount) |
| | ( |
| | __out UINT *pcComponents |
| | ) = 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)(IN BSTR bstrXML = NULL) = 0; | | STDMETHOD(InitializeForBackup) |
| | ( |
| | __in_opt BSTR bstrXML = NULL |
| | ) = 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)(IN BSTR bstrXML) = 0; | | STDMETHOD(InitializeForRestore) |
| | ( |
| | __in BSTR bstrXML |
| | ) = 0; |
| | |
|
| // set state describing restore | | // set state describing restore |
| STDMETHOD(SetRestoreState) | | STDMETHOD(SetRestoreState) |
| ( | | ( |
| 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)(BSTR *pbstrXML) = 0; | | STDMETHOD(SaveAsXML) |
| | ( |
| | __in BSTR *pbstrXML |
| | ) = 0; |
| | |
| // signal BackupComplete event to the writers | | // signal BackupComplete event to the writers |
|
| STDMETHOD(BackupComplete)(OUT IVssAsync **ppAsync) = 0; | | STDMETHOD(BackupComplete) |
| | ( |
| | __out IVssAsync **ppAsync |
| | ) = 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)(OUT IVssAsync **ppAsync) = 0; | | STDMETHOD(PreRestore) |
| | ( |
| | __out IVssAsync **ppAsync |
| | ) = 0; |
| | |
| // signal PostRestore event to the writers | | // signal PostRestore event to the writers |
|
| STDMETHOD(PostRestore)(OUT IVssAsync **ppAsync) = 0; | | STDMETHOD(PostRestore) |
| | ( |
| | __out IVssAsync **ppAsync |
| | ) = 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 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 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 VSS_PWSZ wszPathFromRoot, | | __in_z VSS_PWSZ wszPathFromRoot, |
| IN LONG lAttributes, | | __in LONG lAttributes, |
| IN VSS_PWSZ wszExpose, | | __in_z VSS_PWSZ wszExpose, |
| OUT VSS_PWSZ *pwszExposed | | __out_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 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, |
| | |
| skipping to change at line 644 | | skipping to change at line 687 |
| __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) = 0; | | __in LPCWSTR wszRestoreName |
| | ) = 0; |
| | |
| STDMETHOD(BreakSnapshotSetEx) | | STDMETHOD(BreakSnapshotSetEx) |
| ( | | ( |
| __in VSS_ID SnapshotSetID, | | __in VSS_ID SnapshotSetID, |
| __in DWORD dwBreakFlags, | | __in DWORD dwBreakFlags, |
|
| __out IVssAsync** ppAsync) = 0; | | __out IVssAsync** ppAsync |
| | ) = 0; |
| | |
| STDMETHOD(PreFastRecovery) | | STDMETHOD(PreFastRecovery) |
| ( | | ( |
| __in VSS_ID SnapshotSetID, | | __in VSS_ID SnapshotSetID, |
| __in DWORD dwPreFastRecoveryFlags, | | __in DWORD dwPreFastRecoveryFlags, |
|
| __out IVssAsync** ppAsync) = 0; | | __out IVssAsync** ppAsync |
| | ) = 0; |
| | |
| STDMETHOD(FastRecovery) | | STDMETHOD(FastRecovery) |
| ( | | ( |
| __in VSS_ID SnapshotSetID, | | __in VSS_ID SnapshotSetID, |
| __in DWORD dwFastRecoveryFlags, | | __in DWORD dwFastRecoveryFlags, |
|
| __out IVssAsync** ppAsync) = 0; | | __out IVssAsync** ppAsync |
| | ) = 0; |
| | }; |
| | |
|
| }; | | class __declspec(uuid("c191bfbc-b602-4675-8bd1-67d642f529d5")) IVssBackupCompone |
| | ntsEx3 : public IVssBackupComponentsEx2 |
| | { |
| | public: |
| | |
| | STDMETHOD(GetWriterStatusEx) |
| | ( |
| | __in UINT iWriter, |
| | __out VSS_ID *pidInstance, |
| | __out VSS_ID *pidWriter, |
| | __out BSTR *pbstrWriter, |
| | __out VSS_WRITER_STATE *pnStatus, |
| | __out HRESULT *phrFailureWriter, |
| | __out_opt HRESULT *phrApplication = NULL, |
| | __out_opt BSTR *pbstrApplicationMessage = NULL |
| | ) = 0; |
| | |
| | STDMETHOD(AddSnapshotToRecoverySet) |
| | ( |
| | __in VSS_ID snapshotId, |
| | __in DWORD dwFlags, |
| | __in_opt VSS_PWSZ pwszDestinationVolume = NULL |
| | ) = 0; |
| | |
| | STDMETHOD(RecoverSet) |
| | ( |
| | __in DWORD dwFlags, |
| | __deref_out IVssAsync** ppAsync |
| | ) = 0; |
| | |
| | STDMETHOD(GetSessionId) |
| | ( |
| | __out VSS_ID *idSession |
| | ) = 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, | | ( |
| __out IVssExamineWriterMetadata **ppMetadata | | __in BSTR bstrXML, |
| ); | | __out IVssExamineWriterMetadata **ppMetadata |
| | ); |
| | |
|
| HRESULT APIENTRY IsVolumeSnapshottedInternal( | | HRESULT APIENTRY IsVolumeSnapshottedInternal |
| __in VSS_PWSZ pwszVolumeName, | | ( |
| __out BOOL *pbSnapshotsPresent, | | __in_z VSS_PWSZ pwszVolumeName, |
| __out LONG *plSnapshotCapability | | __out BOOL *pbSnapshotsPresent, |
| ); | | __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( | | |
| __in VSS_ID ProviderId, | | |
| __in IID InterfaceId, | | |
| __out IUnknown** ppItf); | | |
| | |
|
| HRESULT APIENTRY ShouldBlockRevertInternal( | | HRESULT APIENTRY GetProviderMgmtInterfaceInternal( |
| __in LPCWSTR wszVolumeName, | | __in VSS_ID ProviderId, |
| __out bool* pbBlock | | __in IID InterfaceId, |
| ); | | __out IUnknown** ppItf |
| | ); |
| | |
|
| | HRESULT APIENTRY ShouldBlockRevertInternal |
| | ( |
| | __in LPCWSTR wszVolumeName, |
| | __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 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 // _VSBACKUP_H_ | | #endif // _VSBACKUP_H_ |
| | |
| End of changes. 99 change blocks. |
| 259 lines changed or deleted | | 352 lines changed or added |
|
| vswriter.h (6.0.6002.18005-Windows 6.0) | | vswriter.h (6.1.7601.17514-Windows 7.0) |
| | |
| skipping to change at line 17 | | skipping to change at line 17 |
| @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 "vsserror.h" | | #include "vsserror.h" |
| | |
|
| const IID IID_IVssComponent = // d2c72c96-c121-4518-b627-e5a93d010e | | const IID IID_IVssComponent = // d2c72c96-c121-4518-b627-e5a93 |
| ad | | d010ead |
| { | | { |
| 0xd2c72c96, | | 0xd2c72c96, |
| 0xc121, | | 0xc121, |
| 0x4518, | | 0x4518, |
| { 0xb6, 0x27, 0xe5, 0xa9, 0x3d, 0x01, 0x0e, 0xad } | | { 0xb6, 0x27, 0xe5, 0xa9, 0x3d, 0x01, 0x0e, 0xad } |
| }; | | }; |
| | |
|
| const IID IID_IVssComponentEx = // 156c8b5e-f131-4bd7-9c97-d1923be7e1fa | | const IID IID_IVssComponentEx = // 156c8b5e-f131-4bd7-9c97-d1923 |
| { | | be7e1fa |
| 0x156c8b5e, | | { |
| 0xf131, | | 0x156c8b5e, |
| 0x4bd7, | | 0xf131, |
| { 0x9c, 0x97, 0xd1, 0x92, 0x3b, 0xe7, 0xe1, 0xfa } | | 0x4bd7, |
| }; | | { 0x9c, 0x97, 0xd1, 0x92, 0x3b, 0xe7, 0xe1, 0xfa } |
| | }; |
| | |
|
| const IID IID_IVssCreateWriterMetadataEx = // 9f21981d-d469-4349-b807-39e64e4674 | | const IID IID_IVssComponentEx2 = // 3b5be0f2-07a9-4e4b-bdd3-cfdc8 |
| e1 | | e2c0d2d |
| { | | { |
| 0x9f21981d, | | 0x3b5be0f2, |
| 0xd469, | | 0x07a9, |
| 0x4349, | | 0x4e4b, |
| { 0xb8, 0x07, 0x39, 0xe6, 0x4e, 0x46, 0x74, 0xe1 } | | { 0xbd, 0xd3, 0xcf, 0xdc, 0x8e, 0x2c, 0x0d, 0x2d } |
| }; | | }; |
| | |
| | const IID IID_IVssCreateWriterMetadataEx = // 9f21981d-d469-4349-b807-39e64 |
| | e4674e1 |
| | { |
| | 0x9f21981d, |
| | 0xd469, |
| | 0x4349, |
| | { 0xb8, 0x07, 0x39, 0xe6, 0x4e, 0x46, 0x74, 0xe1 } |
| | }; |
| | |
| | const IID IID_IVssCreateExpressWriterMetadata = // 9c772e77-b26e-427f-92dd-c996f |
| | 41ea5e3 |
| | { |
| | 0x9c772e77, |
| | 0xb26e, |
| | 0x427f, |
| | { 0x92, 0xdd, 0xc9, 0x96, 0xf4, 0x1e, 0xa5, 0xe3 } |
| | }; |
| | |
| | const IID IID_IVssExpressWriter = // e33affdc-59c7-47b1-97d5-42665 |
| | 98f6235 |
| | { |
| | 0xe33affdc, |
| | 0x59c7, |
| | 0x47b1, |
| | {0x97, 0xd5, 0x42, 0x66, 0x59, 0x8f, 0x62, 0x35} |
| | }; |
| | |
| // declaration of how application data is used | | // declaration of how application data is used |
| typedef enum VSS_USAGE_TYPE | | typedef enum VSS_USAGE_TYPE |
|
| { | | { |
| VSS_UT_UNDEFINED = 0, | | VSS_UT_UNDEFINED = 0, |
|
| VSS_UT_BOOTABLESYSTEMSTATE, // formerly "system state" | | VSS_UT_BOOTABLESYSTEMSTATE, // formerly "system state" |
| VSS_UT_SYSTEMSERVICE, // system service | | VSS_UT_SYSTEMSERVICE, // system service |
| VSS_UT_USERDATA, // user data | | VSS_UT_USERDATA, // user data |
| VSS_UT_OTHER // unclassified | | VSS_UT_OTHER // unclassified |
| }; | | }; |
| | |
| typedef enum VSS_SOURCE_TYPE | | typedef enum VSS_SOURCE_TYPE |
|
| { | | { |
| VSS_ST_UNDEFINED = 0, | | VSS_ST_UNDEFINED = 0, |
| VSS_ST_TRANSACTEDDB, // transacted db (e.g., SQL Server, JET Blue
) | | VSS_ST_TRANSACTEDDB, // transacted db (e.g., SQL Server, JET Blue
) |
|
| VSS_ST_NONTRANSACTEDDB, // not transacted(e.g., Jet Red) | | VSS_ST_NONTRANSACTEDDB, // not transacted(e.g., Jet Red) |
| VSS_ST_OTHER // unclassified | | VSS_ST_OTHER // unclassified |
|
| }; | | }; |
| | |
| typedef enum VSS_RESTOREMETHOD_ENUM | | typedef enum VSS_RESTOREMETHOD_ENUM |
|
| { | | { |
| VSS_RME_UNDEFINED = 0, | | VSS_RME_UNDEFINED = 0, |
| VSS_RME_RESTORE_IF_NOT_THERE, | | VSS_RME_RESTORE_IF_NOT_THERE, |
| VSS_RME_RESTORE_IF_CAN_REPLACE, | | VSS_RME_RESTORE_IF_CAN_REPLACE, |
| VSS_RME_STOP_RESTORE_START, | | VSS_RME_STOP_RESTORE_START, |
| VSS_RME_RESTORE_TO_ALTERNATE_LOCATION, | | VSS_RME_RESTORE_TO_ALTERNATE_LOCATION, |
| VSS_RME_RESTORE_AT_REBOOT, | | VSS_RME_RESTORE_AT_REBOOT, |
| VSS_RME_RESTORE_AT_REBOOT_IF_CANNOT_REPLACE, | | VSS_RME_RESTORE_AT_REBOOT_IF_CANNOT_REPLACE, |
|
| VSS_RME_CUSTOM | | VSS_RME_CUSTOM, |
| }; | | VSS_RME_RESTORE_STOP_START |
| | }; |
| | |
| typedef enum VSS_WRITERRESTORE_ENUM | | typedef enum VSS_WRITERRESTORE_ENUM |
|
| { | | { |
| VSS_WRE_UNDEFINED = 0, | | VSS_WRE_UNDEFINED = 0, |
| VSS_WRE_NEVER, | | VSS_WRE_NEVER, |
| VSS_WRE_IF_REPLACE_FAILS, | | VSS_WRE_IF_REPLACE_FAILS, |
| VSS_WRE_ALWAYS | | VSS_WRE_ALWAYS |
|
| }; | | }; |
| | |
| typedef enum VSS_COMPONENT_TYPE | | typedef enum VSS_COMPONENT_TYPE |
|
| { | | { |
| VSS_CT_UNDEFINED = 0, | | VSS_CT_UNDEFINED = 0, |
| VSS_CT_DATABASE, | | VSS_CT_DATABASE, |
| VSS_CT_FILEGROUP | | VSS_CT_FILEGROUP |
|
| }; | | }; |
| | |
| typedef enum VSS_ALTERNATE_WRITER_STATE | | typedef enum VSS_ALTERNATE_WRITER_STATE |
|
| { | | { |
| VSS_AWS_UNDEFINED = 0, | | VSS_AWS_UNDEFINED = 0, |
| VSS_AWS_NO_ALTERNATE_WRITER, | | VSS_AWS_NO_ALTERNATE_WRITER, |
| VSS_AWS_ALTERNATE_WRITER_EXISTS, | | VSS_AWS_ALTERNATE_WRITER_EXISTS, |
| VSS_AWS_THIS_IS_ALTERNATE_WRITER | | VSS_AWS_THIS_IS_ALTERNATE_WRITER |
|
| }; | | }; |
| | |
| // Flags to specify which types of events to receive. Used in Subscribe. | | // Flags to specify which types of events to receive. Used in Subscribe. |
| typedef enum VSS_SUBSCRIBE_MASK | | typedef enum VSS_SUBSCRIBE_MASK |
|
| { | | { |
| VSS_SM_POST_SNAPSHOT_FLAG = 0x00000001, | | VSS_SM_POST_SNAPSHOT_FLAG = 0x00000001, |
| VSS_SM_BACKUP_EVENTS_FLAG = 0x00000002, | | VSS_SM_BACKUP_EVENTS_FLAG = 0x00000002, |
| VSS_SM_RESTORE_EVENTS_FLAG = 0x00000004, | | VSS_SM_RESTORE_EVENTS_FLAG = 0x00000004, |
| VSS_SM_IO_THROTTLING_FLAG = 0x00000008, | | VSS_SM_IO_THROTTLING_FLAG = 0x00000008, |
| VSS_SM_ALL_FLAGS = 0xffffffff | | VSS_SM_ALL_FLAGS = 0xffffffff |
| }; | | }; |
| | |
| // enumeration of restore targets | | // enumeration of restore targets |
| typedef enum VSS_RESTORE_TARGET | | typedef enum VSS_RESTORE_TARGET |
|
| { | | { |
| VSS_RT_UNDEFINED = 0, | | VSS_RT_UNDEFINED = 0, |
| VSS_RT_ORIGINAL, | | VSS_RT_ORIGINAL, |
| VSS_RT_ALTERNATE, | | VSS_RT_ALTERNATE, |
| VSS_RT_DIRECTED, | | VSS_RT_DIRECTED, |
|
| VSS_RT_ORIGINAL_LOCATION | | VSS_RT_ORIGINAL_LOCATION |
| }; | | }; |
| | |
| // enumeration of file restore status codes | | // enumeration of file restore status codes |
| typedef enum VSS_FILE_RESTORE_STATUS | | typedef enum VSS_FILE_RESTORE_STATUS |
|
| { | | { |
| VSS_RS_UNDEFINED = 0, | | VSS_RS_UNDEFINED = 0, |
| VSS_RS_NONE, | | VSS_RS_NONE, |
| VSS_RS_ALL, | | VSS_RS_ALL, |
| VSS_RS_FAILED | | VSS_RS_FAILED |
|
| }; | | }; |
| | |
| typedef enum VSS_COMPONENT_FLAGS | | typedef enum VSS_COMPONENT_FLAGS |
|
| { | | { |
| VSS_CF_BACKUP_RECOVERY = 0x00000001, | | VSS_CF_BACKUP_RECOVERY = 0x00000001, |
| VSS_CF_APP_ROLLBACK_RECOVERY = 0x00000002, | | VSS_CF_APP_ROLLBACK_RECOVERY = 0x00000002, |
| VSS_CF_NOT_SYSTEM_STATE = 0x00000004 | | VSS_CF_NOT_SYSTEM_STATE = 0x00000004 |
| }; | | }; |
| | |
| class IVssExamineWriterMetadata; | | class IVssExamineWriterMetadata; |
| | |
| // file description | | // file description |
|
| class IVssWMFiledesc : public IUnknown | | class IVssWMFiledesc |
| { | | : public IUnknown |
| | { |
| public: | | public: |
| // get path to toplevel directory | | // get path to toplevel directory |
|
| STDMETHOD(GetPath)(OUT BSTR *pbstrPath) = 0; | | STDMETHOD(GetPath)( |
| | __out BSTR *pbstrPath |
| | ) = 0; |
| | |
| // get filespec (may include wildcards) | | // get filespec (may include wildcards) |
|
| STDMETHOD(GetFilespec)(OUT BSTR *pbstrFilespec) = 0; | | STDMETHOD(GetFilespec)( |
| | __out BSTR *pbstrFilespec |
| | ) = 0; |
| | |
| // is path a directory or root of a tree | | // is path a directory or root of a tree |
|
| STDMETHOD(GetRecursive)(OUT bool *pbRecursive) = 0; | | STDMETHOD(GetRecursive)( |
| | __out bool *pbRecursive |
| | ) = 0; |
| | |
| // alternate location for files | | // alternate location for files |
|
| STDMETHOD(GetAlternateLocation)(OUT BSTR *pbstrAlternateLocation) = 0; | | STDMETHOD(GetAlternateLocation)( |
| | __out BSTR *pbstrAlternateLocation |
| | ) = 0; |
| | |
| // backup type | | // backup type |
|
| STDMETHOD(GetBackupTypeMask)(OUT DWORD *pdwTypeMask) = 0; | | STDMETHOD(GetBackupTypeMask)( |
| }; | | __out DWORD *pdwTypeMask |
| | ) = 0; |
| | }; |
| | |
| // dependency description | | // dependency description |
|
| class IVssWMDependency : public IUnknown | | class IVssWMDependency |
| { | | : 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; |
| STDMETHOD(GetComponentName)(OUT BSTR *pbstrComponentName) = 0; | | STDMETHOD(GetComponentName)(OUT BSTR *pbstrComponentName) = 0; |
|
| }; | | }; |
| | |
| // backup components interface | | // backup components interface |
|
| class __declspec(uuid("d2c72c96-c121-4518-b627-e5a93d010ead")) IVssComponent : p | | class __declspec(uuid("d2c72c96-c121-4518-b627-e5a93d010ead")) IVssComponent |
| ublic IUnknown | | : public IUnknown |
| { | | { |
| public: | | public: |
| // obtain logical path of component | | // obtain logical path of component |
| STDMETHOD(GetLogicalPath)(OUT BSTR *pbstrPath) = 0; | | STDMETHOD(GetLogicalPath)(OUT BSTR *pbstrPath) = 0; |
| | |
| // obtain component type(VSS_CT_DATABASE or VSS_CT_FILEGROUP) | | // obtain component type(VSS_CT_DATABASE or VSS_CT_FILEGROUP) |
| STDMETHOD(GetComponentType)(VSS_COMPONENT_TYPE *pct) = 0; | | STDMETHOD(GetComponentType)(VSS_COMPONENT_TYPE *pct) = 0; |
| | |
| // get component name | | // get component name |
| STDMETHOD(GetComponentName)(OUT BSTR *pbstrName) = 0; | | STDMETHOD(GetComponentName)(OUT BSTR *pbstrName) = 0; |
| | |
| | |
| skipping to change at line 410 | | skipping to change at line 448 |
| | |
| STDMETHOD(GetDifferencedFile) | | STDMETHOD(GetDifferencedFile) |
| ( | | ( |
| IN UINT iDifferencedFile, | | IN UINT iDifferencedFile, |
| OUT BSTR *pbstrPath, | | OUT BSTR *pbstrPath, |
| OUT BSTR *pbstrFilespec, | | OUT BSTR *pbstrFilespec, |
| OUT BOOL *pbRecursive, | | OUT BOOL *pbRecursive, |
| OUT BSTR *pbstrLsnString, | | OUT BSTR *pbstrLsnString, |
| OUT FILETIME *pftLastModifyTime | | OUT FILETIME *pftLastModifyTime |
| ) = 0; | | ) = 0; |
|
| }; | | }; |
| | |
| // backup writer components interface (i.e., all components for an | | // backup writer components interface (i.e., all components for an |
| // individual writer | | // individual writer |
| class IVssWriterComponents | | class IVssWriterComponents |
|
| { | | { |
| public: | | public: |
| // get count of components | | // get count of components |
| STDMETHOD(GetComponentCount)(OUT UINT *pcComponents) = 0; | | STDMETHOD(GetComponentCount)(OUT UINT *pcComponents) = 0; |
| | |
| // get information about the writer | | // get information about the writer |
| STDMETHOD(GetWriterInfo) | | STDMETHOD(GetWriterInfo) |
| ( | | ( |
| OUT VSS_ID *pidInstance, | | OUT VSS_ID *pidInstance, |
| OUT VSS_ID *pidWriter | | OUT VSS_ID *pidWriter |
| ) = 0; | | ) = 0; |
| | |
| // obtain a specific component | | // obtain a specific component |
| STDMETHOD(GetComponent) | | STDMETHOD(GetComponent) |
| ( | | ( |
| IN UINT iComponent, | | IN UINT iComponent, |
| OUT IVssComponent **ppComponent | | OUT IVssComponent **ppComponent |
| ) = 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) |
| | |
| skipping to change at line 482 | | skipping to change at line 521 |
| __deref_out_opt BSTR* pbstrPoint | | __deref_out_opt BSTR* pbstrPoint |
| ) = 0; | | ) = 0; |
| | |
| // get the restore name | | // get the restore name |
| STDMETHOD(GetRestoreName) | | STDMETHOD(GetRestoreName) |
| ( | | ( |
| __deref_out_opt BSTR* pbstrName | | __deref_out_opt BSTR* pbstrName |
| ) = 0; | | ) = 0; |
| }; | | }; |
| | |
|
| | class __declspec(uuid("3b5be0f2-07a9-4e4b-bdd3-cfdc8e2c0d2d")) IVssComponentEx2 |
| | : public IVssComponentEx |
| | { |
| | public: |
| | STDMETHOD(SetFailure) |
| | ( |
| | __in HRESULT hr, |
| | __in HRESULT hrApplication, |
| | __in_opt LPCWSTR wszApplicationMessage, |
| | __in DWORD dwReserved |
| | ) = 0; |
| | |
| | STDMETHOD(GetFailure) |
| | ( |
| | __out HRESULT *phr, |
| | __out HRESULT *phrApplication, |
| | __out BSTR *pbstrApplicationMessage, |
| | __out DWORD *pdwReserved |
| | ) = 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) |
| ( | | ( |
| IN LPCWSTR wszPath, | | IN LPCWSTR wszPath, |
| IN LPCWSTR wszFilespec, | | IN LPCWSTR wszFilespec, |
| IN bool bRecursive, | | IN bool bRecursive, |
| IN LPCWSTR wszAlternateLocation | | IN LPCWSTR wszAlternateLocation |
| ) = 0; | | ) = 0; |
| | |
| | |
| skipping to change at line 594 | | skipping to change at line 654 |
| STDMETHOD(SetBackupSchema) | | STDMETHOD(SetBackupSchema) |
| ( | | ( |
| IN DWORD dwSchemaMask | | IN DWORD dwSchemaMask |
| ) = 0; | | ) = 0; |
| | |
| // obtain reference to actual XML document | | // obtain reference to actual XML document |
| STDMETHOD(GetDocument)(IXMLDOMDocument **pDoc) = 0; | | STDMETHOD(GetDocument)(IXMLDOMDocument **pDoc) = 0; |
| | |
| // 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 | | class __declspec(uuid("9f21981d-d469-4349-b807-39e64e4674e1")) IVssCreateWriterM |
| etadataEx : public IVssCreateWriterMetadata, | | etadataEx : public IVssCreateWriterMetadata, public IUnknown |
| | | |
| 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 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 | | virtual HRESULT Unsubscribe() = 0; |
| ( | | |
| ) = 0; | | |
| | |
|
| virtual void Uninitialize | | virtual void Uninitialize() = 0; |
| ( | | |
| ) = 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 |
| __deref_out_opt 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; |
| | |
| skipping to change at line 683 | | skipping to change at line 735 |
| // 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(HRESULT hr) = 0; | | virtual HRESULT SetWriterFailure( |
| | __in HRESULT hr |
| | ) = 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(__in VSS_ID idWriter, __in CLSID clsi | | virtual HRESULT InstallAlternateWriter( |
| d) = 0; | | __in VSS_ID idWriter, |
| | __in CLSID clsid |
| | ) = 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 |
| | virtual HRESULT SetWriterFailureEx( |
| | __in HRESULT hr, |
| | __in HRESULT hrApplication, |
| | __in LPCWSTR wszApplicationMessage |
| | ) = 0; |
| | |
| | virtual HRESULT GetSessionId( |
| | __out VSS_ID *idSession |
| | ) = 0; |
| | |
| | virtual bool IsWriterShuttingDown( |
| | ) = 0; |
| | }; |
| | |
| | class __declspec(uuid("9c772e77-b26e-427f-92dd-c996f41ea5e3")) IVssCreateExpress |
| | WriterMetadata |
| | : public IUnknown |
| | { |
| | public: |
| | // add files to exclude to metadata document |
| | STDMETHOD(AddExcludeFiles)( |
| | __in LPCWSTR wszPath, |
| | __in LPCWSTR wszFilespec, |
| | __in bool bRecursive |
| | ) = 0; |
| | |
| | // add component to metadata document |
| | STDMETHOD(AddComponent)( |
| | __in VSS_COMPONENT_TYPE ct, |
| | __in LPCWSTR wszLogicalPath, |
| | __in LPCWSTR wszComponentName, |
| | __in LPCWSTR wszCaption, |
| | __in const BYTE *pbIcon, |
| | __in UINT cbIcon, |
| | __in bool bRestoreMetadata, |
| | __in bool bNotifyOnBackupComplete, |
| | __in bool bSelectable, |
| | __in bool bSelectableForRestore = false, |
| | __in DWORD dwComponentFlags = 0 |
| | ) = 0; |
| | |
| | // add files to a FILE_GROUP component |
| | STDMETHOD(AddFilesToFileGroup)( |
| | __in LPCWSTR wszLogicalPath, |
| | __in LPCWSTR wszGroupName, |
| | __in LPCWSTR wszPath, |
| | __in LPCWSTR wszFilespec, |
| | __in bool bRecursive, |
| | __in LPCWSTR wszAlternateLocation, |
| | __in DWORD dwBackupTypeMask = (VSS_FSBT_ALL_BACKUP_REQUIRED | VSS_FSB |
| | T_ALL_SNAPSHOT_REQUIRED) |
| | ) = 0; |
| | |
| | // create a restore method |
| | STDMETHOD(SetRestoreMethod)( |
| | __in VSS_RESTOREMETHOD_ENUM method, |
| | __in LPCWSTR wszService, |
| | __in LPCWSTR wszUserProcedure, |
| | __in VSS_WRITERRESTORE_ENUM writerRestore, |
| | __in bool bRebootRequired |
| | ) = 0; |
| | |
| | // add a dependency to another writer's component |
| | STDMETHOD(AddComponentDependency)( |
| | __in LPCWSTR wszForLogicalPath, |
| | __in LPCWSTR wszForComponentName, |
| | __in VSS_ID onWriterId, |
| | __in LPCWSTR wszOnLogicalPath, |
| | __in LPCWSTR wszOnComponentName |
| | ) = 0; |
| | |
| | // Set the schema used during backup |
| | STDMETHOD(SetBackupSchema)( |
| | __in DWORD dwSchemaMask |
| | ) = 0; |
| | |
| | // save document as an XML string |
| | STDMETHOD(SaveAsXML)( |
| | __out BSTR *pbstrXML |
| | ) = 0; |
| | }; |
| | |
| | class __declspec(uuid("e33affdc-59c7-47b1-97d5-4266598f6235")) IVssExpressWriter |
| | : public IUnknown |
| | { |
| | public: |
| | STDMETHOD(CreateMetadata)( |
| | __in VSS_ID writerId, |
| | __in LPCWSTR writerName, |
| | __in VSS_USAGE_TYPE usageType, |
| | __in DWORD versionMajor, |
| | __in DWORD versionMinor, |
| | __in DWORD reserved, |
| | __out IVssCreateExpressWriterMetadata **ppMetadata |
| | ) = 0; |
| | |
| | STDMETHOD(LoadMetadata)( |
| | __in LPCWSTR metadata, |
| | __in DWORD reserved |
| | ) = 0; |
| | |
| | STDMETHOD(Register)() = 0; |
| | |
| | STDMETHOD(Unregister)( |
| | __in VSS_ID writerId |
| | ) = 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() : m_pWriterImpl(NULL) | | STDMETHODCALLTYPE CVssWriter() |
| { | | : m_pWriterImpl(NULL) |
| } | | { |
| | } |
| | |
| virtual STDMETHODCALLTYPE ~CVssWriter() | | virtual STDMETHODCALLTYPE ~CVssWriter() |
| { | | { |
| if (m_pWriterImpl != NULL) | | if (m_pWriterImpl != NULL) |
| { | | { |
| 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_APP_FRONT_END, |
| __in DWORD dwTimeoutFreeze = 60000, // Maximum milliseconds betw
een Freeze/Thaw | | __in DWORD dwTimeoutFreeze = 60000, // Maximum milliseconds betw
een Freeze/Thaw |
| __in VSS_ALTERNATE_WRITER_STATE aws = VSS_AWS_NO_ALTERNATE_WRITER, | | __in VSS_ALTERNATE_WRITER_STATE aws = VSS_AWS_NO_ALTERNATE_WRITER, |
| __in bool bIOThrottlingOnly = false, | | __in bool bIOThrottlingOnly = false, |
| __in LPCWSTR wszWriterInstanceName = NULL | | __in LPCWSTR wszWriterInstanceName = NULL |
| ) | | ) |
| | |
| skipping to change at line 1048 | | skipping to change at line 1211 |
| return true; | | return true; |
| } | | } |
| | |
| protected: | | protected: |
| | |
| IVssWriterImpl *m_pWriterImpl; | | IVssWriterImpl *m_pWriterImpl; |
| }; | | }; |
| | |
| class CVssWriterEx; | | class CVssWriterEx; |
| extern "C" { | | extern "C" { |
|
| HRESULT STDMETHODCALLTYPE CreateWriterEx(__in CVssWriterEx* pWriter, __out I | | HRESULT STDMETHODCALLTYPE CreateWriterEx( |
| VssWriterImpl** pWriterImpl); | | __in CVssWriterEx *pWriter, |
| | __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, |
| | |
| skipping to change at line 1158 | | skipping to change at line 1324 |
| __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(dwUnsubscribeTimeout, dwEventFlags); | | return m_pWriterImpl->Subscribe(dwUnsubscribeTimeout, dwEventFlags); |
| } | | } |
| }; | | }; |
| | |
|
| | class CVssWriterEx2 : public CVssWriterEx |
| | { |
| | public: |
| | |
| | HRESULT STDMETHODCALLTYPE SetWriterFailureEx( |
| | __in HRESULT hrWriter, |
| | __in HRESULT hrApplication = S_FALSE, |
| | __in LPCWSTR wszApplicationMessage = NULL |
| | ) |
| | { |
| | if (m_pWriterImpl == NULL) |
| | return E_FAIL; |
| | |
| | return m_pWriterImpl->SetWriterFailureEx(hrWriter, hrApplication, wszApp |
| | licationMessage); |
| | } |
| | |
| | HRESULT STDMETHODCALLTYPE GetSessionId( |
| | __out VSS_ID *idSession |
| | ) |
| | { |
| | if (m_pWriterImpl == NULL) |
| | return E_FAIL; |
| | |
| | return m_pWriterImpl->GetSessionId(idSession); |
| | } |
| | |
| | bool STDMETHODCALLTYPE IsWriterShuttingDown() |
| | { |
| | return m_pWriterImpl->IsWriterShuttingDown(); |
| | } |
| | }; |
| | |
| | extern "C" { |
| | HRESULT STDAPICALLTYPE CreateVssExpressWriterInternal |
| | ( |
| | __out IVssExpressWriter **ppWriter |
| | ); |
| | } |
| | |
| | inline HRESULT CreateVssExpressWriter |
| | ( |
| | __out IVssExpressWriter **ppWriter |
| | ) |
| | { |
| | return CreateVssExpressWriterInternal(ppWriter); |
| | } |
| | |
| #endif //__CVSS_WRITER_H_ | | #endif //__CVSS_WRITER_H_ |
| | |
| End of changes. 52 change blocks. |
| 123 lines changed or deleted | | 338 lines changed or added |
|