' ########################################################################################
' Microsoft Windows
' File: vsprov.inc
' Copyright (c) 2011 Jos? Roca
' Portions Copyright (c) Microsoft Corporation.
' All Rights Reserved.
' THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
' EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
' MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
' ########################################################################################
#IF NOT %DEF(PBX_vsprov_PBI)
#DEFINE PBX_vsprov_PBI
%EQUATE `VSPROV_INC = 1
' /* header files for imported files */
#INCLUDE ONCE "Legacy/COM/OAIdl.inc"
#INCLUDE ONCE "Legacy/COM/OCIdl.inc"
#INCLUDE ONCE "Legacy/System/vss.inc"
#INCLUDE ONCE "Legacy/System/vdslun.inc"
' ########################################################################################
' Interface name = IVssSoftwareSnapshotProvider
' IID = 609E123E-2C5A-44D3-8F01-0B1D9A47D1FF
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IVssSoftwareSnapshotProvider_INTERFACE_DEFINED)
 %IVssSoftwareSnapshotProvider_INTERFACE_DEFINED = 1
$IID_IVssSoftwareSnapshotProvider = GUID$("{609E123E-2C5A-44D3-8F01-0B1D9A47D1FF}")
INTERFACE IVssSoftwareSnapshotProvider $IID_IVssSoftwareSnapshotProvider
 INHERIT IUnknown
 ' =====================================================================================
 METHOD SetContext ( ' VTable offset = 12
 BYVAL lContext AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetSnapshotProperties ( ' VTable offset = 16
 BYVAL SnapshotId AS GUID
 , BYREF pProp AS VSS_SNAPSHOT_PROP
 ) AS LONG
 ' =====================================================================================
 METHOD Query ( ' VTable offset = 20
 BYVAL QueriedObjectId AS GUID
 , BYVAL eQueriedObjectType AS LONG
 , BYVAL eReturnedObjectsType AS LONG
 , BYREF ppEnum AS IVssEnumObject
 ) AS LONG
 ' =====================================================================================
 METHOD DeleteSnapshots ( ' VTable offset = 24
 BYVAL SourceObjectId AS GUID
 , BYVAL eSourceObjectType AS LONG
 , BYVAL bForceDelete AS LONG
 , BYREF plDeletedSnapshots AS LONG
 , BYREF pNondeletedSnapshotID AS GUID
 ) AS LONG
 ' =====================================================================================
 METHOD BeginPrepareSnapshot ( ' VTable offset = 28
 BYVAL SnapshotSetId AS GUID
 , BYVAL SnapshotId AS GUID
 , BYREF pwszVolumeName AS WSTRINGZ
 , BYVAL lNewContext AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD IsVolumeSupported ( ' VTable offset = 32
 BYREF pwszVolumeName AS WSTRINGZ
 , BYREF pbSupportedByThisProvider AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD IsVolumeSnapshotted ( ' VTable offset = 36
 BYREF pwszVolumeName AS WSTRINGZ
 , BYREF pbSnapshotsPresent AS LONG
 , BYREF plSnapshotCompatibility AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD SetSnapshotProperty ( ' VTable offset = 40
 BYVAL SnapshotId AS GUID
 , BYVAL eSnapshotPropertyId AS LONG
 , BYVAL vProperty AS VARIANT
 ) AS LONG
 ' =====================================================================================
 METHOD RevertToSnapshot ( ' VTable offset = 44
 BYVAL SnapshotId AS GUID
 ) AS LONG
 ' =====================================================================================
 METHOD QueryRevertStatus ( ' VTable offset = 48
 BYREF pwszVolume AS WSTRINGZ
 , BYREF ppAsync AS IVssAsync
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IVssSoftwareSnapshotProvider_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IVssProviderCreateSnapshotSet
' IID = 5F894E5B-1E39-4778-8E23-9ABAD9F0E08C"
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IVssProviderCreateSnapshotSet_INTERFACE_DEFINED)
 %IVssProviderCreateSnapshotSet_INTERFACE_DEFINED = 1
$IID_IVssProviderCreateSnapshotSet = GUID$("{5F894E5B-1E39-4778-8E23-9ABAD9F0E08C}")
INTERFACE IVssProviderCreateSnapshotSet $IID_IVssProviderCreateSnapshotSet
 INHERIT IUnknown
 ' =====================================================================================
 METHOD EndPrepareSnapshots ( ' VTable offset = 12
 BYVAL SnapshotSetId AS GUID
 ) AS LONG
 ' =====================================================================================
 METHOD PreCommitSnapshots ( ' VTable offset = 16
 BYVAL SnapshotSetId AS GUID
 ) AS LONG
 ' =====================================================================================
 METHOD CommitSnapshots ( ' VTable offset = 20
 BYVAL SnapshotSetId AS GUID
 ) AS LONG
 ' =====================================================================================
 METHOD PostCommitSnapshots ( ' VTable offset = 24
 BYVAL SnapshotSetId AS GUID
 , BYVAL LONG
 ) AS LONG
 ' =====================================================================================
 METHOD PreFinalCommitSnapshots ( ' VTable offset = 28
 BYVAL SnapshotSetId AS GUID
 ) AS LONG
 ' =====================================================================================
 METHOD PostFinalCommitSnapshots ( ' VTable offset = 32
 BYVAL SnapshotSetId AS GUID
 ) AS LONG
 ' =====================================================================================
 METHOD AbortSnapshots ( ' VTable offset = 36
 BYVAL SnapshotSetId AS GUID
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IVssProviderCreateSnapshotSet_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IVssProviderNotifications
' IID = E561901F-03A5-4AFE-86D0-72BAEECE7004
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IVssProviderNotifications_INTERFACE_DEFINED)
 %IVssProviderNotifications_INTERFACE_DEFINED = 1
$IID_IVssProviderNotifications = GUID$("{E561901F-03A5-4AFE-86D0-72BAEECE7004}")
INTERFACE IVssProviderNotifications $IID_IVssProviderNotifications
 INHERIT IUnknown
 ' =====================================================================================
 METHOD OnLoad ( ' VTable offset = 12
 BYVAL pCallback AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD OnUnload ( ' VTable offset = 16
 BYVAL bForceUnload AS LONG
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IVssProviderNotifications_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IVssHardwareSnapshotProvider
' IID = 9593A157-44E9-4344-BBEB-44FBF9B06B10
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IVssHardwareSnapshotProvider_INTERFACE_DEFINED)
 %IVssHardwareSnapshotProvider_INTERFACE_DEFINED = 1
$IID_IVssHardwareSnapshotProvider = GUID$("{9593A157-44E9-4344-BBEB-44FBF9B06B10}")
INTERFACE IVssHardwareSnapshotProvider $IID_IVssHardwareSnapshotProvider
 INHERIT IUnknown
 ' =====================================================================================
 METHOD AreLunsSupported ( ' VTable offset = 12
 BYVAL lLunCount AS LONG
 , BYVAL lContext AS LONG
 , BYREF rgwszDevices AS WSTRINGZ
 , BYREF pLunInformation AS VDS_LUN_INFORMATION
 , BYREF pbIsSupported AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD FillInLunInfo ( ' VTable offset = 16
 BYREF wszDeviceName AS WSTRINGZ
 , BYREF pLunInfo AS VDS_LUN_INFORMATION
 , BYREF pbIsSupported AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD BeginPrepareSnapshot ( ' VTable offset = 20
 BYVAL SnapshotSetId AS GUID
 , BYVAL SnapshotId AS GUID
 , BYVAL lContext AS LONG
 , BYVAL lLunCount AS LONG
 , BYREF rgDeviceNames AS WSTRINGZ
 , BYREF rgLunInformation AS VDS_LUN_INFORMATION
 ) AS LONG
 ' =====================================================================================
 METHOD GetTargetLuns ( ' VTable offset = 24
 BYVAL lLunCount AS LONG
 , BYREF rgDeviceNames AS WSTRINGZ
 , BYREF rgSourceLuns AS VDS_LUN_INFORMATION
 , BYREF rgDestinationLuns AS VDS_LUN_INFORMATION
 ) AS LONG
 ' =====================================================================================
 METHOD LocateLuns ( ' VTable offset = 28
 BYVAL lLunCount AS LONG
 , BYREF rgSourceLuns AS VDS_LUN_INFORMATION
 ) AS LONG
 ' =====================================================================================
 METHOD OnLunEmpty ( ' VTable offset = 32
 BYREF wszDeviceName AS WSTRINGZ
 , BYREF pInformation AS VDS_LUN_INFORMATION
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IVssHardwareSnapshotProvider_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IVssHardwareSnapshotProviderEx
' IID = 7F5BA925-CDB1-4D11-A71F-339EB7E709FD
' Inherited interface = IVssHardwareSnapshotProvider
' ########################################################################################
#IF NOT %DEF(%IVssHardwareSnapshotProviderEx_INTERFACE_DEFINED)
 %IVssHardwareSnapshotProviderEx_INTERFACE_DEFINED = 1
$IID_IVssHardwareSnapshotProviderEx = GUID$("{7F5BA925-CDB1-4D11-A71F-339EB7E709FD}")
INTERFACE IVssHardwareSnapshotProviderEx $IID_IVssHardwareSnapshotProviderEx
 INHERIT IUnknown
 ' =====================================================================================
 ' IVssHardwareSnapshotProvider Methods
 ' =====================================================================================
 METHOD AreLunsSupported ( ' VTable offset = 12
 BYVAL lLunCount AS LONG
 , BYVAL lContext AS LONG
 , BYREF rgwszDevices AS WSTRINGZ
 , BYREF pLunInformation AS VDS_LUN_INFORMATION
 , BYREF pbIsSupported AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD FillInLunInfo ( ' VTable offset = 16
 BYREF wszDeviceName AS WSTRINGZ
 , BYREF pLunInfo AS VDS_LUN_INFORMATION
 , BYREF pbIsSupported AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD BeginPrepareSnapshot ( ' VTable offset = 20
 BYVAL SnapshotSetId AS GUID
 , BYVAL SnapshotId AS GUID
 , BYVAL lContext AS LONG
 , BYVAL lLunCount AS LONG
 , BYREF rgDeviceNames AS WSTRINGZ
 , BYREF rgLunInformation AS VDS_LUN_INFORMATION
 ) AS LONG
 ' =====================================================================================
 METHOD GetTargetLuns ( ' VTable offset = 24
 BYVAL lLunCount AS LONG
 , BYREF rgDeviceNames AS WSTRINGZ
 , BYREF rgSourceLuns AS VDS_LUN_INFORMATION
 , BYREF rgDestinationLuns AS VDS_LUN_INFORMATION
 ) AS LONG
 ' =====================================================================================
 METHOD LocateLuns ( ' VTable offset = 28
 BYVAL lLunCount AS LONG
 , BYREF rgSourceLuns AS VDS_LUN_INFORMATION
 ) AS LONG
 ' =====================================================================================
 METHOD OnLunEmpty ( ' VTable offset = 32
 BYREF wszDeviceName AS WSTRINGZ
 , BYREF pInformation AS VDS_LUN_INFORMATION
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' IVssHardwareSnapshotProviderEx Methods
 ' =====================================================================================
 METHOD GetProviderCapabilities ( ' VTable offset = 36
 BYREF pllOriginalCapabilityMask AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD OnLunStateChange ( ' VTable offset = 40
 BYREF pSnapshotLuns AS VDS_LUN_INFORMATION
 , BYREF pOriginalLuns AS VDS_LUN_INFORMATION
 , BYVAL dwCount AS DWORD
 , BYVAL dwFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD ResyncLuns ( ' VTable offset = 44
 BYREF pSourceLuns AS VDS_LUN_INFORMATION
 , BYREF pTargetLuns AS VDS_LUN_INFORMATION
 , BYVAL dwCount AS DWORD
 , BYREF ppAsync AS IVssAsync
 ) AS LONG
 ' =====================================================================================
 METHOD OnReuseLuns ( ' VTable offset = 48
 BYREF pSnapshotLuns AS VDS_LUN_INFORMATION
 , BYREF pOriginalLuns AS VDS_LUN_INFORMATION
 , BYVAL dwCount AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IVssHardwareSnapshotProviderEx_INTERFACE_DEFINED__ */
#IF NOT %DEF(%VSSProvider_LIBRARY_DEFINED)
 %VSSProvider_LIBRARY_DEFINED = 1
'EXTERN_C const IID LIBID_VSSProvider;
#ENDIF ' /* __VSSProvider_LIBRARY_DEFINED__ */
#ENDIF
