Home | History | Annotate | Download | only in include
      1 /**
      2  * This file has no copyright assigned and is placed in the Public Domain.
      3  * This file is part of the mingw-w64 runtime package.
      4  * No warranty is given; refer to the file DISCLAIMER.PD within this package.
      5  */
      6 #ifndef _INC_VSBACKUP
      7 #define _INC_VSBACKUP
      8 
      9 #include <vss.h>
     10 #include <vswriter.h>
     11 
     12 #ifdef __cplusplus
     13 extern "C" {
     14 #endif
     15 
     16 typedef struct VSS_COMPONENTINFO {
     17   VSS_COMPONENT_TYPE type;
     18   BSTR               bstrLogicalPath;
     19   BSTR               bstrComponentName;
     20   BSTR               bstrCaption;
     21   BYTE               *pbIcon;
     22   UINT               cbIcon;
     23   BOOLEAN            bRestoreMetadata;
     24   BOOLEAN            bNotifyOnBackupComplete;
     25   BOOLEAN            bSelectable;
     26   BOOLEAN            bSelectableForRestore;
     27   DWORD              dwComponentFlags;
     28   UINT               cFileCount;
     29   UINT               cDatabases;
     30   UINT               cLogFiles;
     31   UINT               cDependencies;
     32 } VSS_COMPONENTINFO, *PVSSCOMPONENTINFO;
     33 
     34 HRESULT WINAPI CreateVssBackupComponentsInternal(
     35   IVssBackupComponents **ppBackup
     36 );
     37 
     38 FORCEINLINE
     39 HRESULT WINAPI CreateVssBackupComponents(
     40   IVssBackupComponents **ppBackup
     41 ){return CreateVssBackupComponentsInternal(ppBackup);}
     42 
     43 HRESULT WINAPI CreateVssExamineWriterMetadataInternal(
     44   BSTR bstrXML,
     45   IVssExamineWriterMetadata **ppMetadata
     46 );
     47 
     48 FORCEINLINE
     49 HRESULT WINAPI CreateVssExamineWriterMetadata(
     50   BSTR bstrXML,
     51   IVssExamineWriterMetadata **ppMetadata
     52 ){return CreateVssExamineWriterMetadataInternal(bstrXML,ppMetadata);}
     53 
     54 HRESULT WINAPI IsVolumeSnapshottedInternal(
     55   VSS_PWSZ pwszVolumeName,
     56   BOOLEAN *pbSnapshotsPresent,
     57   LONG *plSnapshotCapability
     58 );
     59 
     60 FORCEINLINE
     61 HRESULT WINAPI IsVolumeSnapshotted(
     62   VSS_PWSZ pwszVolumeName,
     63   BOOLEAN *pbSnapshotsPresent,
     64   LONG *plSnapshotCapability
     65 ){return IsVolumeSnapshottedInternal(pwszVolumeName,pbSnapshotsPresent,plSnapshotCapability);}
     66 
     67 HRESULT WINAPI ShouldBlockRevertInternal(
     68   LPCWSTR wszVolumeName,
     69   BOOLEAN *pbBlock
     70 );
     71 
     72 FORCEINLINE
     73 HRESULT WINAPI ShouldBlockRevert(
     74   LPCWSTR wszVolumeName,
     75   BOOLEAN *pbBlock
     76 ){return ShouldBlockRevertInternal(wszVolumeName,pbBlock);}
     77 
     78 void WINAPI VssFreeSnapshotPropertiesInternal(
     79   VSS_SNAPSHOT_PROP *pProp
     80 );
     81 
     82 FORCEINLINE
     83 void WINAPI VssFreeSnapshotProperties(
     84   VSS_SNAPSHOT_PROP *pProp
     85 ){VssFreeSnapshotPropertiesInternal(pProp);}
     86 
     87 HRESULT WINAPI GetProviderMgmtInterfaceInternal(
     88   VSS_ID ProviderId,
     89   IID InterfaceId,
     90   IUnknown** ppItf
     91 );
     92 
     93 FORCEINLINE
     94 HRESULT WINAPI GetProviderMgmtInterface(
     95   VSS_ID ProviderId,
     96   IID InterfaceId,
     97   IUnknown** ppItf
     98 ){return GetProviderMgmtInterfaceInternal(ProviderId,InterfaceId,ppItf);}
     99 
    100 #ifdef __cplusplus
    101 }
    102 #endif
    103 
    104 #undef  INTERFACE
    105 #define INTERFACE IVssBackupComponents
    106 #ifdef __GNUC__
    107 #warning COM interfaces layout in this header has not been verified.
    108 #warning COM interfaces with incorrect layout may not work at all.
    109 __MINGW_BROKEN_INTERFACE(INTERFACE)
    110 #endif
    111 DECLARE_INTERFACE_(IVssBackupComponents,IUnknown)
    112 {
    113     BEGIN_INTERFACE
    114 
    115     /* IUnknown methods */
    116     STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppvObject) PURE;
    117     STDMETHOD_(ULONG, AddRef)(THIS) PURE;
    118     STDMETHOD_(ULONG, Release)(THIS) PURE;
    119 
    120     /* IVssBackupComponents methods */
    121     STDMETHOD_(HRESULT,GetWriterComponentsCount)(THIS_ UINT *pcComponents) PURE;
    122     STDMETHOD_(HRESULT,GetWriterComponents)(THIS_ UINT iWriter,IVssWriterComponentsExt **pWriterComponents) PURE;
    123     STDMETHOD_(HRESULT,InitializeForBackup)(THIS_ BSTR bstrXML) PURE;
    124     STDMETHOD_(HRESULT,SetBackupState)(THIS_ BOOLEAN bSelectComponents,BOOLEAN bBackupBootableSystemState,VSS_BACKUP_TYPE backupType,BOOLEAN bPartialFileSupport) PURE;
    125     STDMETHOD_(HRESULT,InitializeForRestore)(THIS_ BSTR bstrXML) PURE;
    126     STDMETHOD_(HRESULT,SetRestoreState)(THIS_ VSS_RESTORE_TYPE restoreType) PURE;
    127     STDMETHOD_(HRESULT,GatherWriterMetadata)(THIS_ IVssAsync **ppAsync) PURE;
    128     STDMETHOD_(HRESULT,GetWriterMetadataCount)(THIS_ UINT pcWriters) PURE;
    129     STDMETHOD_(HRESULT,GetWriterMetadata)(THIS_ UINT iWriter,VSS_ID *pidWriterInstance,IVssExamineWriterMetadata **ppMetadata) PURE;
    130     STDMETHOD_(HRESULT,FreeWriterMetadata)(THIS) PURE;
    131     STDMETHOD_(HRESULT,AddComponent)(THIS_ VSS_ID instanceId,VSS_ID writerId,VSS_COMPONENT_TYPE componentType,LPCWSTR wszLogicalPath,LPCWSTR wszComponentName) PURE;
    132     STDMETHOD_(HRESULT,PrepareForBackup)(THIS_ IVssAsync **ppAsync) PURE;
    133     STDMETHOD_(HRESULT,AbortBackup)(THIS) PURE;
    134     STDMETHOD_(HRESULT,GatherWriterStatus)(THIS_ IVssAsync **ppAsync) PURE;
    135     STDMETHOD_(HRESULT,FreeWriterStatus)(THIS) PURE;
    136     STDMETHOD_(HRESULT,GetWriterStatus)(THIS_ UINT iWriter,VSS_ID *pidInstance,VSS_ID *pidWriter,BSTR *pbstrWriter,VSS_WRITER_STATE *pState,HRESULT *pHrResultFailure) PURE;
    137     STDMETHOD_(HRESULT,SetBackupSucceeded)(THIS_ VSS_ID instanceId,VSS_ID writerId,VSS_COMPONENT_TYPE componentType,LPCWSTR wszLogicalPath,LPCWSTR wszComponentName,BOOLEAN bSucceeded) PURE;
    138     STDMETHOD_(HRESULT,SetBackupOptions)(THIS_ VSS_ID writerId,VSS_COMPONENT_TYPE componentType,LPCWSTR wszLogicalPath,LPCWSTR wszComponentName,LPCWSTR wszBackupOptions) PURE;
    139     STDMETHOD_(HRESULT,SetSelectedForRestore)(THIS_ VSS_ID writerId,VSS_COMPONENT_TYPE componentType,LPCWSTR wszLogicalPath,LPCWSTR wszComponentName,BOOLEAN bSelectedForRestore) PURE;
    140     STDMETHOD_(HRESULT,SetRestoreOptions)(THIS_ VSS_ID writerId,VSS_COMPONENT_TYPE componentType,LPCWSTR wszLogicalPath,LPCWSTR wszComponentName,LPCWSTR wszRestoreOptions) PURE;
    141     STDMETHOD_(HRESULT,SetAdditionalRestores)(THIS_ VSS_ID writerId,VSS_COMPONENT_TYPE componentType,LPCWSTR wszLogicalPath,LPCWSTR wszComponentName,BOOLEAN bAdditionalResources) PURE;
    142     STDMETHOD_(HRESULT,SetPreviousBackupStamp)(THIS_ VSS_ID writerId,VSS_COMPONENT_TYPE componentType,LPCWSTR wszLogicalPath,LPCWSTR wszComponentName,LPCWSTR wszPreviousBackupStamp) PURE;
    143     STDMETHOD_(HRESULT,SaveAsXML)(THIS_ BSTR *pbstrXML) PURE;
    144     STDMETHOD_(HRESULT,BackupComplete)(THIS_ IVssAsync **ppAsync) PURE;
    145     STDMETHOD_(HRESULT,AddAlternativeLocationMapping)(THIS_ VSS_ID writerId,VSS_COMPONENT_TYPE componentType,LPCWSTR wszLogicalPath,LPCWSTR wszComponentName,LPCWSTR wszPath,LPCWSTR wszFilespec,BOOLEAN bRecursive,LPCWSTR wszDestination) PURE;
    146     STDMETHOD_(HRESULT,AddRestoreSubcomponent)(THIS_ VSS_ID writerId,VSS_COMPONENT_TYPE componentType,LPCWSTR wszLogicalPath,LPCWSTR wszComponentName,LPCWSTR wszSubComponentLogicalPath,LPCWSTR wszSubComponentName,BOOLEAN bRepair) PURE;
    147     STDMETHOD_(HRESULT,SetFileRestoreStatus)(THIS_ VSS_ID writerId,VSS_COMPONENT_TYPE componentType,LPCWSTR wszLogicalPath,LPCWSTR wszComponentName,VSS_FILE_RESTORE_STATUS status) PURE;
    148     STDMETHOD_(HRESULT,AddNewTarget)(THIS_ VSS_ID writerId,VSS_COMPONENT_TYPE ct,LPCWSTR wszLogicalPath,LPCWSTR wszComponentName,LPCWSTR wszPath,LPCWSTR wszFileName,BOOLEAN bRecursive,LPCWSTR wszAlternatePath) PURE;
    149     STDMETHOD_(HRESULT,SetRangesFilePath)(THIS_ VSS_ID writerId,VSS_COMPONENT_TYPE ct,LPCWSTR wszLogicalPath,LPCWSTR wszComponentName,UINT iPartialFile,LPCWSTR wszRangesFile) PURE;
    150     STDMETHOD_(HRESULT,PreRestore)(THIS_ IVssAsync **ppAsync) PURE;
    151     STDMETHOD_(HRESULT,PostRestore)(THIS_ IVssAsync **ppAsync) PURE;
    152     STDMETHOD_(HRESULT,SetContext)(THIS_ LONG lContext) PURE;
    153     STDMETHOD_(HRESULT,StartSnapshotSet)(THIS_ VSS_ID *pSnapshotSetId) PURE;
    154     STDMETHOD_(HRESULT,AddToSnapshotSet)(THIS_ VSS_PWSZ pwszVolumeName,VSS_ID ProviderId,VSS_ID *pidSnapshot) PURE;
    155     STDMETHOD_(HRESULT,DoSnapshotSet)(THIS_ IVssAsync **ppAsync) PURE;
    156     STDMETHOD_(HRESULT,DeleteSnapshots)(THIS_ VSS_ID SourceObjectId,VSS_OBJECT_TYPE eSourceObjectType,BOOLEAN bForceDelete,LONG *plDeletedSnapshots,VSS_ID *pNondeletedSnapshotID) PURE;
    157     STDMETHOD_(HRESULT,ImportSnapshots)(THIS_ IVssAsync **ppAsync) PURE;
    158     STDMETHOD_(HRESULT,BreakSnapshotSet)(THIS_ VSS_ID SnapshotSetId) PURE;
    159     STDMETHOD_(HRESULT,GetSnapshotProperties)(THIS_ VSS_ID SnapshotId,VSS_SNAPSHOT_PROP *pProp) PURE;
    160     STDMETHOD_(HRESULT,Query)(THIS_ VSS_ID QueriedObjectId,VSS_OBJECT_TYPE eQueriedObjectType,VSS_OBJECT_TYPE eReturnedObjectsType,IVssEnumObject **ppEnum) PURE;
    161     STDMETHOD_(HRESULT,IsVolumeSupported)(THIS_ VSS_ID ProviderId,VSS_PWSZ pwszVolumeName,BOOLEAN *pbSupportedByThisProvider) PURE;
    162     STDMETHOD_(HRESULT,DisableWriterClasses)(THIS_ const VSS_ID *rgWriterClassId,UINT cClassId) PURE;
    163     STDMETHOD_(HRESULT,EnableWriterClasses)(THIS_ const VSS_ID *rgWriterClassId,UINT cClassId) PURE;
    164     STDMETHOD_(HRESULT,DisableWriterInstances)(THIS_ const VSS_ID *rgWriterInstanceId,UINT cInstanceId) PURE;
    165     STDMETHOD_(HRESULT,ExposeSnapshot)(THIS_ VSS_ID SnapshotId,VSS_PWSZ wszPathFromRoot,LONG lAttributes,VSS_PWSZ wszExpose,VSS_PWSZ *pwszExposed) PURE;
    166     STDMETHOD_(HRESULT,RevertToSnapshot)(THIS_ VSS_ID SnapshotId,BOOLEAN bForceDismount) PURE;
    167     STDMETHOD_(HRESULT,QueryRevertStatus)(THIS_ VSS_PWSZ pwszVolume,IVssAsync **ppAsync) PURE;
    168 
    169     END_INTERFACE
    170 };
    171 #ifdef COBJMACROS
    172 #define IVssBackupComponents_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
    173 #define IVssBackupComponents_AddRef(This) (This)->lpVtbl->AddRef(This)
    174 #define IVssBackupComponents_Release(This) (This)->lpVtbl->Release(This)
    175 #define IVssBackupComponents_GetWriterComponentsCount(This,pcComponents) (This)->lpVtbl->GetWriterComponentsCount(This,pcComponents)
    176 #define IVssBackupComponents_GetWriterComponents(This,iWriter,pWriterComponents) (This)->lpVtbl->GetWriterComponents(This,iWriter,pWriterComponents)
    177 #define IVssBackupComponents_InitializeForBackup(This,bstrXML) (This)->lpVtbl->InitializeForBackup(This,bstrXML)
    178 #define IVssBackupComponents_SetBackupState(This,bSelectComponents,bBackupBootableSystemState,backupType,bPartialFileSupport) (This)->lpVtbl->SetBackupState(This,bSelectComponents,bBackupBootableSystemState,backupType,bPartialFileSupport)
    179 #define IVssBackupComponents_InitializeForRestore(This,bstrXML) (This)->lpVtbl->InitializeForRestore(This,bstrXML)
    180 #define IVssBackupComponents_SetRestoreState(This,restoreType) (This)->lpVtbl->SetRestoreState(This,restoreType)
    181 #define IVssBackupComponents_GatherWriterMetadata(This,ppAsync) (This)->lpVtbl->GatherWriterMetadata(This,ppAsync)
    182 #define IVssBackupComponents_GetWriterMetadataCount(This,pcWriters) (This)->lpVtbl->GetWriterMetadataCount(This,pcWriters)
    183 #define IVssBackupComponents_GetWriterMetadata(This,iWriter,pidWriterInstance,ppMetadata) (This)->lpVtbl->GetWriterMetadata(This,iWriter,pidWriterInstance,ppMetadata)
    184 #define IVssBackupComponents_FreeWriterMetadata() (This)->lpVtbl->FreeWriterMetadata(This)
    185 #define IVssBackupComponents_AddComponent(This,instanceId,writerId,componentType,wszLogicalPath,wszComponentName) (This)->lpVtbl->AddComponent(This,instanceId,writerId,componentType,wszLogicalPath,wszComponentName)
    186 #define IVssBackupComponents_PrepareForBackup(This,ppAsync) (This)->lpVtbl->PrepareForBackup(This,ppAsync)
    187 #define IVssBackupComponents_AbortBackup() (This)->lpVtbl->AbortBackup(This)
    188 #define IVssBackupComponents_GatherWriterStatus(This,ppAsync) (This)->lpVtbl->GatherWriterStatus(This,ppAsync)
    189 #define IVssBackupComponents_FreeWriterStatus() (This)->lpVtbl->FreeWriterStatus(This)
    190 #define IVssBackupComponents_GetWriterStatus(This,iWriter,pidInstance,pidWriter,pbstrWriter,pState,pHrResultFailure) (This)->lpVtbl->GetWriterStatus(This,iWriter,pidInstance,pidWriter,pbstrWriter,pState,pHrResultFailure)
    191 #define IVssBackupComponents_SetBackupSucceeded(This,instanceId,writerId,componentType,wszLogicalPath,wszComponentName,bSucceeded) (This)->lpVtbl->SetBackupSucceeded(This,instanceId,writerId,componentType,wszLogicalPath,wszComponentName,bSucceeded)
    192 #define IVssBackupComponents_SetBackupOptions(This,writerId,componentType,wszLogicalPath,wszComponentName,wszBackupOptions) (This)->lpVtbl->SetBackupOptions(This,writerId,componentType,wszLogicalPath,wszComponentName,wszBackupOptions)
    193 #define IVssBackupComponents_SetSelectedForRestore(This,writerId,componentType,wszLogicalPath,wszComponentName,bSelectedForRestore) (This)->lpVtbl->SetSelectedForRestore(This,writerId,componentType,wszLogicalPath,wszComponentName,bSelectedForRestore)
    194 #define IVssBackupComponents_SetRestoreOptions(This,writerId,componentType,wszLogicalPath,wszComponentName,wszRestoreOptions) (This)->lpVtbl->SetRestoreOptions(This,writerId,componentType,wszLogicalPath,wszComponentName,wszRestoreOptions)
    195 #define IVssBackupComponents_SetAdditionalRestores(This,writerId,componentType,wszLogicalPath,wszComponentName,bAdditionalResources) (This)->lpVtbl->SetAdditionalRestores(This,writerId,componentType,wszLogicalPath,wszComponentName,bAdditionalResources)
    196 #define IVssBackupComponents_SetPreviousBackupStamp(This,writerId,componentType,wszLogicalPath,wszComponentName,wszPreviousBackupStamp) (This)->lpVtbl->SetPreviousBackupStamp(This,writerId,componentType,wszLogicalPath,wszComponentName,wszPreviousBackupStamp)
    197 #define IVssBackupComponents_SaveAsXML(This,pbstrXML) (This)->lpVtbl->SaveAsXML(This,pbstrXML)
    198 #define IVssBackupComponents_BackupComplete(This,ppAsync) (This)->lpVtbl->BackupComplete(This,ppAsync)
    199 #define IVssBackupComponents_AddAlternativeLocationMapping(This,writerId,componentType,wszLogicalPath,wszComponentName,wszPath,wszFilespec,bRecursive,wszDestination) (This)->lpVtbl->AddAlternativeLocationMapping(This,writerId,componentType,wszLogicalPath,wszComponentName,wszPath,wszFilespec,bRecursive,wszDestination)
    200 #define IVssBackupComponents_AddRestoreSubcomponent(This,writerId,componentType,wszLogicalPath,wszComponentName,wszSubComponentLogicalPath,wszSubComponentName,bRepair) (This)->lpVtbl->AddRestoreSubcomponent(This,writerId,componentType,wszLogicalPath,wszComponentName,wszSubComponentLogicalPath,wszSubComponentName,bRepair)
    201 #define IVssBackupComponents_SetFileRestoreStatus(This,writerId,componentType,wszLogicalPath,wszComponentName,status) (This)->lpVtbl->SetFileRestoreStatus(This,writerId,componentType,wszLogicalPath,wszComponentName,status)
    202 #define IVssBackupComponents_AddNewTarget(This,writerId,ct,wszLogicalPath,wszComponentName,wszPath,wszFileName,bRecursive,wszAlternatePath) (This)->lpVtbl->AddNewTarget(This,writerId,ct,wszLogicalPath,wszComponentName,wszPath,wszFileName,bRecursive,wszAlternatePath)
    203 #define IVssBackupComponents_SetRangesFilePath(This,writerId,ct,wszLogicalPath,wszComponentName,iPartialFile,wszRangesFile) (This)->lpVtbl->SetRangesFilePath(This,writerId,ct,wszLogicalPath,wszComponentName,iPartialFile,wszRangesFile)
    204 #define IVssBackupComponents_PreRestore(This,ppAsync) (This)->lpVtbl->PreRestore(This,ppAsync)
    205 #define IVssBackupComponents_PostRestore(This,ppAsync) (This)->lpVtbl->PostRestore(This,ppAsync)
    206 #define IVssBackupComponents_SetContext(This,lContext) (This)->lpVtbl->SetContext(This,lContext)
    207 #define IVssBackupComponents_StartSnapshotSet(This,pSnapshotSetId) (This)->lpVtbl->StartSnapshotSet(This,pSnapshotSetId)
    208 #define IVssBackupComponents_AddToSnapshotSet(This,pwszVolumeName,ProviderId,pidSnapshot) (This)->lpVtbl->AddToSnapshotSet(This,pwszVolumeName,ProviderId,pidSnapshot)
    209 #define IVssBackupComponents_DoSnapshotSet(This,ppAsync) (This)->lpVtbl->DoSnapshotSet(This,ppAsync)
    210 #define IVssBackupComponents_DeleteSnapshots(This,SourceObjectId,eSourceObjectType,bForceDelete,plDeletedSnapshots,pNondeletedSnapshotID) (This)->lpVtbl->DeleteSnapshots(This,SourceObjectId,eSourceObjectType,bForceDelete,plDeletedSnapshots,pNondeletedSnapshotID)
    211 #define IVssBackupComponents_ImportSnapshots(This,ppAsync) (This)->lpVtbl->ImportSnapshots(This,ppAsync)
    212 #define IVssBackupComponents_BreakSnapshotSet(This,SnapshotSetId) (This)->lpVtbl->BreakSnapshotSet(This,SnapshotSetId)
    213 #define IVssBackupComponents_GetSnapshotProperties(This,SnapshotId,pProp) (This)->lpVtbl->GetSnapshotProperties(This,SnapshotId,pProp)
    214 #define IVssBackupComponents_Query(This,QueriedObjectId,eQueriedObjectType,eReturnedObjectsType,ppEnum) (This)->lpVtbl->Query(This,QueriedObjectId,eQueriedObjectType,eReturnedObjectsType,ppEnum)
    215 #define IVssBackupComponents_IsVolumeSupported(This,ProviderId,pwszVolumeName,pbSupportedByThisProvider) (This)->lpVtbl->IsVolumeSupported(This,ProviderId,pwszVolumeName,pbSupportedByThisProvider)
    216 #define IVssBackupComponents_DisableWriterClasses(This,rgWriterClassId,cClassId) (This)->lpVtbl->DisableWriterClasses(This,rgWriterClassId,cClassId)
    217 #define IVssBackupComponents_EnableWriterClasses(This,rgWriterClassId,cClassId) (This)->lpVtbl->EnableWriterClasses(This,rgWriterClassId,cClassId)
    218 #define IVssBackupComponents_DisableWriterInstances(This,rgWriterInstanceId,cInstanceId) (This)->lpVtbl->DisableWriterInstances(This,rgWriterInstanceId,cInstanceId)
    219 #define IVssBackupComponents_ExposeSnapshot(This,SnapshotId,wszPathFromRoot,lAttributes,wszExpose,pwszExposed) (This)->lpVtbl->ExposeSnapshot(This,SnapshotId,wszPathFromRoot,lAttributes,wszExpose,pwszExposed)
    220 #define IVssBackupComponents_RevertToSnapshot(This,SnapshotId,bForceDismount) (This)->lpVtbl->RevertToSnapshot(This,SnapshotId,bForceDismount)
    221 #define IVssBackupComponents_QueryRevertStatus(This,pwszVolume,ppAsync) (This)->lpVtbl->QueryRevertStatus(This,pwszVolume,ppAsync)
    222 #endif /*COBJMACROS*/
    223 
    224 #if (_WIN32_WINNT >= 0x0600)
    225 #undef  INTERFACE
    226 #define INTERFACE IVssBackupComponentsEx
    227 #ifdef __GNUC__
    228 #warning COM interfaces layout in this header has not been verified.
    229 #warning COM interfaces with incorrect layout may not work at all.
    230 __MINGW_BROKEN_INTERFACE(INTERFACE)
    231 #endif
    232 DECLARE_INTERFACE_(IVssBackupComponentsEx,IVssBackupComponents)
    233 {
    234     BEGIN_INTERFACE
    235 
    236     /* IUnknown methods */
    237     STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppvObject) PURE;
    238     STDMETHOD_(ULONG, AddRef)(THIS) PURE;
    239     STDMETHOD_(ULONG, Release)(THIS) PURE;
    240 
    241     /* IVssBackupComponents methods */
    242     STDMETHOD_(HRESULT,GetWriterComponentsCount)(THIS_ UINT *pcComponents) PURE;
    243     STDMETHOD_(HRESULT,GetWriterComponents)(THIS_ UINT iWriter,IVssWriterComponentsExt **pWriterComponents) PURE;
    244     STDMETHOD_(HRESULT,InitializeForBackup)(THIS_ BSTR bstrXML) PURE;
    245     STDMETHOD_(HRESULT,SetBackupState)(THIS_ BOOLEAN bSelectComponents,BOOLEAN bBackupBootableSystemState,VSS_BACKUP_TYPE backupType,BOOLEAN bPartialFileSupport) PURE;
    246     STDMETHOD_(HRESULT,InitializeForRestore)(THIS_ BSTR bstrXML) PURE;
    247     STDMETHOD_(HRESULT,SetRestoreState)(THIS_ VSS_RESTORE_TYPE restoreType) PURE;
    248     STDMETHOD_(HRESULT,GatherWriterMetadata)(THIS_ IVssAsync **ppAsync) PURE;
    249     STDMETHOD_(HRESULT,GetWriterMetadataCount)(THIS_ UINT pcWriters) PURE;
    250     STDMETHOD_(HRESULT,GetWriterMetadata)(THIS_ UINT iWriter,VSS_ID *pidWriterInstance,IVssExamineWriterMetadata **ppMetadata) PURE;
    251     STDMETHOD_(HRESULT,FreeWriterMetadata)(THIS) PURE;
    252     STDMETHOD_(HRESULT,AddComponent)(THIS_ VSS_ID instanceId,VSS_ID writerId,VSS_COMPONENT_TYPE componentType,LPCWSTR wszLogicalPath,LPCWSTR wszComponentName) PURE;
    253     STDMETHOD_(HRESULT,PrepareForBackup)(THIS_ IVssAsync **ppAsync) PURE;
    254     STDMETHOD_(HRESULT,AbortBackup)(THIS) PURE;
    255     STDMETHOD_(HRESULT,GatherWriterStatus)(THIS_ IVssAsync **ppAsync) PURE;
    256     STDMETHOD_(HRESULT,FreeWriterStatus)(THIS) PURE;
    257     STDMETHOD_(HRESULT,GetWriterStatus)(THIS_ UINT iWriter,VSS_ID *pidInstance,VSS_ID *pidWriter,BSTR *pbstrWriter,VSS_WRITER_STATE *pState,HRESULT *pHrResultFailure) PURE;
    258     STDMETHOD_(HRESULT,SetBackupSucceeded)(THIS_ VSS_ID instanceId,VSS_ID writerId,VSS_COMPONENT_TYPE componentType,LPCWSTR wszLogicalPath,LPCWSTR wszComponentName,BOOLEAN bSucceeded) PURE;
    259     STDMETHOD_(HRESULT,SetBackupOptions)(THIS_ VSS_ID writerId,VSS_COMPONENT_TYPE componentType,LPCWSTR wszLogicalPath,LPCWSTR wszComponentName,LPCWSTR wszBackupOptions) PURE;
    260     STDMETHOD_(HRESULT,SetSelectedForRestore)(THIS_ VSS_ID writerId,VSS_COMPONENT_TYPE componentType,LPCWSTR wszLogicalPath,LPCWSTR wszComponentName,BOOLEAN bSelectedForRestore) PURE;
    261     STDMETHOD_(HRESULT,SetRestoreOptions)(THIS_ VSS_ID writerId,VSS_COMPONENT_TYPE componentType,LPCWSTR wszLogicalPath,LPCWSTR wszComponentName,LPCWSTR wszRestoreOptions) PURE;
    262     STDMETHOD_(HRESULT,SetAdditionalRestores)(THIS_ VSS_ID writerId,VSS_COMPONENT_TYPE componentType,LPCWSTR wszLogicalPath,LPCWSTR wszComponentName,BOOLEAN bAdditionalResources) PURE;
    263     STDMETHOD_(HRESULT,SetPreviousBackupStamp)(THIS_ VSS_ID writerId,VSS_COMPONENT_TYPE componentType,LPCWSTR wszLogicalPath,LPCWSTR wszComponentName,LPCWSTR wszPreviousBackupStamp) PURE;
    264     STDMETHOD_(HRESULT,SaveAsXML)(THIS_ BSTR *pbstrXML) PURE;
    265     STDMETHOD_(HRESULT,BackupComplete)(THIS_ IVssAsync **ppAsync) PURE;
    266     STDMETHOD_(HRESULT,AddAlternativeLocationMapping)(THIS_ VSS_ID writerId,VSS_COMPONENT_TYPE componentType,LPCWSTR wszLogicalPath,LPCWSTR wszComponentName,LPCWSTR wszPath,LPCWSTR wszFilespec,BOOLEAN bRecursive,LPCWSTR wszDestination) PURE;
    267     STDMETHOD_(HRESULT,AddRestoreSubcomponent)(THIS_ VSS_ID writerId,VSS_COMPONENT_TYPE componentType,LPCWSTR wszLogicalPath,LPCWSTR wszComponentName,LPCWSTR wszSubComponentLogicalPath,LPCWSTR wszSubComponentName,BOOLEAN bRepair) PURE;
    268     STDMETHOD_(HRESULT,SetFileRestoreStatus)(THIS_ VSS_ID writerId,VSS_COMPONENT_TYPE componentType,LPCWSTR wszLogicalPath,LPCWSTR wszComponentName,VSS_FILE_RESTORE_STATUS status) PURE;
    269     STDMETHOD_(HRESULT,AddNewTarget)(THIS_ VSS_ID writerId,VSS_COMPONENT_TYPE ct,LPCWSTR wszLogicalPath,LPCWSTR wszComponentName,LPCWSTR wszPath,LPCWSTR wszFileName,BOOLEAN bRecursive,LPCWSTR wszAlternatePath) PURE;
    270     STDMETHOD_(HRESULT,SetRangesFilePath)(THIS_ VSS_ID writerId,VSS_COMPONENT_TYPE ct,LPCWSTR wszLogicalPath,LPCWSTR wszComponentName,UINT iPartialFile,LPCWSTR wszRangesFile) PURE;
    271     STDMETHOD_(HRESULT,PreRestore)(THIS_ IVssAsync **ppAsync) PURE;
    272     STDMETHOD_(HRESULT,PostRestore)(THIS_ IVssAsync **ppAsync) PURE;
    273     STDMETHOD_(HRESULT,SetContext)(THIS_ LONG lContext) PURE;
    274     STDMETHOD_(HRESULT,StartSnapshotSet)(THIS_ VSS_ID *pSnapshotSetId) PURE;
    275     STDMETHOD_(HRESULT,AddToSnapshotSet)(THIS_ VSS_PWSZ pwszVolumeName,VSS_ID ProviderId,VSS_ID *pidSnapshot) PURE;
    276     STDMETHOD_(HRESULT,DoSnapshotSet)(THIS_ IVssAsync **ppAsync) PURE;
    277     STDMETHOD_(HRESULT,DeleteSnapshots)(THIS_ VSS_ID SourceObjectId,VSS_OBJECT_TYPE eSourceObjectType,BOOLEAN bForceDelete,LONG *plDeletedSnapshots,VSS_ID *pNondeletedSnapshotID) PURE;
    278     STDMETHOD_(HRESULT,ImportSnapshots)(THIS_ IVssAsync **ppAsync) PURE;
    279     STDMETHOD_(HRESULT,BreakSnapshotSet)(THIS_ VSS_ID SnapshotSetId) PURE;
    280     STDMETHOD_(HRESULT,GetSnapshotProperties)(THIS_ VSS_ID SnapshotId,VSS_SNAPSHOT_PROP *pProp) PURE;
    281     STDMETHOD_(HRESULT,Query)(THIS_ VSS_ID QueriedObjectId,VSS_OBJECT_TYPE eQueriedObjectType,VSS_OBJECT_TYPE eReturnedObjectsType,IVssEnumObject **ppEnum) PURE;
    282     STDMETHOD_(HRESULT,IsVolumeSupported)(THIS_ VSS_ID ProviderId,VSS_PWSZ pwszVolumeName,BOOLEAN *pbSupportedByThisProvider) PURE;
    283     STDMETHOD_(HRESULT,DisableWriterClasses)(THIS_ const VSS_ID *rgWriterClassId,UINT cClassId) PURE;
    284     STDMETHOD_(HRESULT,EnableWriterClasses)(THIS_ const VSS_ID *rgWriterClassId,UINT cClassId) PURE;
    285     STDMETHOD_(HRESULT,DisableWriterInstances)(THIS_ const VSS_ID *rgWriterInstanceId,UINT cInstanceId) PURE;
    286     STDMETHOD_(HRESULT,ExposeSnapshot)(THIS_ VSS_ID SnapshotId,VSS_PWSZ wszPathFromRoot,LONG lAttributes,VSS_PWSZ wszExpose,VSS_PWSZ *pwszExposed) PURE;
    287     STDMETHOD_(HRESULT,RevertToSnapshot)(THIS_ VSS_ID SnapshotId,BOOLEAN bForceDismount) PURE;
    288     STDMETHOD_(HRESULT,QueryRevertStatus)(THIS_ VSS_PWSZ pwszVolume,IVssAsync **ppAsync) PURE;
    289 
    290     /* IVssBackupComponentsEx methods */
    291     STDMETHOD_(HRESULT,GetWriterMetadataEx)(THIS_ UINT iWriter,VSS_ID *pidInstance,IVssExamineWriterMetadataEx **ppMetadata) PURE;
    292     STDMETHOD_(HRESULT,SetSelectedForRestoreEx)(THIS_ VSS_ID writerId,VSS_COMPONENT_TYPE ct,LPCWSTR wszLogicalPath,LPCWSTR wszComponentName,BOOLEAN bSelectedForRestore,VSS_ID instanceId) PURE;
    293 
    294     END_INTERFACE
    295 };
    296 #ifdef COBJMACROS
    297 #define IVssBackupComponentsEx_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
    298 #define IVssBackupComponentsEx_AddRef(This) (This)->lpVtbl->AddRef(This)
    299 #define IVssBackupComponentsEx_Release(This) (This)->lpVtbl->Release(This)
    300 #define IVssBackupComponentsEx_GetWriterComponentsCount(This,pcComponents) (This)->lpVtbl->GetWriterComponentsCount(This,pcComponents)
    301 #define IVssBackupComponentsEx_GetWriterComponents(This,iWriter,pWriterComponents) (This)->lpVtbl->GetWriterComponents(This,iWriter,pWriterComponents)
    302 #define IVssBackupComponentsEx_InitializeForBackup(This,bstrXML) (This)->lpVtbl->InitializeForBackup(This,bstrXML)
    303 #define IVssBackupComponentsEx_SetBackupState(This,bSelectComponents,bBackupBootableSystemState,backupType,bPartialFileSupport) (This)->lpVtbl->SetBackupState(This,bSelectComponents,bBackupBootableSystemState,backupType,bPartialFileSupport)
    304 #define IVssBackupComponentsEx_InitializeForRestore(This,bstrXML) (This)->lpVtbl->InitializeForRestore(This,bstrXML)
    305 #define IVssBackupComponentsEx_SetRestoreState(This,restoreType) (This)->lpVtbl->SetRestoreState(This,restoreType)
    306 #define IVssBackupComponentsEx_GatherWriterMetadata(This,ppAsync) (This)->lpVtbl->GatherWriterMetadata(This,ppAsync)
    307 #define IVssBackupComponentsEx_GetWriterMetadataCount(This,pcWriters) (This)->lpVtbl->GetWriterMetadataCount(This,pcWriters)
    308 #define IVssBackupComponentsEx_GetWriterMetadata(This,iWriter,pidWriterInstance,ppMetadata) (This)->lpVtbl->GetWriterMetadata(This,iWriter,pidWriterInstance,ppMetadata)
    309 #define IVssBackupComponentsEx_FreeWriterMetadata() (This)->lpVtbl->FreeWriterMetadata(This)
    310 #define IVssBackupComponentsEx_AddComponent(This,instanceId,writerId,componentType,wszLogicalPath,wszComponentName) (This)->lpVtbl->AddComponent(This,instanceId,writerId,componentType,wszLogicalPath,wszComponentName)
    311 #define IVssBackupComponentsEx_PrepareForBackup(This,ppAsync) (This)->lpVtbl->PrepareForBackup(This,ppAsync)
    312 #define IVssBackupComponentsEx_AbortBackup() (This)->lpVtbl->AbortBackup(This)
    313 #define IVssBackupComponentsEx_GatherWriterStatus(This,ppAsync) (This)->lpVtbl->GatherWriterStatus(This,ppAsync)
    314 #define IVssBackupComponentsEx_FreeWriterStatus() (This)->lpVtbl->FreeWriterStatus(This)
    315 #define IVssBackupComponentsEx_GetWriterStatus(This,iWriter,pidInstance,pidWriter,pbstrWriter,pState,pHrResultFailure) (This)->lpVtbl->GetWriterStatus(This,iWriter,pidInstance,pidWriter,pbstrWriter,pState,pHrResultFailure)
    316 #define IVssBackupComponentsEx_SetBackupSucceeded(This,instanceId,writerId,componentType,wszLogicalPath,wszComponentName,bSucceeded) (This)->lpVtbl->SetBackupSucceeded(This,instanceId,writerId,componentType,wszLogicalPath,wszComponentName,bSucceeded)
    317 #define IVssBackupComponentsEx_SetBackupOptions(This,writerId,componentType,wszLogicalPath,wszComponentName,wszBackupOptions) (This)->lpVtbl->SetBackupOptions(This,writerId,componentType,wszLogicalPath,wszComponentName,wszBackupOptions)
    318 #define IVssBackupComponentsEx_SetSelectedForRestore(This,writerId,componentType,wszLogicalPath,wszComponentName,bSelectedForRestore) (This)->lpVtbl->SetSelectedForRestore(This,writerId,componentType,wszLogicalPath,wszComponentName,bSelectedForRestore)
    319 #define IVssBackupComponentsEx_SetRestoreOptions(This,writerId,componentType,wszLogicalPath,wszComponentName,wszRestoreOptions) (This)->lpVtbl->SetRestoreOptions(This,writerId,componentType,wszLogicalPath,wszComponentName,wszRestoreOptions)
    320 #define IVssBackupComponentsEx_SetAdditionalRestores(This,writerId,componentType,wszLogicalPath,wszComponentName,bAdditionalResources) (This)->lpVtbl->SetAdditionalRestores(This,writerId,componentType,wszLogicalPath,wszComponentName,bAdditionalResources)
    321 #define IVssBackupComponentsEx_SetPreviousBackupStamp(This,writerId,componentType,wszLogicalPath,wszComponentName,wszPreviousBackupStamp) (This)->lpVtbl->SetPreviousBackupStamp(This,writerId,componentType,wszLogicalPath,wszComponentName,wszPreviousBackupStamp)
    322 #define IVssBackupComponentsEx_SaveAsXML(This,pbstrXML) (This)->lpVtbl->SaveAsXML(This,pbstrXML)
    323 #define IVssBackupComponentsEx_BackupComplete(This,ppAsync) (This)->lpVtbl->BackupComplete(This,ppAsync)
    324 #define IVssBackupComponentsEx_AddAlternativeLocationMapping(This,writerId,componentType,wszLogicalPath,wszComponentName,wszPath,wszFilespec,bRecursive,wszDestination) (This)->lpVtbl->AddAlternativeLocationMapping(This,writerId,componentType,wszLogicalPath,wszComponentName,wszPath,wszFilespec,bRecursive,wszDestination)
    325 #define IVssBackupComponentsEx_AddRestoreSubcomponent(This,writerId,componentType,wszLogicalPath,wszComponentName,wszSubComponentLogicalPath,wszSubComponentName,bRepair) (This)->lpVtbl->AddRestoreSubcomponent(This,writerId,componentType,wszLogicalPath,wszComponentName,wszSubComponentLogicalPath,wszSubComponentName,bRepair)
    326 #define IVssBackupComponentsEx_SetFileRestoreStatus(This,writerId,componentType,wszLogicalPath,wszComponentName,status) (This)->lpVtbl->SetFileRestoreStatus(This,writerId,componentType,wszLogicalPath,wszComponentName,status)
    327 #define IVssBackupComponentsEx_AddNewTarget(This,writerId,ct,wszLogicalPath,wszComponentName,wszPath,wszFileName,bRecursive,wszAlternatePath) (This)->lpVtbl->AddNewTarget(This,writerId,ct,wszLogicalPath,wszComponentName,wszPath,wszFileName,bRecursive,wszAlternatePath)
    328 #define IVssBackupComponentsEx_SetRangesFilePath(This,writerId,ct,wszLogicalPath,wszComponentName,iPartialFile,wszRangesFile) (This)->lpVtbl->SetRangesFilePath(This,writerId,ct,wszLogicalPath,wszComponentName,iPartialFile,wszRangesFile)
    329 #define IVssBackupComponentsEx_PreRestore(This,ppAsync) (This)->lpVtbl->PreRestore(This,ppAsync)
    330 #define IVssBackupComponentsEx_PostRestore(This,ppAsync) (This)->lpVtbl->PostRestore(This,ppAsync)
    331 #define IVssBackupComponentsEx_SetContext(This,lContext) (This)->lpVtbl->SetContext(This,lContext)
    332 #define IVssBackupComponentsEx_StartSnapshotSet(This,pSnapshotSetId) (This)->lpVtbl->StartSnapshotSet(This,pSnapshotSetId)
    333 #define IVssBackupComponentsEx_AddToSnapshotSet(This,pwszVolumeName,ProviderId,pidSnapshot) (This)->lpVtbl->AddToSnapshotSet(This,pwszVolumeName,ProviderId,pidSnapshot)
    334 #define IVssBackupComponentsEx_DoSnapshotSet(This,ppAsync) (This)->lpVtbl->DoSnapshotSet(This,ppAsync)
    335 #define IVssBackupComponentsEx_DeleteSnapshots(This,SourceObjectId,eSourceObjectType,bForceDelete,plDeletedSnapshots,pNondeletedSnapshotID) (This)->lpVtbl->DeleteSnapshots(This,SourceObjectId,eSourceObjectType,bForceDelete,plDeletedSnapshots,pNondeletedSnapshotID)
    336 #define IVssBackupComponentsEx_ImportSnapshots(This,ppAsync) (This)->lpVtbl->ImportSnapshots(This,ppAsync)
    337 #define IVssBackupComponentsEx_BreakSnapshotSet(This,SnapshotSetId) (This)->lpVtbl->BreakSnapshotSet(This,SnapshotSetId)
    338 #define IVssBackupComponentsEx_GetSnapshotProperties(This,SnapshotId,pProp) (This)->lpVtbl->GetSnapshotProperties(This,SnapshotId,pProp)
    339 #define IVssBackupComponentsEx_Query(This,QueriedObjectId,eQueriedObjectType,eReturnedObjectsType,ppEnum) (This)->lpVtbl->Query(This,QueriedObjectId,eQueriedObjectType,eReturnedObjectsType,ppEnum)
    340 #define IVssBackupComponentsEx_IsVolumeSupported(This,ProviderId,pwszVolumeName,pbSupportedByThisProvider) (This)->lpVtbl->IsVolumeSupported(This,ProviderId,pwszVolumeName,pbSupportedByThisProvider)
    341 #define IVssBackupComponentsEx_DisableWriterClasses(This,rgWriterClassId,cClassId) (This)->lpVtbl->DisableWriterClasses(This,rgWriterClassId,cClassId)
    342 #define IVssBackupComponentsEx_EnableWriterClasses(This,rgWriterClassId,cClassId) (This)->lpVtbl->EnableWriterClasses(This,rgWriterClassId,cClassId)
    343 #define IVssBackupComponentsEx_DisableWriterInstances(This,rgWriterInstanceId,cInstanceId) (This)->lpVtbl->DisableWriterInstances(This,rgWriterInstanceId,cInstanceId)
    344 #define IVssBackupComponentsEx_ExposeSnapshot(This,SnapshotId,wszPathFromRoot,lAttributes,wszExpose,pwszExposed) (This)->lpVtbl->ExposeSnapshot(This,SnapshotId,wszPathFromRoot,lAttributes,wszExpose,pwszExposed)
    345 #define IVssBackupComponentsEx_RevertToSnapshot(This,SnapshotId,bForceDismount) (This)->lpVtbl->RevertToSnapshot(This,SnapshotId,bForceDismount)
    346 #define IVssBackupComponentsEx_QueryRevertStatus(This,pwszVolume,ppAsync) (This)->lpVtbl->QueryRevertStatus(This,pwszVolume,ppAsync)
    347 #define IVssBackupComponentsEx_GetWriterMetadataEx(This,iWriter,pidInstance,ppMetadata) (This)->lpVtbl->GetWriterMetadataEx(This,iWriter,pidInstance,ppMetadata)
    348 #define IVssBackupComponentsEx_SetSelectedForRestoreEx(This,writerId,ct,wszLogicalPath,wszComponentName,bSelectedForRestore,instanceId) (This)->lpVtbl->SetSelectedForRestoreEx(This,writerId,ct,wszLogicalPath,wszComponentName,bSelectedForRestore,instanceId)
    349 #endif /*COBJMACROS*/
    350 
    351 #undef  INTERFACE
    352 #define INTERFACE IVssBackupComponentsEx2
    353 #ifdef __GNUC__
    354 #warning COM interfaces layout in this header has not been verified.
    355 #warning COM interfaces with incorrect layout may not work at all.
    356 __MINGW_BROKEN_INTERFACE(INTERFACE)
    357 #endif
    358 DECLARE_INTERFACE_(IVssBackupComponentsEx2,IVssBackupComponentsEx)
    359 {
    360     BEGIN_INTERFACE
    361 
    362     /* IUnknown methods */
    363     STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppvObject) PURE;
    364     STDMETHOD_(ULONG, AddRef)(THIS) PURE;
    365     STDMETHOD_(ULONG, Release)(THIS) PURE;
    366 
    367     /* IVssBackupComponents methods */
    368     STDMETHOD_(HRESULT,GetWriterComponentsCount)(THIS_ UINT *pcComponents) PURE;
    369     STDMETHOD_(HRESULT,GetWriterComponents)(THIS_ UINT iWriter,IVssWriterComponentsExt **pWriterComponents) PURE;
    370     STDMETHOD_(HRESULT,InitializeForBackup)(THIS_ BSTR bstrXML) PURE;
    371     STDMETHOD_(HRESULT,SetBackupState)(THIS_ BOOLEAN bSelectComponents,BOOLEAN bBackupBootableSystemState,VSS_BACKUP_TYPE backupType,BOOLEAN bPartialFileSupport) PURE;
    372     STDMETHOD_(HRESULT,InitializeForRestore)(THIS_ BSTR bstrXML) PURE;
    373     STDMETHOD_(HRESULT,SetRestoreState)(THIS_ VSS_RESTORE_TYPE restoreType) PURE;
    374     STDMETHOD_(HRESULT,GatherWriterMetadata)(THIS_ IVssAsync **ppAsync) PURE;
    375     STDMETHOD_(HRESULT,GetWriterMetadataCount)(THIS_ UINT pcWriters) PURE;
    376     STDMETHOD_(HRESULT,GetWriterMetadata)(THIS_ UINT iWriter,VSS_ID *pidWriterInstance,IVssExamineWriterMetadata **ppMetadata) PURE;
    377     STDMETHOD_(HRESULT,FreeWriterMetadata)(THIS) PURE;
    378     STDMETHOD_(HRESULT,AddComponent)(THIS_ VSS_ID instanceId,VSS_ID writerId,VSS_COMPONENT_TYPE componentType,LPCWSTR wszLogicalPath,LPCWSTR wszComponentName) PURE;
    379     STDMETHOD_(HRESULT,PrepareForBackup)(THIS_ IVssAsync **ppAsync) PURE;
    380     STDMETHOD_(HRESULT,AbortBackup)(THIS) PURE;
    381     STDMETHOD_(HRESULT,GatherWriterStatus)(THIS_ IVssAsync **ppAsync) PURE;
    382     STDMETHOD_(HRESULT,FreeWriterStatus)(THIS) PURE;
    383     STDMETHOD_(HRESULT,GetWriterStatus)(THIS_ UINT iWriter,VSS_ID *pidInstance,VSS_ID *pidWriter,BSTR *pbstrWriter,VSS_WRITER_STATE *pState,HRESULT *pHrResultFailure) PURE;
    384     STDMETHOD_(HRESULT,SetBackupSucceeded)(THIS_ VSS_ID instanceId,VSS_ID writerId,VSS_COMPONENT_TYPE componentType,LPCWSTR wszLogicalPath,LPCWSTR wszComponentName,BOOLEAN bSucceeded) PURE;
    385     STDMETHOD_(HRESULT,SetBackupOptions)(THIS_ VSS_ID writerId,VSS_COMPONENT_TYPE componentType,LPCWSTR wszLogicalPath,LPCWSTR wszComponentName,LPCWSTR wszBackupOptions) PURE;
    386     STDMETHOD_(HRESULT,SetSelectedForRestore)(THIS_ VSS_ID writerId,VSS_COMPONENT_TYPE componentType,LPCWSTR wszLogicalPath,LPCWSTR wszComponentName,BOOLEAN bSelectedForRestore) PURE;
    387     STDMETHOD_(HRESULT,SetRestoreOptions)(THIS_ VSS_ID writerId,VSS_COMPONENT_TYPE componentType,LPCWSTR wszLogicalPath,LPCWSTR wszComponentName,LPCWSTR wszRestoreOptions) PURE;
    388     STDMETHOD_(HRESULT,SetAdditionalRestores)(THIS_ VSS_ID writerId,VSS_COMPONENT_TYPE componentType,LPCWSTR wszLogicalPath,LPCWSTR wszComponentName,BOOLEAN bAdditionalResources) PURE;
    389     STDMETHOD_(HRESULT,SetPreviousBackupStamp)(THIS_ VSS_ID writerId,VSS_COMPONENT_TYPE componentType,LPCWSTR wszLogicalPath,LPCWSTR wszComponentName,LPCWSTR wszPreviousBackupStamp) PURE;
    390     STDMETHOD_(HRESULT,SaveAsXML)(THIS_ BSTR *pbstrXML) PURE;
    391     STDMETHOD_(HRESULT,BackupComplete)(THIS_ IVssAsync **ppAsync) PURE;
    392     STDMETHOD_(HRESULT,AddAlternativeLocationMapping)(THIS_ VSS_ID writerId,VSS_COMPONENT_TYPE componentType,LPCWSTR wszLogicalPath,LPCWSTR wszComponentName,LPCWSTR wszPath,LPCWSTR wszFilespec,BOOLEAN bRecursive,LPCWSTR wszDestination) PURE;
    393     STDMETHOD_(HRESULT,AddRestoreSubcomponent)(THIS_ VSS_ID writerId,VSS_COMPONENT_TYPE componentType,LPCWSTR wszLogicalPath,LPCWSTR wszComponentName,LPCWSTR wszSubComponentLogicalPath,LPCWSTR wszSubComponentName,BOOLEAN bRepair) PURE;
    394     STDMETHOD_(HRESULT,SetFileRestoreStatus)(THIS_ VSS_ID writerId,VSS_COMPONENT_TYPE componentType,LPCWSTR wszLogicalPath,LPCWSTR wszComponentName,VSS_FILE_RESTORE_STATUS status) PURE;
    395     STDMETHOD_(HRESULT,AddNewTarget)(THIS_ VSS_ID writerId,VSS_COMPONENT_TYPE ct,LPCWSTR wszLogicalPath,LPCWSTR wszComponentName,LPCWSTR wszPath,LPCWSTR wszFileName,BOOLEAN bRecursive,LPCWSTR wszAlternatePath) PURE;
    396     STDMETHOD_(HRESULT,SetRangesFilePath)(THIS_ VSS_ID writerId,VSS_COMPONENT_TYPE ct,LPCWSTR wszLogicalPath,LPCWSTR wszComponentName,UINT iPartialFile,LPCWSTR wszRangesFile) PURE;
    397     STDMETHOD_(HRESULT,PreRestore)(THIS_ IVssAsync **ppAsync) PURE;
    398     STDMETHOD_(HRESULT,PostRestore)(THIS_ IVssAsync **ppAsync) PURE;
    399     STDMETHOD_(HRESULT,SetContext)(THIS_ LONG lContext) PURE;
    400     STDMETHOD_(HRESULT,StartSnapshotSet)(THIS_ VSS_ID *pSnapshotSetId) PURE;
    401     STDMETHOD_(HRESULT,AddToSnapshotSet)(THIS_ VSS_PWSZ pwszVolumeName,VSS_ID ProviderId,VSS_ID *pidSnapshot) PURE;
    402     STDMETHOD_(HRESULT,DoSnapshotSet)(THIS_ IVssAsync **ppAsync) PURE;
    403     STDMETHOD_(HRESULT,DeleteSnapshots)(THIS_ VSS_ID SourceObjectId,VSS_OBJECT_TYPE eSourceObjectType,BOOLEAN bForceDelete,LONG *plDeletedSnapshots,VSS_ID *pNondeletedSnapshotID) PURE;
    404     STDMETHOD_(HRESULT,ImportSnapshots)(THIS_ IVssAsync **ppAsync) PURE;
    405     STDMETHOD_(HRESULT,BreakSnapshotSet)(THIS_ VSS_ID SnapshotSetId) PURE;
    406     STDMETHOD_(HRESULT,GetSnapshotProperties)(THIS_ VSS_ID SnapshotId,VSS_SNAPSHOT_PROP *pProp) PURE;
    407     STDMETHOD_(HRESULT,Query)(THIS_ VSS_ID QueriedObjectId,VSS_OBJECT_TYPE eQueriedObjectType,VSS_OBJECT_TYPE eReturnedObjectsType,IVssEnumObject **ppEnum) PURE;
    408     STDMETHOD_(HRESULT,IsVolumeSupported)(THIS_ VSS_ID ProviderId,VSS_PWSZ pwszVolumeName,BOOLEAN *pbSupportedByThisProvider) PURE;
    409     STDMETHOD_(HRESULT,DisableWriterClasses)(THIS_ const VSS_ID *rgWriterClassId,UINT cClassId) PURE;
    410     STDMETHOD_(HRESULT,EnableWriterClasses)(THIS_ const VSS_ID *rgWriterClassId,UINT cClassId) PURE;
    411     STDMETHOD_(HRESULT,DisableWriterInstances)(THIS_ const VSS_ID *rgWriterInstanceId,UINT cInstanceId) PURE;
    412     STDMETHOD_(HRESULT,ExposeSnapshot)(THIS_ VSS_ID SnapshotId,VSS_PWSZ wszPathFromRoot,LONG lAttributes,VSS_PWSZ wszExpose,VSS_PWSZ *pwszExposed) PURE;
    413     STDMETHOD_(HRESULT,RevertToSnapshot)(THIS_ VSS_ID SnapshotId,BOOLEAN bForceDismount) PURE;
    414     STDMETHOD_(HRESULT,QueryRevertStatus)(THIS_ VSS_PWSZ pwszVolume,IVssAsync **ppAsync) PURE;
    415 
    416     /* IVssBackupComponentsEx methods */
    417     STDMETHOD_(HRESULT,GetWriterMetadataEx)(THIS_ UINT iWriter,VSS_ID *pidInstance,IVssExamineWriterMetadataEx **ppMetadata) PURE;
    418     STDMETHOD_(HRESULT,SetSelectedForRestoreEx)(THIS_ VSS_ID writerId,VSS_COMPONENT_TYPE ct,LPCWSTR wszLogicalPath,LPCWSTR wszComponentName,BOOLEAN bSelectedForRestore,VSS_ID instanceId) PURE;
    419 
    420     /* IVssBackupComponentsEx2 methods */
    421     STDMETHOD_(HRESULT,UnexposeSnapshot)(THIS_ VSS_ID snapshotId) PURE;
    422     STDMETHOD_(HRESULT,SetAuthoritativeRestore)(THIS_ VSS_ID writerId,VSS_COMPONENT_TYPE ct,LPCWSTR wszLogicalPath,LPCWSTR wszComponentName,BOOLEAN bAuth) PURE;
    423     STDMETHOD_(HRESULT,SetRollForward)(THIS_ VSS_ID writerId,VSS_COMPONENT_TYPE ct,LPCWSTR wszLogicalPath,LPCWSTR wszComponentName,VSS_ROLLFORWARD_TYPE rollType,LPCWSTR wszRollForwardPoint) PURE;
    424     STDMETHOD_(HRESULT,SetRestoreName)(THIS_ VSS_ID writerId,VSS_COMPONENT_TYPE ct,LPCWSTR wszLogicalPath,LPCWSTR wszComponentName,LPCWSTR wszRestoreName) PURE;
    425     STDMETHOD_(HRESULT,BreakSnapshotSetEx)(THIS_ VSS_ID SnapshotSetID,DWORD dwBreakFlags,IVssAsync **ppAsync) PURE;
    426     STDMETHOD_(HRESULT,PreFastRecovery)(THIS) PURE; /*Unsupported*/
    427     STDMETHOD_(HRESULT,FastRecovery)(THIS) PURE;    /*Unsupported*/
    428 
    429     END_INTERFACE
    430 };
    431 #ifdef COBJMACROS
    432 #define IVssBackupComponentsEx2_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
    433 #define IVssBackupComponentsEx2_AddRef(This) (This)->lpVtbl->AddRef(This)
    434 #define IVssBackupComponentsEx2_Release(This) (This)->lpVtbl->Release(This)
    435 #define IVssBackupComponentsEx2_GetWriterComponentsCount(This,pcComponents) (This)->lpVtbl->GetWriterComponentsCount(This,pcComponents)
    436 #define IVssBackupComponentsEx2_GetWriterComponents(This,iWriter,pWriterComponents) (This)->lpVtbl->GetWriterComponents(This,iWriter,pWriterComponents)
    437 #define IVssBackupComponentsEx2_InitializeForBackup(This,bstrXML) (This)->lpVtbl->InitializeForBackup(This,bstrXML)
    438 #define IVssBackupComponentsEx2_SetBackupState(This,bSelectComponents,bBackupBootableSystemState,backupType,bPartialFileSupport) (This)->lpVtbl->SetBackupState(This,bSelectComponents,bBackupBootableSystemState,backupType,bPartialFileSupport)
    439 #define IVssBackupComponentsEx2_InitializeForRestore(This,bstrXML) (This)->lpVtbl->InitializeForRestore(This,bstrXML)
    440 #define IVssBackupComponentsEx2_SetRestoreState(This,restoreType) (This)->lpVtbl->SetRestoreState(This,restoreType)
    441 #define IVssBackupComponentsEx2_GatherWriterMetadata(This,ppAsync) (This)->lpVtbl->GatherWriterMetadata(This,ppAsync)
    442 #define IVssBackupComponentsEx2_GetWriterMetadataCount(This,pcWriters) (This)->lpVtbl->GetWriterMetadataCount(This,pcWriters)
    443 #define IVssBackupComponentsEx2_GetWriterMetadata(This,iWriter,pidWriterInstance,ppMetadata) (This)->lpVtbl->GetWriterMetadata(This,iWriter,pidWriterInstance,ppMetadata)
    444 #define IVssBackupComponentsEx2_FreeWriterMetadata() (This)->lpVtbl->FreeWriterMetadata(This)
    445 #define IVssBackupComponentsEx2_AddComponent(This,instanceId,writerId,componentType,wszLogicalPath,wszComponentName) (This)->lpVtbl->AddComponent(This,instanceId,writerId,componentType,wszLogicalPath,wszComponentName)
    446 #define IVssBackupComponentsEx2_PrepareForBackup(This,ppAsync) (This)->lpVtbl->PrepareForBackup(This,ppAsync)
    447 #define IVssBackupComponentsEx2_AbortBackup() (This)->lpVtbl->AbortBackup(This)
    448 #define IVssBackupComponentsEx2_GatherWriterStatus(This,ppAsync) (This)->lpVtbl->GatherWriterStatus(This,ppAsync)
    449 #define IVssBackupComponentsEx2_FreeWriterStatus() (This)->lpVtbl->FreeWriterStatus(This)
    450 #define IVssBackupComponentsEx2_GetWriterStatus(This,iWriter,pidInstance,pidWriter,pbstrWriter,pState,pHrResultFailure) (This)->lpVtbl->GetWriterStatus(This,iWriter,pidInstance,pidWriter,pbstrWriter,pState,pHrResultFailure)
    451 #define IVssBackupComponentsEx2_SetBackupSucceeded(This,instanceId,writerId,componentType,wszLogicalPath,wszComponentName,bSucceeded) (This)->lpVtbl->SetBackupSucceeded(This,instanceId,writerId,componentType,wszLogicalPath,wszComponentName,bSucceeded)
    452 #define IVssBackupComponentsEx2_SetBackupOptions(This,writerId,componentType,wszLogicalPath,wszComponentName,wszBackupOptions) (This)->lpVtbl->SetBackupOptions(This,writerId,componentType,wszLogicalPath,wszComponentName,wszBackupOptions)
    453 #define IVssBackupComponentsEx2_SetSelectedForRestore(This,writerId,componentType,wszLogicalPath,wszComponentName,bSelectedForRestore) (This)->lpVtbl->SetSelectedForRestore(This,writerId,componentType,wszLogicalPath,wszComponentName,bSelectedForRestore)
    454 #define IVssBackupComponentsEx2_SetRestoreOptions(This,writerId,componentType,wszLogicalPath,wszComponentName,wszRestoreOptions) (This)->lpVtbl->SetRestoreOptions(This,writerId,componentType,wszLogicalPath,wszComponentName,wszRestoreOptions)
    455 #define IVssBackupComponentsEx2_SetAdditionalRestores(This,writerId,componentType,wszLogicalPath,wszComponentName,bAdditionalResources) (This)->lpVtbl->SetAdditionalRestores(This,writerId,componentType,wszLogicalPath,wszComponentName,bAdditionalResources)
    456 #define IVssBackupComponentsEx2_SetPreviousBackupStamp(This,writerId,componentType,wszLogicalPath,wszComponentName,wszPreviousBackupStamp) (This)->lpVtbl->SetPreviousBackupStamp(This,writerId,componentType,wszLogicalPath,wszComponentName,wszPreviousBackupStamp)
    457 #define IVssBackupComponentsEx2_SaveAsXML(This,pbstrXML) (This)->lpVtbl->SaveAsXML(This,pbstrXML)
    458 #define IVssBackupComponentsEx2_BackupComplete(This,ppAsync) (This)->lpVtbl->BackupComplete(This,ppAsync)
    459 #define IVssBackupComponentsEx2_AddAlternativeLocationMapping(This,writerId,componentType,wszLogicalPath,wszComponentName,wszPath,wszFilespec,bRecursive,wszDestination) (This)->lpVtbl->AddAlternativeLocationMapping(This,writerId,componentType,wszLogicalPath,wszComponentName,wszPath,wszFilespec,bRecursive,wszDestination)
    460 #define IVssBackupComponentsEx2_AddRestoreSubcomponent(This,writerId,componentType,wszLogicalPath,wszComponentName,wszSubComponentLogicalPath,wszSubComponentName,bRepair) (This)->lpVtbl->AddRestoreSubcomponent(This,writerId,componentType,wszLogicalPath,wszComponentName,wszSubComponentLogicalPath,wszSubComponentName,bRepair)
    461 #define IVssBackupComponentsEx2_SetFileRestoreStatus(This,writerId,componentType,wszLogicalPath,wszComponentName,status) (This)->lpVtbl->SetFileRestoreStatus(This,writerId,componentType,wszLogicalPath,wszComponentName,status)
    462 #define IVssBackupComponentsEx2_AddNewTarget(This,writerId,ct,wszLogicalPath,wszComponentName,wszPath,wszFileName,bRecursive,wszAlternatePath) (This)->lpVtbl->AddNewTarget(This,writerId,ct,wszLogicalPath,wszComponentName,wszPath,wszFileName,bRecursive,wszAlternatePath)
    463 #define IVssBackupComponentsEx2_SetRangesFilePath(This,writerId,ct,wszLogicalPath,wszComponentName,iPartialFile,wszRangesFile) (This)->lpVtbl->SetRangesFilePath(This,writerId,ct,wszLogicalPath,wszComponentName,iPartialFile,wszRangesFile)
    464 #define IVssBackupComponentsEx2_PreRestore(This,ppAsync) (This)->lpVtbl->PreRestore(This,ppAsync)
    465 #define IVssBackupComponentsEx2_PostRestore(This,ppAsync) (This)->lpVtbl->PostRestore(This,ppAsync)
    466 #define IVssBackupComponentsEx2_SetContext(This,lContext) (This)->lpVtbl->SetContext(This,lContext)
    467 #define IVssBackupComponentsEx2_StartSnapshotSet(This,pSnapshotSetId) (This)->lpVtbl->StartSnapshotSet(This,pSnapshotSetId)
    468 #define IVssBackupComponentsEx2_AddToSnapshotSet(This,pwszVolumeName,ProviderId,pidSnapshot) (This)->lpVtbl->AddToSnapshotSet(This,pwszVolumeName,ProviderId,pidSnapshot)
    469 #define IVssBackupComponentsEx2_DoSnapshotSet(This,ppAsync) (This)->lpVtbl->DoSnapshotSet(This,ppAsync)
    470 #define IVssBackupComponentsEx2_DeleteSnapshots(This,SourceObjectId,eSourceObjectType,bForceDelete,plDeletedSnapshots,pNondeletedSnapshotID) (This)->lpVtbl->DeleteSnapshots(This,SourceObjectId,eSourceObjectType,bForceDelete,plDeletedSnapshots,pNondeletedSnapshotID)
    471 #define IVssBackupComponentsEx2_ImportSnapshots(This,ppAsync) (This)->lpVtbl->ImportSnapshots(This,ppAsync)
    472 #define IVssBackupComponentsEx2_BreakSnapshotSet(This,SnapshotSetId) (This)->lpVtbl->BreakSnapshotSet(This,SnapshotSetId)
    473 #define IVssBackupComponentsEx2_GetSnapshotProperties(This,SnapshotId,pProp) (This)->lpVtbl->GetSnapshotProperties(This,SnapshotId,pProp)
    474 #define IVssBackupComponentsEx2_Query(This,QueriedObjectId,eQueriedObjectType,eReturnedObjectsType,ppEnum) (This)->lpVtbl->Query(This,QueriedObjectId,eQueriedObjectType,eReturnedObjectsType,ppEnum)
    475 #define IVssBackupComponentsEx2_IsVolumeSupported(This,ProviderId,pwszVolumeName,pbSupportedByThisProvider) (This)->lpVtbl->IsVolumeSupported(This,ProviderId,pwszVolumeName,pbSupportedByThisProvider)
    476 #define IVssBackupComponentsEx2_DisableWriterClasses(This,rgWriterClassId,cClassId) (This)->lpVtbl->DisableWriterClasses(This,rgWriterClassId,cClassId)
    477 #define IVssBackupComponentsEx2_EnableWriterClasses(This,rgWriterClassId,cClassId) (This)->lpVtbl->EnableWriterClasses(This,rgWriterClassId,cClassId)
    478 #define IVssBackupComponentsEx2_DisableWriterInstances(This,rgWriterInstanceId,cInstanceId) (This)->lpVtbl->DisableWriterInstances(This,rgWriterInstanceId,cInstanceId)
    479 #define IVssBackupComponentsEx2_ExposeSnapshot(This,SnapshotId,wszPathFromRoot,lAttributes,wszExpose,pwszExposed) (This)->lpVtbl->ExposeSnapshot(This,SnapshotId,wszPathFromRoot,lAttributes,wszExpose,pwszExposed)
    480 #define IVssBackupComponentsEx2_RevertToSnapshot(This,SnapshotId,bForceDismount) (This)->lpVtbl->RevertToSnapshot(This,SnapshotId,bForceDismount)
    481 #define IVssBackupComponentsEx2_QueryRevertStatus(This,pwszVolume,ppAsync) (This)->lpVtbl->QueryRevertStatus(This,pwszVolume,ppAsync)
    482 #define IVssBackupComponentsEx2_GetWriterMetadataEx(This,iWriter,pidInstance,ppMetadata) (This)->lpVtbl->GetWriterMetadataEx(This,iWriter,pidInstance,ppMetadata)
    483 #define IVssBackupComponentsEx2_SetSelectedForRestoreEx(This,writerId,ct,wszLogicalPath,wszComponentName,bSelectedForRestore,instanceId) (This)->lpVtbl->SetSelectedForRestoreEx(This,writerId,ct,wszLogicalPath,wszComponentName,bSelectedForRestore,instanceId)
    484 #define IVssBackupComponentsEx2_UnexposeSnapshot(This,snapshotId) (This)->lpVtbl->UnexposeSnapshot(This,snapshotId)
    485 #define IVssBackupComponentsEx2_SetAuthoritativeRestore(This,writerId,ct,wszLogicalPath,wszComponentName,bAuth) (This)->lpVtbl->SetAuthoritativeRestore(This,writerId,ct,wszLogicalPath,wszComponentName,bAuth)
    486 #define IVssBackupComponentsEx2_SetRollForward(This,writerId,ct,wszLogicalPath,wszComponentName,rollType,wszRollForwardPoint) (This)->lpVtbl->SetRollForward(This,writerId,ct,wszLogicalPath,wszComponentName,rollType,wszRollForwardPoint)
    487 #define IVssBackupComponentsEx2_SetRestoreName(This,writerId,ct,wszLogicalPath,wszComponentName,wszRestoreName) (This)->lpVtbl->SetRestoreName(This,writerId,ct,wszLogicalPath,wszComponentName,wszRestoreName)
    488 #define IVssBackupComponentsEx2_BreakSnapshotSetEx(This,SnapshotSetID,dwBreakFlags,ppAsync) (This)->lpVtbl->BreakSnapshotSetEx(This,SnapshotSetID,dwBreakFlags,ppAsync)
    489 #define IVssBackupComponentsEx2_PreFastRecovery() (This)->lpVtbl->PreFastRecovery(This)
    490 #define IVssBackupComponentsEx2_FastRecovery() (This)->lpVtbl->FastRecovery(This)
    491 #endif /*COBJMACROS*/
    492 #endif /*(_WIN32_WINNT >= 0x0600)*/
    493 
    494 #if (_WIN32_WINNT >= 0x0601)
    495 #undef  INTERFACE
    496 #define INTERFACE IVssBackupComponentsEx3
    497 #ifdef __GNUC__
    498 #warning COM interfaces layout in this header has not been verified.
    499 #warning COM interfaces with incorrect layout may not work at all.
    500 __MINGW_BROKEN_INTERFACE(INTERFACE)
    501 #endif
    502 DECLARE_INTERFACE_(IVssBackupComponentsEx3,IVssBackupComponentsEx2)
    503 {
    504     BEGIN_INTERFACE
    505 
    506     /* IUnknown methods */
    507     STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppvObject) PURE;
    508     STDMETHOD_(ULONG, AddRef)(THIS) PURE;
    509     STDMETHOD_(ULONG, Release)(THIS) PURE;
    510 
    511     /* IVssBackupComponents methods */
    512     STDMETHOD_(HRESULT,GetWriterComponentsCount)(THIS_ UINT *pcComponents) PURE;
    513     STDMETHOD_(HRESULT,GetWriterComponents)(THIS_ UINT iWriter,IVssWriterComponentsExt **pWriterComponents) PURE;
    514     STDMETHOD_(HRESULT,InitializeForBackup)(THIS_ BSTR bstrXML) PURE;
    515     STDMETHOD_(HRESULT,SetBackupState)(THIS_ BOOLEAN bSelectComponents,BOOLEAN bBackupBootableSystemState,VSS_BACKUP_TYPE backupType,BOOLEAN bPartialFileSupport) PURE;
    516     STDMETHOD_(HRESULT,InitializeForRestore)(THIS_ BSTR bstrXML) PURE;
    517     STDMETHOD_(HRESULT,SetRestoreState)(THIS_ VSS_RESTORE_TYPE restoreType) PURE;
    518     STDMETHOD_(HRESULT,GatherWriterMetadata)(THIS_ IVssAsync **ppAsync) PURE;
    519     STDMETHOD_(HRESULT,GetWriterMetadataCount)(THIS_ UINT pcWriters) PURE;
    520     STDMETHOD_(HRESULT,GetWriterMetadata)(THIS_ UINT iWriter,VSS_ID *pidWriterInstance,IVssExamineWriterMetadata **ppMetadata) PURE;
    521     STDMETHOD_(HRESULT,FreeWriterMetadata)(THIS) PURE;
    522     STDMETHOD_(HRESULT,AddComponent)(THIS_ VSS_ID instanceId,VSS_ID writerId,VSS_COMPONENT_TYPE componentType,LPCWSTR wszLogicalPath,LPCWSTR wszComponentName) PURE;
    523     STDMETHOD_(HRESULT,PrepareForBackup)(THIS_ IVssAsync **ppAsync) PURE;
    524     STDMETHOD_(HRESULT,AbortBackup)(THIS) PURE;
    525     STDMETHOD_(HRESULT,GatherWriterStatus)(THIS_ IVssAsync **ppAsync) PURE;
    526     STDMETHOD_(HRESULT,FreeWriterStatus)(THIS) PURE;
    527     STDMETHOD_(HRESULT,GetWriterStatus)(THIS_ UINT iWriter,VSS_ID *pidInstance,VSS_ID *pidWriter,BSTR *pbstrWriter,VSS_WRITER_STATE *pState,HRESULT *pHrResultFailure) PURE;
    528     STDMETHOD_(HRESULT,SetBackupSucceeded)(THIS_ VSS_ID instanceId,VSS_ID writerId,VSS_COMPONENT_TYPE componentType,LPCWSTR wszLogicalPath,LPCWSTR wszComponentName,BOOLEAN bSucceeded) PURE;
    529     STDMETHOD_(HRESULT,SetBackupOptions)(THIS_ VSS_ID writerId,VSS_COMPONENT_TYPE componentType,LPCWSTR wszLogicalPath,LPCWSTR wszComponentName,LPCWSTR wszBackupOptions) PURE;
    530     STDMETHOD_(HRESULT,SetSelectedForRestore)(THIS_ VSS_ID writerId,VSS_COMPONENT_TYPE componentType,LPCWSTR wszLogicalPath,LPCWSTR wszComponentName,BOOLEAN bSelectedForRestore) PURE;
    531     STDMETHOD_(HRESULT,SetRestoreOptions)(THIS_ VSS_ID writerId,VSS_COMPONENT_TYPE componentType,LPCWSTR wszLogicalPath,LPCWSTR wszComponentName,LPCWSTR wszRestoreOptions) PURE;
    532     STDMETHOD_(HRESULT,SetAdditionalRestores)(THIS_ VSS_ID writerId,VSS_COMPONENT_TYPE componentType,LPCWSTR wszLogicalPath,LPCWSTR wszComponentName,BOOLEAN bAdditionalResources) PURE;
    533     STDMETHOD_(HRESULT,SetPreviousBackupStamp)(THIS_ VSS_ID writerId,VSS_COMPONENT_TYPE componentType,LPCWSTR wszLogicalPath,LPCWSTR wszComponentName,LPCWSTR wszPreviousBackupStamp) PURE;
    534     STDMETHOD_(HRESULT,SaveAsXML)(THIS_ BSTR *pbstrXML) PURE;
    535     STDMETHOD_(HRESULT,BackupComplete)(THIS_ IVssAsync **ppAsync) PURE;
    536     STDMETHOD_(HRESULT,AddAlternativeLocationMapping)(THIS_ VSS_ID writerId,VSS_COMPONENT_TYPE componentType,LPCWSTR wszLogicalPath,LPCWSTR wszComponentName,LPCWSTR wszPath,LPCWSTR wszFilespec,BOOLEAN bRecursive,LPCWSTR wszDestination) PURE;
    537     STDMETHOD_(HRESULT,AddRestoreSubcomponent)(THIS_ VSS_ID writerId,VSS_COMPONENT_TYPE componentType,LPCWSTR wszLogicalPath,LPCWSTR wszComponentName,LPCWSTR wszSubComponentLogicalPath,LPCWSTR wszSubComponentName,BOOLEAN bRepair) PURE;
    538     STDMETHOD_(HRESULT,SetFileRestoreStatus)(THIS_ VSS_ID writerId,VSS_COMPONENT_TYPE componentType,LPCWSTR wszLogicalPath,LPCWSTR wszComponentName,VSS_FILE_RESTORE_STATUS status) PURE;
    539     STDMETHOD_(HRESULT,AddNewTarget)(THIS_ VSS_ID writerId,VSS_COMPONENT_TYPE ct,LPCWSTR wszLogicalPath,LPCWSTR wszComponentName,LPCWSTR wszPath,LPCWSTR wszFileName,BOOLEAN bRecursive,LPCWSTR wszAlternatePath) PURE;
    540     STDMETHOD_(HRESULT,SetRangesFilePath)(THIS_ VSS_ID writerId,VSS_COMPONENT_TYPE ct,LPCWSTR wszLogicalPath,LPCWSTR wszComponentName,UINT iPartialFile,LPCWSTR wszRangesFile) PURE;
    541     STDMETHOD_(HRESULT,PreRestore)(THIS_ IVssAsync **ppAsync) PURE;
    542     STDMETHOD_(HRESULT,PostRestore)(THIS_ IVssAsync **ppAsync) PURE;
    543     STDMETHOD_(HRESULT,SetContext)(THIS_ LONG lContext) PURE;
    544     STDMETHOD_(HRESULT,StartSnapshotSet)(THIS_ VSS_ID *pSnapshotSetId) PURE;
    545     STDMETHOD_(HRESULT,AddToSnapshotSet)(THIS_ VSS_PWSZ pwszVolumeName,VSS_ID ProviderId,VSS_ID *pidSnapshot) PURE;
    546     STDMETHOD_(HRESULT,DoSnapshotSet)(THIS_ IVssAsync **ppAsync) PURE;
    547     STDMETHOD_(HRESULT,DeleteSnapshots)(THIS_ VSS_ID SourceObjectId,VSS_OBJECT_TYPE eSourceObjectType,BOOLEAN bForceDelete,LONG *plDeletedSnapshots,VSS_ID *pNondeletedSnapshotID) PURE;
    548     STDMETHOD_(HRESULT,ImportSnapshots)(THIS_ IVssAsync **ppAsync) PURE;
    549     STDMETHOD_(HRESULT,BreakSnapshotSet)(THIS_ VSS_ID SnapshotSetId) PURE;
    550     STDMETHOD_(HRESULT,GetSnapshotProperties)(THIS_ VSS_ID SnapshotId,VSS_SNAPSHOT_PROP *pProp) PURE;
    551     STDMETHOD_(HRESULT,Query)(THIS_ VSS_ID QueriedObjectId,VSS_OBJECT_TYPE eQueriedObjectType,VSS_OBJECT_TYPE eReturnedObjectsType,IVssEnumObject **ppEnum) PURE;
    552     STDMETHOD_(HRESULT,IsVolumeSupported)(THIS_ VSS_ID ProviderId,VSS_PWSZ pwszVolumeName,BOOLEAN *pbSupportedByThisProvider) PURE;
    553     STDMETHOD_(HRESULT,DisableWriterClasses)(THIS_ const VSS_ID *rgWriterClassId,UINT cClassId) PURE;
    554     STDMETHOD_(HRESULT,EnableWriterClasses)(THIS_ const VSS_ID *rgWriterClassId,UINT cClassId) PURE;
    555     STDMETHOD_(HRESULT,DisableWriterInstances)(THIS_ const VSS_ID *rgWriterInstanceId,UINT cInstanceId) PURE;
    556     STDMETHOD_(HRESULT,ExposeSnapshot)(THIS_ VSS_ID SnapshotId,VSS_PWSZ wszPathFromRoot,LONG lAttributes,VSS_PWSZ wszExpose,VSS_PWSZ *pwszExposed) PURE;
    557     STDMETHOD_(HRESULT,RevertToSnapshot)(THIS_ VSS_ID SnapshotId,BOOLEAN bForceDismount) PURE;
    558     STDMETHOD_(HRESULT,QueryRevertStatus)(THIS_ VSS_PWSZ pwszVolume,IVssAsync **ppAsync) PURE;
    559 
    560     /* IVssBackupComponentsEx methods */
    561     STDMETHOD_(HRESULT,GetWriterMetadataEx)(THIS_ UINT iWriter,VSS_ID *pidInstance,IVssExamineWriterMetadataEx **ppMetadata) PURE;
    562     STDMETHOD_(HRESULT,SetSelectedForRestoreEx)(THIS_ VSS_ID writerId,VSS_COMPONENT_TYPE ct,LPCWSTR wszLogicalPath,LPCWSTR wszComponentName,BOOLEAN bSelectedForRestore,VSS_ID instanceId) PURE;
    563 
    564     /* IVssBackupComponentsEx2 methods */
    565     STDMETHOD_(HRESULT,UnexposeSnapshot)(THIS_ VSS_ID snapshotId) PURE;
    566     STDMETHOD_(HRESULT,SetAuthoritativeRestore)(THIS_ VSS_ID writerId,VSS_COMPONENT_TYPE ct,LPCWSTR wszLogicalPath,LPCWSTR wszComponentName,BOOLEAN bAuth) PURE;
    567     STDMETHOD_(HRESULT,SetRollForward)(THIS_ VSS_ID writerId,VSS_COMPONENT_TYPE ct,LPCWSTR wszLogicalPath,LPCWSTR wszComponentName,VSS_ROLLFORWARD_TYPE rollType,LPCWSTR wszRollForwardPoint) PURE;
    568     STDMETHOD_(HRESULT,SetRestoreName)(THIS_ VSS_ID writerId,VSS_COMPONENT_TYPE ct,LPCWSTR wszLogicalPath,LPCWSTR wszComponentName,LPCWSTR wszRestoreName) PURE;
    569     STDMETHOD_(HRESULT,BreakSnapshotSetEx)(THIS_ VSS_ID SnapshotSetID,DWORD dwBreakFlags,IVssAsync **ppAsync) PURE;
    570     STDMETHOD_(HRESULT,PreFastRecovery)(THIS) PURE; /*Unsupported*/
    571     STDMETHOD_(HRESULT,FastRecovery)(THIS) PURE;    /*Unsupported*/
    572 
    573     /* IVssBackupComponentsEx3 methods */
    574     STDMETHOD_(HRESULT,AddSnapshotToRecoverySet)(THIS_ VSS_ID snapshotId,DWORD dwFlags,VSS_PWSZ pwszDestinationVolume) PURE;
    575     STDMETHOD_(HRESULT,GetSessionId)(THIS_ VSS_ID *idSession) PURE;
    576     STDMETHOD_(HRESULT,GetWriterStatusEx)(THIS_ UINT iWriter,VSS_ID *pidInstance,VSS_ID *pidWriter,BSTR *pbstrWriter,VSS_WRITER_STATE *pnStatus,HRESULT *phrFailureWriter,BSTR *pbstrApplicationMessage) PURE;
    577     STDMETHOD_(HRESULT,RecoverSet)(THIS_ DWORD dwFlags,IVssAsync **ppAsync) PURE;
    578 
    579     END_INTERFACE
    580 };
    581 #ifdef COBJMACROS
    582 #define IVssBackupComponentsEx3_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
    583 #define IVssBackupComponentsEx3_AddRef(This) (This)->lpVtbl->AddRef(This)
    584 #define IVssBackupComponentsEx3_Release(This) (This)->lpVtbl->Release(This)
    585 #define IVssBackupComponentsEx3_AddSnapshotToRecoverySet(This,snapshotId,dwFlags,pwszDestinationVolume) (This)->lpVtbl->AddSnapshotToRecoverySet(This,snapshotId,dwFlags,pwszDestinationVolume)
    586 #define IVssBackupComponentsEx3_GetSessionId(This,idSession) (This)->lpVtbl->GetSessionId(This,idSession)
    587 #define IVssBackupComponentsEx3_GetWriterStatusEx(This,iWriter,pidInstance,pidWriter,pbstrWriter,pnStatus,phrFailureWriter,pbstrApplicationMessage) (This)->lpVtbl->GetWriterStatusEx(This,iWriter,pidInstance,pidWriter,pbstrWriter,pnStatus,phrFailureWriter,pbstrApplicationMessage)
    588 #define IVssBackupComponentsEx3_RecoverSet(This,dwFlags,ppAsync) (This)->lpVtbl->RecoverSet(This,dwFlags,ppAsync)
    589 #endif /*COBJMACROS*/
    590 #endif /*(_WIN32_WINNT >= 0x0601)*/
    591 
    592 #ifdef __cplusplus
    593 /* Is a C++ interface instead of a COM */
    594 #undef  INTERFACE
    595 #define INTERFACE IVssExamineWriterMetadata
    596 #ifdef __GNUC__
    597 #warning COM interfaces layout in this header has not been verified.
    598 #warning COM interfaces with incorrect layout may not work at all.
    599 __MINGW_BROKEN_INTERFACE(INTERFACE)
    600 #endif
    601 DECLARE_INTERFACE_(IVssExamineWriterMetadata,IUnknown)
    602 {
    603     BEGIN_INTERFACE
    604 
    605     /* IUnknown methods */
    606     STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppvObject) PURE;
    607     STDMETHOD_(ULONG, AddRef)(THIS) PURE;
    608     STDMETHOD_(ULONG, Release)(THIS) PURE;
    609 
    610     /* IVssExamineWriterMetadata methods */
    611     STDMETHOD_(HRESULT,GetIdentity)(THIS_ VSS_ID *pidInstance,VSS_ID *pidWriter,BSTR *pbstrWriterName,VSS_USAGE_TYPE *pUsage,VSS_SOURCE_TYPE *pSource) PURE;
    612     STDMETHOD_(HRESULT,GetFileCounts)(THIS_ UINT *pcIncludeFiles,UINT *pcExcludeFiles,UINT *pcComponents) PURE;
    613     STDMETHOD_(HRESULT,GetIncludeFile)(THIS) PURE;
    614     STDMETHOD_(HRESULT,GetExcludeFile)(THIS_ UINT iFile,IVssWMFiledesc **ppFiledesc) PURE;
    615     STDMETHOD_(HRESULT,GetComponent)(THIS_ UINT iComponent,IVssWMComponent **ppComponent) PURE;
    616     STDMETHOD_(HRESULT,GetRestoreMethod)(THIS_ VSS_RESTOREMETHOD_ENUM *pMethod,BSTR *pbstrService,BSTR *pbstrUserProcedure,VSS_WRITERRESTORE_ENUM *pwreWriterRestore,BOOLEAN *pbRebootRequired,UINT *piMappings) PURE;
    617     STDMETHOD_(HRESULT,GetAlternateLocationMapping)(THIS_ UINT iMapping,IVssWMFiledesc **ppMapping) PURE;
    618     STDMETHOD_(HRESULT,GetBackupSchema)(THIS_ DWORD *pdsSchemaMask) PURE;
    619     STDMETHOD_(HRESULT,GetDocument)(THIS) PURE;
    620     STDMETHOD_(HRESULT,SaveAsXML)(THIS_ BSTR *pbstrXML) PURE;
    621     STDMETHOD_(HRESULT,LoadFromXML)(THIS_ BSTR bstrXML) PURE;
    622 
    623     END_INTERFACE
    624 };
    625 
    626 #if (_WIN32_WINNT >= 0x0600)
    627 #undef  INTERFACE
    628 #define INTERFACE IVssExamineWriterMetadataEx
    629 #ifdef __GNUC__
    630 #warning COM interfaces layout in this header has not been verified.
    631 #warning COM interfaces with incorrect layout may not work at all.
    632 __MINGW_BROKEN_INTERFACE(INTERFACE)
    633 #endif
    634 DECLARE_INTERFACE_(IVssExamineWriterMetadataEx,IVssExamineWriterMetadata)
    635 {
    636     BEGIN_INTERFACE
    637 
    638     /* IUnknown methods */
    639     STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppvObject) PURE;
    640     STDMETHOD_(ULONG, AddRef)(THIS) PURE;
    641     STDMETHOD_(ULONG, Release)(THIS) PURE;
    642 
    643     /* IVssExamineWriterMetadata methods */
    644     STDMETHOD_(HRESULT,GetIdentity)(THIS_ VSS_ID *pidInstance,VSS_ID *pidWriter,BSTR *pbstrWriterName,VSS_USAGE_TYPE *pUsage,VSS_SOURCE_TYPE *pSource) PURE;
    645     STDMETHOD_(HRESULT,GetFileCounts)(THIS_ UINT *pcIncludeFiles,UINT *pcExcludeFiles,UINT *pcComponents) PURE;
    646     STDMETHOD_(HRESULT,GetIncludeFile)(THIS) PURE;
    647     STDMETHOD_(HRESULT,GetExcludeFile)(THIS_ UINT iFile,IVssWMFiledesc **ppFiledesc) PURE;
    648     STDMETHOD_(HRESULT,GetComponent)(THIS_ UINT iComponent,IVssWMComponent **ppComponent) PURE;
    649     STDMETHOD_(HRESULT,GetRestoreMethod)(THIS_ VSS_RESTOREMETHOD_ENUM *pMethod,BSTR *pbstrService,BSTR *pbstrUserProcedure,VSS_WRITERRESTORE_ENUM *pwreWriterRestore,BOOLEAN *pbRebootRequired,UINT *piMappings) PURE;
    650     STDMETHOD_(HRESULT,GetAlternateLocationMapping)(THIS_ UINT iMapping,IVssWMFiledesc **ppMapping) PURE;
    651     STDMETHOD_(HRESULT,GetBackupSchema)(THIS_ DWORD *pdsSchemaMask) PURE;
    652     STDMETHOD_(HRESULT,GetDocument)(THIS) PURE;
    653     STDMETHOD_(HRESULT,SaveAsXML)(THIS_ BSTR *pbstrXML) PURE;
    654     STDMETHOD_(HRESULT,LoadFromXML)(THIS_ BSTR bstrXML) PURE;
    655 
    656     /* IVssExamineWriterMetadataEx methods */
    657     STDMETHOD_(HRESULT,GetIdentityEx)(THIS_ VSS_ID *pidInstance,VSS_ID *pidWriter,BSTR *pbstrWriterName,BSTR *pbstrInstanceName,VSS_USAGE_TYPE *pUsage,VSS_SOURCE_TYPE *pSource) PURE;
    658 
    659     END_INTERFACE
    660 };
    661 
    662 #undef  INTERFACE
    663 #define INTERFACE IVssExamineWriterMetadataEx2
    664 #ifdef __GNUC__
    665 #warning COM interfaces layout in this header has not been verified.
    666 #warning COM interfaces with incorrect layout may not work at all.
    667 __MINGW_BROKEN_INTERFACE(INTERFACE)
    668 #endif
    669 DECLARE_INTERFACE_(IVssExamineWriterMetadataEx2,IVssExamineWriterMetadataEx)
    670 {
    671     BEGIN_INTERFACE
    672 
    673     /* IUnknown methods */
    674     STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppvObject) PURE;
    675     STDMETHOD_(ULONG, AddRef)(THIS) PURE;
    676     STDMETHOD_(ULONG, Release)(THIS) PURE;
    677 
    678 /* IVssExamineWriterMetadata methods */
    679     STDMETHOD_(HRESULT,GetIdentity)(THIS_ VSS_ID *pidInstance,VSS_ID *pidWriter,BSTR *pbstrWriterName,VSS_USAGE_TYPE *pUsage,VSS_SOURCE_TYPE *pSource) PURE;
    680     STDMETHOD_(HRESULT,GetFileCounts)(THIS_ UINT *pcIncludeFiles,UINT *pcExcludeFiles,UINT *pcComponents) PURE;
    681     STDMETHOD_(HRESULT,GetIncludeFile)(THIS) PURE;
    682     STDMETHOD_(HRESULT,GetExcludeFile)(THIS_ UINT iFile,IVssWMFiledesc **ppFiledesc) PURE;
    683     STDMETHOD_(HRESULT,GetComponent)(THIS_ UINT iComponent,IVssWMComponent **ppComponent) PURE;
    684     STDMETHOD_(HRESULT,GetRestoreMethod)(THIS_ VSS_RESTOREMETHOD_ENUM *pMethod,BSTR *pbstrService,BSTR *pbstrUserProcedure,VSS_WRITERRESTORE_ENUM *pwreWriterRestore,BOOLEAN *pbRebootRequired,UINT *piMappings) PURE;
    685     STDMETHOD_(HRESULT,GetAlternateLocationMapping)(THIS_ UINT iMapping,IVssWMFiledesc **ppMapping) PURE;
    686     STDMETHOD_(HRESULT,GetBackupSchema)(THIS_ DWORD *pdsSchemaMask) PURE;
    687     STDMETHOD_(HRESULT,GetDocument)(THIS) PURE;
    688     STDMETHOD_(HRESULT,SaveAsXML)(THIS_ BSTR *pbstrXML) PURE;
    689     STDMETHOD_(HRESULT,LoadFromXML)(THIS_ BSTR bstrXML) PURE;
    690 
    691     /* IVssExamineWriterMetadataEx methods */
    692     STDMETHOD_(HRESULT,GetIdentityEx)(THIS_ VSS_ID *pidInstance,VSS_ID *pidWriter,BSTR *pbstrWriterName,BSTR *pbstrInstanceName,VSS_USAGE_TYPE *pUsage,VSS_SOURCE_TYPE *pSource) PURE;
    693 
    694     /* IVssExamineWriterMetadataEx2 methods */
    695     STDMETHOD_(HRESULT,GetVersion)(THIS_ DWORD *pdwMajorVersion,DWORD *pdwMinorVersion) PURE;
    696     STDMETHOD_(HRESULT,GetExcludeFromSnapshotCount)(THIS_ UINT *pcExcludedFromSnapshot) PURE;
    697     STDMETHOD_(HRESULT,GetExcludeFromSnapshotFile)(THIS_ UINT iFile,IVssWMFiledesc **ppFiledesc) PURE;
    698 
    699     END_INTERFACE
    700 };
    701 
    702 #endif /*(_WIN32_WINNT >= 0x0600)*/
    703 
    704 #undef  INTERFACE
    705 #define INTERFACE IVssWMComponent
    706 #ifdef __GNUC__
    707 #warning COM interfaces layout in this header has not been verified.
    708 #warning COM interfaces with incorrect layout may not work at all.
    709 __MINGW_BROKEN_INTERFACE(INTERFACE)
    710 #endif
    711 DECLARE_INTERFACE_(IVssWMComponent,IUnknown)
    712 {
    713     BEGIN_INTERFACE
    714 
    715     /* IUnknown methods */
    716     STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppvObject) PURE;
    717     STDMETHOD_(ULONG, AddRef)(THIS) PURE;
    718     STDMETHOD_(ULONG, Release)(THIS) PURE;
    719 
    720     /* IVssWMComponent methods */
    721     STDMETHOD_(HRESULT,GetComponentInfo)(THIS_ PVSSCOMPONENTINFO *ppInfo) PURE;
    722     STDMETHOD_(HRESULT,FreeComponentInfo)(THIS_ VSS_COMPONENTINFO *pInfo) PURE;
    723     STDMETHOD_(HRESULT,GetFile)(THIS_ UINT iFile,IVssWMFiledesc **ppFiledesc) PURE;
    724     STDMETHOD_(HRESULT,GetDatabaseFile)(THIS_ UINT iFile,IVssWMFiledesc **ppFiledesc) PURE;
    725     STDMETHOD_(HRESULT,GetDatabaseLogFile)(THIS_ UINT iFile,IVssWMFiledesc **ppFiledesc) PURE;
    726     STDMETHOD_(HRESULT,GetDependency)(THIS_ UINT iDependency,IVssWMDependency **ppDependency) PURE;
    727 
    728     END_INTERFACE
    729 };
    730 
    731 #undef  INTERFACE
    732 #define INTERFACE IVssWriterComponentsExt
    733 DECLARE_INTERFACE_(IVssWriterComponentsExt,IUnknown)
    734 {
    735     BEGIN_INTERFACE
    736 
    737     /* IUnknown methods */
    738     STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppvObject) PURE;
    739     STDMETHOD_(ULONG, AddRef)(THIS) PURE;
    740     STDMETHOD_(ULONG, Release)(THIS) PURE;
    741 
    742     /* IVssWriterComponentsExt methods */
    743     /* No additional members */
    744 
    745     END_INTERFACE
    746 };
    747 
    748 #endif /*__cplusplus*/
    749 #endif /*_INC_VSBACKUP*/
    750