ifndef __REQUIRED_RPCNDR_H_VERSION__
define __REQUIRED_RPCNDR_H_VERSION__ 500
endif
ifndef __REQUIRED_RPCSAL_H_VERSION__
define __REQUIRED_RPCSAL_H_VERSION__ 100
endif

include rpc.inc
include rpcndr.inc

ifndef __RPCNDR_H_VERSION__
.err<this stub requires an updated version of rpcndr.inc>
endif

ifndef COM_NO_WINDOWS_H
include windows.inc
include ole2.inc
endif

ifndef __vds_h__
define __vds_h__

include oaidl.inc
include vdssys.inc
include vdserr.inc
include vdslun.inc
include winapifamily.inc

if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)

VDS_OBJECT_ID typedef GUID

.enum VDS_OBJECT_TYPE {
	VDS_OT_UNKNOWN	= 0,
	VDS_OT_PROVIDER = 1,
	VDS_OT_PACK	= 10,
	VDS_OT_VOLUME	= 11,
	VDS_OT_VOLUME_PLEX = 12,
	VDS_OT_DISK	= 13,
	VDS_OT_SUB_SYSTEM = 30,
	VDS_OT_CONTROLLER = 31,
	VDS_OT_DRIVE	= 32,
	VDS_OT_LUN	= 33,
	VDS_OT_LUN_PLEX = 34,
	VDS_OT_PORT	= 35,
	VDS_OT_PORTAL	= 36,
	VDS_OT_TARGET	= 37,
	VDS_OT_PORTAL_GROUP = 38,
	VDS_OT_STORAGE_POOL = 39,
	VDS_OT_HBAPORT	= 90,
	VDS_OT_INIT_ADAPTER = 91,
	VDS_OT_INIT_PORTAL = 92,
	VDS_OT_ASYNC	= 100,
	VDS_OT_ENUM	= 101,
	VDS_OT_VDISK	= 200,
	VDS_OT_OPEN_VDISK = 201
}

.enum VDS_PROVIDER_TYPE {
	VDS_PT_UNKNOWN	= 0,
	VDS_PT_SOFTWARE = 1,
	VDS_PT_HARDWARE = 2,
	VDS_PT_VIRTUALDISK = 3,
	VDS_PT_MAX	= 4
}

.enum VDS_PROVIDER_FLAG {
	VDS_PF_DYNAMIC	= 0x1,
	VDS_PF_INTERNAL_HARDWARE_PROVIDER = 0x2,
	VDS_PF_ONE_DISK_ONLY_PER_PACK = 0x4,
	VDS_PF_ONE_PACK_ONLINE_ONLY = 0x8,
	VDS_PF_VOLUME_SPACE_MUST_BE_CONTIGUOUS = 0x10,
	VDS_PF_SUPPORT_DYNAMIC	= 0x80000000,
	VDS_PF_SUPPORT_FAULT_TOLERANT = 0x40000000,
	VDS_PF_SUPPORT_DYNAMIC_1394 = 0x20000000,
	VDS_PF_SUPPORT_MIRROR = 0x20,
	VDS_PF_SUPPORT_RAID5 = 0x40
}

.enum VDS_RECOVER_ACTION {
	VDS_RA_UNKNOWN	= 0,
	VDS_RA_REFRESH	= 1,
	VDS_RA_RESTART	= 2
}

.enum VDS_NOTIFICATION_TARGET_TYPE {
    VDS_NTT_UNKNOWN	= 0,
    VDS_NTT_PACK	= VDS_OT_PACK,
    VDS_NTT_VOLUME	= VDS_OT_VOLUME,
    VDS_NTT_DISK	= VDS_OT_DISK,
    VDS_NTT_PARTITION	= 60,
    VDS_NTT_DRIVE_LETTER = 61,
    VDS_NTT_FILE_SYSTEM = 62,
    VDS_NTT_MOUNT_POINT = 63,
    VDS_NTT_SUB_SYSTEM	= VDS_OT_SUB_SYSTEM,
    VDS_NTT_CONTROLLER	= VDS_OT_CONTROLLER,
    VDS_NTT_DRIVE	= VDS_OT_DRIVE,
    VDS_NTT_LUN		= VDS_OT_LUN,
    VDS_NTT_PORT	= VDS_OT_PORT,
    VDS_NTT_PORTAL	= VDS_OT_PORTAL,
    VDS_NTT_TARGET	= VDS_OT_TARGET,
    VDS_NTT_PORTAL_GROUP = VDS_OT_PORTAL_GROUP,
    VDS_NTT_SERVICE	= 200
}

VDS_NF_PACK_ARRIVE	equ 1
VDS_NF_PACK_DEPART	equ 2
VDS_NF_PACK_MODIFY	equ 3
VDS_NF_VOLUME_ARRIVE	equ 4
VDS_NF_VOLUME_DEPART	equ 5
VDS_NF_VOLUME_MODIFY	equ 6
VDS_NF_VOLUME_REBUILDING_PROGRESS equ 7
VDS_NF_DISK_ARRIVE	equ 8
VDS_NF_DISK_DEPART	equ 9
VDS_NF_DISK_MODIFY	equ 10
VDS_NF_PARTITION_ARRIVE equ 11
VDS_NF_PARTITION_DEPART equ 12
VDS_NF_PARTITION_MODIFY equ 13
VDS_NF_SUB_SYSTEM_ARRIVE equ 101
VDS_NF_SUB_SYSTEM_DEPART equ 102
VDS_NF_CONTROLLER_ARRIVE equ 103
VDS_NF_CONTROLLER_DEPART equ 104
VDS_NF_DRIVE_ARRIVE	equ 105
VDS_NF_DRIVE_DEPART	equ 106
VDS_NF_DRIVE_MODIFY	equ 107
VDS_NF_LUN_ARRIVE	equ 108
VDS_NF_LUN_DEPART	equ 109
VDS_NF_LUN_MODIFY	equ 110
VDS_NF_PORT_ARRIVE	equ 121
VDS_NF_PORT_DEPART	equ 122
VDS_NF_PORTAL_ARRIVE	equ 123
VDS_NF_PORTAL_DEPART	equ 124
VDS_NF_PORTAL_MODIFY	equ 125
VDS_NF_TARGET_ARRIVE	equ 126
VDS_NF_TARGET_DEPART	equ 127
VDS_NF_TARGET_MODIFY	equ 128
VDS_NF_PORTAL_GROUP_ARRIVE equ 129
VDS_NF_PORTAL_GROUP_DEPART equ 130
VDS_NF_PORTAL_GROUP_MODIFY equ 131
VDS_NF_SUB_SYSTEM_MODIFY equ 151
VDS_NF_DRIVE_LETTER_FREE equ 201
VDS_NF_DRIVE_LETTER_ASSIGN equ 202
VDS_NF_FILE_SYSTEM_MODIFY equ 203
VDS_NF_FILE_SYSTEM_FORMAT_PROGRESS equ 204
VDS_NF_MOUNT_POINTS_CHANGE equ 205
VDS_NF_FILE_SYSTEM_SHRINKING_PROGRESS equ 206
VDS_NF_SERVICE_OUT_OF_SYNC equ 301
VDS_NF_CONTROLLER_MODIFY equ 350
VDS_NF_CONTROLLER_REMOVED equ 351
VDS_NF_PORT_MODIFY	equ 352
VDS_NF_PORT_REMOVED	equ 353
VDS_NF_DRIVE_REMOVED	equ 354

VDS_PACK_NOTIFICATION	STRUC
ulEvent			ULONG ?
packId			VDS_OBJECT_ID <>
VDS_PACK_NOTIFICATION	ENDS

VDS_DISK_NOTIFICATION	STRUC
ulEvent			ULONG ?
diskId			VDS_OBJECT_ID <>
VDS_DISK_NOTIFICATION	ENDS

VDS_VOLUME_NOTIFICATION STRUC
ulEvent			ULONG ?
volumeId		VDS_OBJECT_ID <>
plexId			VDS_OBJECT_ID <>
ulPercentCompleted	ULONG ?
VDS_VOLUME_NOTIFICATION ENDS

VDS_PARTITION_NOTIFICATION STRUC
ulEvent			ULONG ?
diskId			VDS_OBJECT_ID <>
ullOffset		ULONGLONG ?
VDS_PARTITION_NOTIFICATION ENDS

VDS_SERVICE_NOTIFICATION STRUC
ulEvent			ULONG ?
action			VDS_RECOVER_ACTION ?
VDS_SERVICE_NOTIFICATION ENDS

VDS_DRIVE_LETTER_NOTIFICATION STRUC
ulEvent			ULONG ?
wcLetter		WCHAR ?
volumeId		VDS_OBJECT_ID <>
VDS_DRIVE_LETTER_NOTIFICATION ENDS

VDS_FILE_SYSTEM_NOTIFICATION STRUC
ulEvent			ULONG ?
volumeId		VDS_OBJECT_ID <>
dwPercentCompleted	dd ?
VDS_FILE_SYSTEM_NOTIFICATION ENDS

VDS_MOUNT_POINT_NOTIFICATION STRUC
ulEvent			ULONG ?
volumeId		VDS_OBJECT_ID <>
VDS_MOUNT_POINT_NOTIFICATION ENDS

VDS_SUB_SYSTEM_NOTIFICATION STRUC
ulEvent			ULONG ?
subSystemId		VDS_OBJECT_ID <>
VDS_SUB_SYSTEM_NOTIFICATION ENDS

VDS_CONTROLLER_NOTIFICATION STRUC
ulEvent			ULONG ?
controllerId		VDS_OBJECT_ID <>
VDS_CONTROLLER_NOTIFICATION ENDS

VDS_DRIVE_NOTIFICATION	STRUC
ulEvent			ULONG ?
driveId			VDS_OBJECT_ID <>
VDS_DRIVE_NOTIFICATION	ENDS

VDS_LUN_NOTIFICATION	STRUC
ulEvent			ULONG ?
LunId			VDS_OBJECT_ID <>
VDS_LUN_NOTIFICATION	ENDS

VDS_PORT_NOTIFICATION	STRUC
ulEvent			ULONG ?
portId			VDS_OBJECT_ID <>
VDS_PORT_NOTIFICATION	ENDS

VDS_PORTAL_NOTIFICATION STRUC
ulEvent			ULONG ?
portalId		VDS_OBJECT_ID <>
VDS_PORTAL_NOTIFICATION ENDS

VDS_TARGET_NOTIFICATION STRUC
ulEvent			ULONG ?
targetId		VDS_OBJECT_ID <>
VDS_TARGET_NOTIFICATION ENDS

VDS_PORTAL_GROUP_NOTIFICATION STRUC
ulEvent			ULONG ?
portalGroupId		VDS_OBJECT_ID <>
VDS_PORTAL_GROUP_NOTIFICATION ENDS

VDS_NOTIFICATION	STRUC
objectType		VDS_NOTIFICATION_TARGET_TYPE ?
UNION
 Pack			VDS_PACK_NOTIFICATION <>
 Disk			VDS_DISK_NOTIFICATION <>
 Volume			VDS_VOLUME_NOTIFICATION <>
 Partition		VDS_PARTITION_NOTIFICATION <>
 Letter			VDS_DRIVE_LETTER_NOTIFICATION <>
 FileSystem		VDS_FILE_SYSTEM_NOTIFICATION <>
 MountPoint		VDS_MOUNT_POINT_NOTIFICATION <>
 SubSystem		VDS_SUB_SYSTEM_NOTIFICATION <>
 Controller		VDS_CONTROLLER_NOTIFICATION <>
 Drive			VDS_DRIVE_NOTIFICATION <>
 Lun			VDS_LUN_NOTIFICATION <>
 Port			VDS_PORT_NOTIFICATION <>
 Portal			VDS_PORTAL_NOTIFICATION <>
 Target			VDS_TARGET_NOTIFICATION <>
 PortalGroup		VDS_PORTAL_GROUP_NOTIFICATION <>
 Service		VDS_SERVICE_NOTIFICATION <>
ENDS
VDS_NOTIFICATION	ENDS

VDS_ASYNC_OUTPUT_TYPE	typedef SDWORD
VDS_ASYNCOUT_UNKNOWN	equ 0
VDS_ASYNCOUT_CREATEVOLUME equ 1
VDS_ASYNCOUT_EXTENDVOLUME equ 2
VDS_ASYNCOUT_SHRINKVOLUME equ 3
VDS_ASYNCOUT_ADDVOLUMEPLEX equ 4
VDS_ASYNCOUT_BREAKVOLUMEPLEX equ 5
VDS_ASYNCOUT_REMOVEVOLUMEPLEX equ 6
VDS_ASYNCOUT_REPAIRVOLUMEPLEX equ 7
VDS_ASYNCOUT_RECOVERPACK equ 8
VDS_ASYNCOUT_REPLACEDISK equ 9
VDS_ASYNCOUT_CREATEPARTITION equ 10
VDS_ASYNCOUT_CLEAN	equ 11
VDS_ASYNCOUT_CREATELUN	equ 50
VDS_ASYNCOUT_ADDLUNPLEX equ 52
VDS_ASYNCOUT_REMOVELUNPLEX equ 53
VDS_ASYNCOUT_EXTENDLUN	equ 54
VDS_ASYNCOUT_SHRINKLUN	equ 55
VDS_ASYNCOUT_RECOVERLUN equ 56
VDS_ASYNCOUT_LOGINTOTARGET equ 60
VDS_ASYNCOUT_LOGOUTFROMTARGET equ 61
VDS_ASYNCOUT_CREATETARGET equ 62
VDS_ASYNCOUT_CREATEPORTALGROUP equ 63
VDS_ASYNCOUT_DELETETARGET equ 64
VDS_ASYNCOUT_ADDPORTAL	equ 65
VDS_ASYNCOUT_REMOVEPORTAL equ 66
VDS_ASYNCOUT_DELETEPORTALGROUP equ 67
VDS_ASYNCOUT_FORMAT	equ 101
VDS_ASYNCOUT_CREATE_VDISK equ 200
VDS_ASYNCOUT_ATTACH_VDISK equ 201
VDS_ASYNCOUT_COMPACT_VDISK equ 202
VDS_ASYNCOUT_MERGE_VDISK equ 203
VDS_ASYNCOUT_EXPAND_VDISK equ 204

VDS_ASYNC_OUTPUT	STRUC
type			VDS_ASYNC_OUTPUT_TYPE ?
UNION
 STRUCT _cp
  ullOffset		ULONGLONG ?
  volumeId		VDS_OBJECT_ID <>
 ENDS
 STRUCT _cv
  pVolumeUnk		LPUNKNOWN ?
 ENDS
 STRUCT _bvp
  pVolumeUnk		LPUNKNOWN ?
 ENDS
 STRUCT _sv
  ullReclaimedBytes	ULONGLONG ?
 ENDS
 STRUCT _cl
  pLunUnk		LPUNKNOWN ?
 ENDS
 STRUCT _ct
  pTargetUnk		LPUNKNOWN ?
 ENDS
 STRUCT _cpg
  pPortalGroupUnk	LPUNKNOWN ?
 ENDS
 STRUCT _cvd
  pVDiskUnk		LPUNKNOWN ?
 ENDS
ENDS
VDS_ASYNC_OUTPUT	ENDS

VDS_ISCSI_PORTALGROUP_TAG typedef USHORT

VDS_IPADDRESS_TYPE	typedef SDWORD
VDS_IPT_TEXT		equ 0
VDS_IPT_IPV4		equ 1
VDS_IPT_IPV6		equ 2
VDS_IPT_EMPTY		equ 3

VDS_HEALTH		typedef SDWORD
VDS_H_UNKNOWN		equ 0
VDS_H_HEALTHY		equ 1
VDS_H_REBUILDING	equ 2
VDS_H_STALE		equ 3
VDS_H_FAILING		equ 4
VDS_H_FAILING_REDUNDANCY equ 5
VDS_H_FAILED_REDUNDANCY equ 6
VDS_H_FAILED_REDUNDANCY_FAILING equ 7
VDS_H_FAILED		equ 8
VDS_H_REPLACED		equ 9
VDS_H_PENDING_FAILURE	equ 10
VDS_H_DEGRADED		equ 11

VDS_TRANSITION_STATE	typedef SDWORD
VDS_TS_UNKNOWN		equ 0
VDS_TS_STABLE		equ 1
VDS_TS_EXTENDING	equ 2
VDS_TS_SHRINKING	equ 3
VDS_TS_RECONFIGING	equ 4
VDS_TS_RESTRIPING	equ 5

VDS_FILE_SYSTEM_TYPE	typedef SDWORD
VDS_FST_UNKNOWN		equ 0
VDS_FST_RAW		equ ( VDS_FST_UNKNOWN + 1 )
VDS_FST_FAT		equ ( VDS_FST_RAW + 1 )
VDS_FST_FAT32		equ ( VDS_FST_FAT + 1 )
VDS_FST_NTFS		equ ( VDS_FST_FAT32 + 1 )
VDS_FST_CDFS		equ ( VDS_FST_NTFS + 1 )
VDS_FST_UDF		equ ( VDS_FST_CDFS + 1 )
VDS_FST_EXFAT		equ ( VDS_FST_UDF + 1 )
VDS_FST_CSVFS		equ ( VDS_FST_EXFAT + 1 )
VDS_FST_REFS		equ ( VDS_FST_CSVFS + 1 )

VDS_HBAPORT_TYPE	typedef SDWORD
VDS_HPT_UNKNOWN		equ 1
VDS_HPT_OTHER		equ 2
VDS_HPT_NOTPRESENT	equ 3
VDS_HPT_NPORT		equ 5
VDS_HPT_NLPORT		equ 6
VDS_HPT_FLPORT		equ 7
VDS_HPT_FPORT		equ 8
VDS_HPT_EPORT		equ 9
VDS_HPT_GPORT		equ 10
VDS_HPT_LPORT		equ 20
VDS_HPT_PTP		equ 21

VDS_HBAPORT_STATUS	typedef SDWORD
VDS_HPS_UNKNOWN		equ 1
VDS_HPS_ONLINE		equ 2
VDS_HPS_OFFLINE		equ 3
VDS_HPS_BYPASSED	equ 4
VDS_HPS_DIAGNOSTICS	equ 5
VDS_HPS_LINKDOWN	equ 6
VDS_HPS_ERROR		equ 7
VDS_HPS_LOOPBACK	equ 8

VDS_HBAPORT_SPEED_FLAG	typedef SDWORD
VDS_HSF_UNKNOWN		equ 0
VDS_HSF_1GBIT		equ 0x1
VDS_HSF_2GBIT		equ 0x2
VDS_HSF_10GBIT		equ 0x4
VDS_HSF_4GBIT		equ 0x8
VDS_HSF_NOT_NEGOTIATED	equ ( 1 shl 15 )

VDS_PATH_STATUS		typedef SDWORD
VDS_MPS_UNKNOWN		equ 0
VDS_MPS_ONLINE		equ 1
VDS_MPS_FAILED		equ 5
VDS_MPS_STANDBY		equ 7

VDS_LOADBALANCE_POLICY_ENUM typedef SDWORD
VDS_LBP_UNKNOWN		equ 0
VDS_LBP_FAILOVER	equ 1
VDS_LBP_ROUND_ROBIN	equ 2
VDS_LBP_ROUND_ROBIN_WITH_SUBSET equ 3
VDS_LBP_DYN_LEAST_QUEUE_DEPTH equ 4
VDS_LBP_WEIGHTED_PATHS	equ 5
VDS_LBP_LEAST_BLOCKS	equ 6
VDS_LBP_VENDOR_SPECIFIC equ 7

VDS_PROVIDER_LBSUPPORT_FLAG typedef SDWORD
VDS_LBF_FAILOVER	equ 0x1
VDS_LBF_ROUND_ROBIN	equ 0x2
VDS_LBF_ROUND_ROBIN_WITH_SUBSET equ 0x4
VDS_LBF_DYN_LEAST_QUEUE_DEPTH equ 0x8
VDS_LBF_WEIGHTED_PATHS	equ 0x10
VDS_LBF_LEAST_BLOCKS	equ 0x20
VDS_LBF_VENDOR_SPECIFIC equ 0x40

VDS_VERSION_SUPPORT_FLAG typedef SDWORD
VDS_VSF_1_0		equ 0x1
VDS_VSF_1_1		equ 0x2
VDS_VSF_2_0		equ 0x4
VDS_VSF_2_1		equ 0x8
VDS_VSF_3_0		equ 0x10

VDS_HWPROVIDER_TYPE	typedef SDWORD
VDS_HWT_UNKNOWN		equ 0
VDS_HWT_PCI_RAID	equ 1
VDS_HWT_FIBRE_CHANNEL	equ 2
VDS_HWT_ISCSI		equ 3
VDS_HWT_SAS		equ 4
VDS_HWT_HYBRID		equ 5

VDS_ISCSI_LOGIN_TYPE	typedef SDWORD
VDS_ILT_MANUAL		equ 0
VDS_ILT_PERSISTENT	equ 1
VDS_ILT_BOOT		equ 2

VDS_ISCSI_AUTH_TYPE	typedef SDWORD
VDS_IAT_NONE		equ 0
VDS_IAT_CHAP		equ 1
VDS_IAT_MUTUAL_CHAP	equ 2

VDS_ISCSI_IPSEC_FLAG	typedef SDWORD
VDS_IIF_VALID		equ 0x1
VDS_IIF_IKE		equ 0x2
VDS_IIF_MAIN_MODE	equ 0x4
VDS_IIF_AGGRESSIVE_MODE equ 0x8
VDS_IIF_PFS_ENABLE	equ 0x10
VDS_IIF_TRANSPORT_MODE_PREFERRED equ 0x20
VDS_IIF_TUNNEL_MODE_PREFERRED equ 0x40

VDS_ISCSI_LOGIN_FLAG	typedef SDWORD
VDS_ILF_REQUIRE_IPSEC	equ 0x1
VDS_ILF_MULTIPATH_ENABLED equ 0x2

VDS_PATH_ID		STRUC
ullSourceId		ULONGLONG ?
ullPathId		ULONGLONG ?
VDS_PATH_ID		ENDS

VDS_WWN			STRUC
rguchWwn		UCHAR  8  dup(?)
VDS_WWN			ENDS

VDS_IPADDRESS		STRUC
type			VDS_IPADDRESS_TYPE ?
ipv4Address		ULONG ?
ipv6Address		UCHAR  16  dup(?)
ulIpv6FlowInfo		ULONG ?
ulIpv6ScopeId		ULONG ?
wszTextAddress		WCHAR  257  dup(?)
ulPort			ULONG ?
VDS_IPADDRESS		ENDS
PVDS_IPADDRESS		typedef ptr VDS_IPADDRESS

VDS_ISCSI_IPSEC_KEY	STRUC
pKey			LPBYTE ?
ulKeySize		ULONG ?
VDS_ISCSI_IPSEC_KEY	ENDS

VDS_ISCSI_SHARED_SECRET STRUC
pSharedSecret		LPBYTE ?
ulSharedSecretSize	ULONG ?
VDS_ISCSI_SHARED_SECRET ENDS

VDS_HBAPORT_PROP	STRUC
id			VDS_OBJECT_ID <>
wwnNode			VDS_WWN <>
wwnPort			VDS_WWN <>
type			VDS_HBAPORT_TYPE ?
status			VDS_HBAPORT_STATUS ?
ulPortSpeed		ULONG ?
ulSupportedPortSpeed	ULONG ?
VDS_HBAPORT_PROP	ENDS
PVDS_HBAPORT_PROP	typedef ptr VDS_HBAPORT_PROP

VDS_ISCSI_INITIATOR_ADAPTER_PROP STRUC
id			VDS_OBJECT_ID <>
pwszName		LPWSTR ?
VDS_ISCSI_INITIATOR_ADAPTER_PROP ENDS

VDS_ISCSI_INITIATOR_PORTAL_PROP STRUC
id			VDS_OBJECT_ID <>
address			VDS_IPADDRESS <>
ulPortIndex		ULONG ?
VDS_ISCSI_INITIATOR_PORTAL_PROP ENDS

VDS_PROVIDER_PROP	STRUC
id			VDS_OBJECT_ID <>
pwszName		LPWSTR ?
guidVersionId		GUID <>
pwszVersion		LPWSTR ?
type			VDS_PROVIDER_TYPE ?
ulFlags			ULONG ?
ulStripeSizeFlags	ULONG ?
sRebuildPriority	dw ?
VDS_PROVIDER_PROP	ENDS

VDS_PATH_INFO		STRUC
pathId			VDS_PATH_ID <>
type			VDS_HWPROVIDER_TYPE ?
status			VDS_PATH_STATUS ?
union
 controllerPortId	VDS_OBJECT_ID <>
 targetPortalId		VDS_OBJECT_ID <>
ends
union
 hbaPortId		VDS_OBJECT_ID <>
 initiatorAdapterId	VDS_OBJECT_ID <>
ends
union
 pHbaPortProp		PVDS_HBAPORT_PROP ?
 pInitiatorPortalIpAddr PVDS_IPADDRESS ?
ends
VDS_PATH_INFO		ENDS

VDS_PATH_POLICY		STRUC
pathId			VDS_PATH_ID <>
bPrimaryPath		BOOL ?
ulWeight		ULONG ?
VDS_PATH_POLICY		ENDS

ifndef __IEnumVdsObject_INTERFACE_DEFINED__
define __IEnumVdsObject_INTERFACE_DEFINED__

DEFINE_IIDX(IEnumVdsObject, "118610b7-8d94-4030-b5b8-500889788e4e")

.comdef IEnumVdsObject : public IUnknown

    Next		proc :ULONG, :ptr, :ptr
    Skip		proc :ULONG
    Reset		proc
    Clone		proc :ptr
   .ends

endif

ifndef __IVdsAsync_INTERFACE_DEFINED__
define __IVdsAsync_INTERFACE_DEFINED__

DEFINE_IIDX(IVdsAsync, "d5d23b6d-5a55-4492-9889-397a3c2d2dbc")

.comdef IVdsAsync : public IUnknown

    Cancel		proc
    _Wait		proc :ptr, :ptr
    QueryStatus		proc :ptr, :ptr
   .ends

endif

ifndef __IVdsAdviseSink_INTERFACE_DEFINED__
define __IVdsAdviseSink_INTERFACE_DEFINED__

DEFINE_IIDX(IVdsAdviseSink, "8326cd1d-cf59-4936-b786-5efc08798e25")

.comdef IVdsAdviseSink : public IUnknown

    OnNotify		proc :LONG, :ptr
   .ends

endif

ifndef __IVdsProvider_INTERFACE_DEFINED__
define __IVdsProvider_INTERFACE_DEFINED__

DEFINE_IIDX(IVdsProvider, "10c5e575-7984-4e81-a56b-431f5f92ae42")

.comdef IVdsProvider : public IUnknown

    GetProperties	proc :ptr
   .ends

endif

ifndef __IVdsProviderSupport_INTERFACE_DEFINED__
define __IVdsProviderSupport_INTERFACE_DEFINED__

DEFINE_IIDX(IVdsProviderSupport, "1732be13-e8f9-4a03-bfbc-5f616aa66ce1")

.comdef IVdsProviderSupport : public IUnknown

    GetVersionSupport	proc :ptr
   .ends

endif

VDS_PACK_STATUS		typedef SDWORD
VDS_PS_UNKNOWN		equ 0
VDS_PS_ONLINE		equ 1
VDS_PS_OFFLINE		equ 4

VDS_PACK_FLAG		typedef SDWORD
VDS_PKF_FOREIGN		equ 0x1
VDS_PKF_NOQUORUM	equ 0x2
VDS_PKF_POLICY		equ 0x4
VDS_PKF_CORRUPTED	equ 0x8
VDS_PKF_ONLINE_ERROR	equ 0x10

VDS_DISK_STATUS		typedef SDWORD
VDS_DS_UNKNOWN		equ 0
VDS_DS_ONLINE		equ 1
VDS_DS_NOT_READY	equ 2
VDS_DS_NO_MEDIA		equ 3
VDS_DS_FAILED		equ 5
VDS_DS_MISSING		equ 6
VDS_DS_OFFLINE		equ 4

VDS_PARTITION_STYLE	typedef SDWORD
VDS_PST_UNKNOWN		equ 0
VDS_PST_MBR		equ 1
VDS_PST_GPT		equ 2

VDS_DISK_FLAG		typedef SDWORD
VDS_DF_AUDIO_CD		equ 0x1
VDS_DF_HOTSPARE		equ 0x2
VDS_DF_RESERVE_CAPABLE	equ 0x4
VDS_DF_MASKED		equ 0x8
VDS_DF_STYLE_CONVERTIBLE equ 0x10
VDS_DF_CLUSTERED	equ 0x20
VDS_DF_READ_ONLY	equ 0x40
VDS_DF_SYSTEM_DISK	equ 0x80
VDS_DF_BOOT_DISK	equ 0x100
VDS_DF_PAGEFILE_DISK	equ 0x200
VDS_DF_HIBERNATIONFILE_DISK equ 0x400
VDS_DF_CRASHDUMP_DISK	equ 0x800
VDS_DF_HAS_ARC_PATH	equ 0x1000
VDS_DF_DYNAMIC		equ 0x2000
VDS_DF_BOOT_FROM_DISK	equ 0x4000
VDS_DF_CURRENT_READ_ONLY equ 0x8000
VDS_DF_REFS_NOT_SUPPORTED equ 0x10000

VDS_PARTITION_FLAG	typedef SDWORD
VDS_PTF_SYSTEM		equ 0x1

VDS_LUN_RESERVE_MODE	typedef SDWORD
VDS_LRM_NONE		equ 0
VDS_LRM_EXCLUSIVE_RW	equ 1
VDS_LRM_EXCLUSIVE_RO	equ 2
VDS_LRM_SHARED_RO	equ 3
VDS_LRM_SHARED_RW	equ 4

VDS_VOLUME_STATUS	typedef SDWORD
VDS_VS_UNKNOWN		equ 0
VDS_VS_ONLINE		equ 1
VDS_VS_NO_MEDIA		equ 3
VDS_VS_FAILED		equ 5
VDS_VS_OFFLINE		equ 4

VDS_VOLUME_TYPE		typedef SDWORD
VDS_VT_UNKNOWN		equ 0
VDS_VT_SIMPLE		equ 10
VDS_VT_SPAN		equ 11
VDS_VT_STRIPE		equ 12
VDS_VT_MIRROR		equ 13
VDS_VT_PARITY		equ 14

VDS_VOLUME_FLAG		typedef SDWORD
VDS_VF_SYSTEM_VOLUME	equ 0x1
VDS_VF_BOOT_VOLUME	equ 0x2
VDS_VF_ACTIVE		equ 0x4
VDS_VF_READONLY		equ 0x8
VDS_VF_HIDDEN		equ 0x10
VDS_VF_CAN_EXTEND	equ 0x20
VDS_VF_CAN_SHRINK	equ 0x40
VDS_VF_PAGEFILE		equ 0x80
VDS_VF_HIBERNATION	equ 0x100
VDS_VF_CRASHDUMP	equ 0x200
VDS_VF_INSTALLABLE	equ 0x400
VDS_VF_LBN_REMAP_ENABLED equ 0x800
VDS_VF_FORMATTING	equ 0x1000
VDS_VF_NOT_FORMATTABLE	equ 0x2000
VDS_VF_NTFS_NOT_SUPPORTED equ 0x4000
VDS_VF_FAT32_NOT_SUPPORTED equ 0x8000
VDS_VF_FAT_NOT_SUPPORTED equ 0x10000
VDS_VF_NO_DEFAULT_DRIVE_LETTER equ 0x20000
VDS_VF_PERMANENTLY_DISMOUNTED equ 0x40000
VDS_VF_PERMANENT_DISMOUNT_SUPPORTED equ 0x80000
VDS_VF_SHADOW_COPY	equ 0x100000
VDS_VF_FVE_ENABLED	equ 0x200000
VDS_VF_DIRTY		equ 0x400000
VDS_VF_REFS_NOT_SUPPORTED equ 0x800000
VDS_VF_BACKS_BOOT_VOLUME equ 0x1000000
VDS_VF_BACKED_BY_WIM_IMAGE equ 0x2000000

VDS_VOLUME_PLEX_TYPE	typedef SDWORD
VDS_VPT_UNKNOWN		equ 0
VDS_VPT_SIMPLE		equ VDS_VT_SIMPLE
VDS_VPT_SPAN		equ VDS_VT_SPAN
VDS_VPT_STRIPE		equ VDS_VT_STRIPE
VDS_VPT_PARITY		equ VDS_VT_PARITY

VDS_VOLUME_PLEX_STATUS	typedef SDWORD
VDS_VPS_UNKNOWN		equ 0
VDS_VPS_ONLINE		equ 1
VDS_VPS_NO_MEDIA	equ 3
VDS_VPS_FAILED		equ 5

VDS_DISK_EXTENT_TYPE	typedef SDWORD
VDS_DET_UNKNOWN		equ 0
VDS_DET_FREE		equ 1
VDS_DET_DATA		equ 2
VDS_DET_OEM		equ 3
VDS_DET_ESP		equ 4
VDS_DET_MSR		equ 5
VDS_DET_LDM		equ 6
VDS_DET_CLUSTER		equ 7
VDS_DET_UNUSABLE	equ 0x7fff

VDS_PACK_PROP		STRUC
id			VDS_OBJECT_ID <>
pwszName		LPWSTR ?
status			VDS_PACK_STATUS ?
ulFlags			ULONG ?
VDS_PACK_PROP		ENDS

PVDS_PACK_PROP		typedef ptr VDS_PACK_PROP

VDS_DISK_PROP		STRUC
id			VDS_OBJECT_ID <>
status			VDS_DISK_STATUS ?
ReserveMode		VDS_LUN_RESERVE_MODE ?
health			VDS_HEALTH ?
dwDeviceType		dd ?
dwMediaType		dd ?
ullSize			ULONGLONG ?
ulBytesPerSector	ULONG ?
ulSectorsPerTrack	ULONG ?
ulTracksPerCylinder	ULONG ?
ulFlags			ULONG ?
BusType			VDS_STORAGE_BUS_TYPE ?
PartitionStyle		VDS_PARTITION_STYLE ?
union
 dwSignature		DWORD ?
 DiskGuid		GUID <>
ends
pwszDiskAddress		LPWSTR ?
pwszName		LPWSTR ?
pwszFriendlyName	LPWSTR ?
pwszAdaptorName		LPWSTR ?
pwszDevicePath		LPWSTR ?
VDS_DISK_PROP		ENDS

PVDS_DISK_PROP		typedef ptr VDS_DISK_PROP

VDS_DISK_OFFLINE_REASON typedef SDWORD
VDSDiskOfflineReasonNone equ 0
VDSDiskOfflineReasonPolicy equ 1
VDSDiskOfflineReasonRedundantPath equ 2
VDSDiskOfflineReasonSnapshot equ 3
VDSDiskOfflineReasonCollision equ 4
VDSDiskOfflineReasonResourceExhaustion equ 5
VDSDiskOfflineReasonWriteFailure equ 6
VDSDiskOfflineReasonDIScan equ 7

VDS_DISK_PROP2		STRUC
id			VDS_OBJECT_ID <>
status			VDS_DISK_STATUS ?
OfflineReason		VDS_DISK_OFFLINE_REASON ?
ReserveMode		VDS_LUN_RESERVE_MODE ?
health			VDS_HEALTH ?
dwDeviceType		dd ?
dwMediaType		dd ?
ullSize			ULONGLONG ?
ulBytesPerSector	ULONG ?
ulSectorsPerTrack	ULONG ?
ulTracksPerCylinder	ULONG ?
ulFlags			ULONG ?
BusType			VDS_STORAGE_BUS_TYPE ?
PartitionStyle		VDS_PARTITION_STYLE ?
union
 dwSignature		DWORD ?
 DiskGuid		GUID <>
ends
pwszDiskAddress		LPWSTR ?
pwszName		LPWSTR ?
pwszFriendlyName	LPWSTR ?
pwszAdaptorName		LPWSTR ?
pwszDevicePath		LPWSTR ?
pwszLocationPath	LPWSTR ?
VDS_DISK_PROP2		ENDS
PVDS_DISK_PROP2		typedef ptr VDS_DISK_PROP2

VDS_ADVANCEDDISK_PROP	STRUC
pwszId			LPWSTR ?
pwszPathname		LPWSTR ?
pwszLocation		LPWSTR ?
pwszFriendlyName	LPWSTR ?
pswzIdentifier		LPWSTR ?
usIdentifierFormat	dw ?
ulNumber		ULONG ?
pwszSerialNumber	LPWSTR ?
pwszFirmwareVersion	LPWSTR ?
pwszManufacturer	LPWSTR ?
pwszModel		LPWSTR ?
ullTotalSize		ULONGLONG ?
ullAllocatedSize	ULONGLONG ?
ulLogicalSectorSize	ULONG ?
ulPhysicalSectorSize	ULONG ?
ulPartitionCount	ULONG ?
status			VDS_DISK_STATUS ?
health			VDS_HEALTH ?
BusType			VDS_STORAGE_BUS_TYPE ?
PartitionStyle		VDS_PARTITION_STYLE ?
union
 dwSignature		DWORD ?
 DiskGuid		GUID <>
ends
ulFlags			ULONG ?
dwDeviceType		dd ?
VDS_ADVANCEDDISK_PROP	ENDS
PVDS_ADVANCEDDISK_PROP	typedef ptr VDS_ADVANCEDDISK_PROP

VDS_VOLUME_PROP		STRUC
id			VDS_OBJECT_ID <>
type			VDS_VOLUME_TYPE ?
status			VDS_VOLUME_STATUS ?
health			VDS_HEALTH ?
TransitionState		VDS_TRANSITION_STATE ?
ullSize			ULONGLONG ?
ulFlags			ULONG ?
RecommendedFileSystemType VDS_FILE_SYSTEM_TYPE ?
pwszName		LPWSTR ?
VDS_VOLUME_PROP		ENDS
PVDS_VOLUME_PROP	typedef ptr VDS_VOLUME_PROP

VDS_VOLUME_PROP2	STRUC
id			VDS_OBJECT_ID <>
type			VDS_VOLUME_TYPE ?
status			VDS_VOLUME_STATUS ?
health			VDS_HEALTH ?
TransitionState		VDS_TRANSITION_STATE ?
ullSize			ULONGLONG ?
ulFlags			ULONG ?
RecommendedFileSystemType VDS_FILE_SYSTEM_TYPE ?
cbUniqueId		ULONG ?
pwszName		LPWSTR ?
pUniqueId		LPBYTE ?
VDS_VOLUME_PROP2	ENDS
PVDS_VOLUME_PROP2	typedef ptr VDS_VOLUME_PROP2

VDS_VOLUME_PLEX_PROP	STRUC
id			VDS_OBJECT_ID <>
type			VDS_VOLUME_PLEX_TYPE ?
status			VDS_VOLUME_PLEX_STATUS ?
health			VDS_HEALTH ?
TransitionState		VDS_TRANSITION_STATE ?
ullSize			ULONGLONG ?
ulStripeSize		ULONG ?
ulNumberOfMembers	ULONG ?
VDS_VOLUME_PLEX_PROP	ENDS
PVDS_VOLUME_PLEX_PROP	typedef ptr VDS_VOLUME_PLEX_PROP

VDS_DISK_EXTENT		STRUC
diskId			VDS_OBJECT_ID <>
type			VDS_DISK_EXTENT_TYPE ?
ullOffset		ULONGLONG ?
ullSize			ULONGLONG ?
volumeId		VDS_OBJECT_ID <>
plexId			VDS_OBJECT_ID <>
memberIdx		ULONG ?
VDS_DISK_EXTENT		ENDS
PVDS_DISK_EXTENT	typedef ptr VDS_DISK_EXTENT

VDS_DISK_FREE_EXTENT	STRUC
diskId			VDS_OBJECT_ID <>
ullOffset		ULONGLONG ?
ullSize			ULONGLONG ?
VDS_DISK_FREE_EXTENT	ENDS
PVDS_DISK_FREE_EXTENT	typedef ptr VDS_DISK_FREE_EXTENT

VDS_INPUT_DISK		STRUC
diskId			VDS_OBJECT_ID <>
ullSize			ULONGLONG ?
plexId			VDS_OBJECT_ID <>
memberIdx		ULONG ?
VDS_INPUT_DISK		ENDS

GPT_PARTITION_NAME_LENGTH equ 36
VDS_PARTITION_INFO_GPT	STRUC
partitionType		GUID <>
partitionId		GUID <>
attributes		ULONGLONG ?
name			WCHAR 36 dup(?)
VDS_PARTITION_INFO_GPT	ENDS

VDS_PARTITION_INFO_MBR	STRUC
partitionType		db ?
bootIndicator		BOOLEAN ?
recognizedPartition	BOOLEAN ?
hiddenSectors		dd ?
VDS_PARTITION_INFO_MBR	ENDS

VDS_PARTITION_PROP	STRUC
PartitionStyle		VDS_PARTITION_STYLE ?
ulFlags			ULONG ?
ulPartitionNumber	ULONG ?
ullOffset		ULONGLONG ?
ullSize			ULONGLONG ?
union
 Mbr			VDS_PARTITION_INFO_MBR <>
 Gpt			VDS_PARTITION_INFO_GPT <>
ends
VDS_PARTITION_PROP	ENDS

tag_VDS_PARTITION_STYLE typedef SDWORD
VDS_PARTITION_STYLE_MBR equ 0
VDS_PARTITION_STYLE_GPT equ ( VDS_PARTITION_STYLE_MBR + 1 )
VDS_PARTITION_STYLE_RAW equ ( VDS_PARTITION_STYLE_GPT + 1 )

VDS_PARTITION_INFORMATION_EX STRUC
dwPartitionStyle	VDS_PARTITION_STYLE ?
ullStartingOffset	ULONGLONG ?
ullPartitionLength	ULONGLONG ?
dwPartitionNumber	dd ?
bRewritePartition	BOOLEAN ?
union
 Mbr			VDS_PARTITION_INFO_MBR <>
 Gpt			VDS_PARTITION_INFO_GPT <>
ends
VDS_PARTITION_INFORMATION_EX ENDS

CREATE_PARTITION_PARAMETERS STRUC
style			VDS_PARTITION_STYLE ?
union
 struc MbrPartInfo
  partitionType		db ?
  bootIndicator		BOOLEAN ?
 ends
 struc GptPartInfo
  partitionType		GUID <>
  partitionId		GUID <>
  attributes		ULONGLONG ?
  name			WCHAR 36 dup(?)
 ends
ends
CREATE_PARTITION_PARAMETERS ENDS

CHANGE_ATTRIBUTES_PARAMETERS STRUC
style			VDS_PARTITION_STYLE ?
union
 struc MbrPartInfo
  bootIndicator		BOOLEAN ?
 ends
 struc GptPartInfo
  attributes		ULONGLONG ?
 ends
ends
CHANGE_ATTRIBUTES_PARAMETERS ENDS

CHANGE_PARTITION_TYPE_PARAMETERS STRUC
style			VDS_PARTITION_STYLE ?
union
 struc MbrPartInfo
  partitionType		db ?
 ends
 struc GptPartInfo
  partitionType		GUID <>
 ends
ends
CHANGE_PARTITION_TYPE_PARAMETERS ENDS


ifndef __IVdsSwProvider_INTERFACE_DEFINED__
define __IVdsSwProvider_INTERFACE_DEFINED__

DEFINE_IIDX(IVdsSwProvider, "9aa58360-ce33-4f92-b658-ed24b14425b8")

.comdef IVdsSwProvider : public IUnknown

    QueryPacks		proc :ptr
    CreatePack		proc :ptr
   .ends

endif

ifndef __IVdsPack_INTERFACE_DEFINED__
define __IVdsPack_INTERFACE_DEFINED__

DEFINE_IIDX(IVdsPack, "3b69d7f5-9d94-4648-91ca-79939ba263bf")

.comdef IVdsPack : public IUnknown

    GetProperties	proc :ptr
    GetProvider		proc :ptr
    QueryVolumes	proc :ptr
    QueryDisks		proc :ptr
    CreateVolume	proc :VDS_VOLUME_TYPE
    AddDisk		proc :VDS_OBJECT_ID, :VDS_PARTITION_STYLE, :BOOL
    MigrateDisks	proc :ptr, :ptr
    ReplaceDisk		proc :VDS_OBJECT_ID, :VDS_OBJECT_ID, :ptr
    RemoveMissingDisk	proc :VDS_OBJECT_ID
    Recover		proc :ptr
   .ends

endif

ifndef __IVdsPack2_INTERFACE_DEFINED__
define __IVdsPack2_INTERFACE_DEFINED__

DEFINE_IIDX(IVdsPack2, "13B50BFF-290A-47DD-8558-B7C58DB1A71A")

.comdef IVdsPack2 : public IUnknown

    CreateVolume2	proc :VDS_VOLUME_TYPE
   .ends

endif

ifndef __IVdsDisk_INTERFACE_DEFINED__
define __IVdsDisk_INTERFACE_DEFINED__

DEFINE_IIDX(IVdsDisk, "07e5c822-f00c-47a1-8fce-b244da56fd06")

.comdef IVdsDisk : public IUnknown

    GetProperties	proc :ptr
    GetPack		proc :ptr
    GetIdentificationData proc :ptr
    QueryExtents	proc
    ConvertStyle	proc :VDS_PARTITION_STYLE
    SetFlags		proc :ULONG
    ClearFlags		proc :ULONG
   .ends

endif

ifndef __IVdsDisk2_INTERFACE_DEFINED__
define __IVdsDisk2_INTERFACE_DEFINED__

DEFINE_IIDX(IVdsDisk2, "40F73C8B-687D-4a13-8D96-3D7F2E683936")

.comdef IVdsDisk2 : public IUnknown

    SetSANMode		proc :BOOL
   .ends

endif

ifndef __IVdsDiskOnline_INTERFACE_DEFINED__
define __IVdsDiskOnline_INTERFACE_DEFINED__

DEFINE_IIDX(IVdsDiskOnline, "90681B1D-6A7F-48e8-9061-31B7AA125322")

.comdef IVdsDiskOnline : public IUnknown

    Online		proc
    Offline		proc
   .ends

endif

ifndef __IVdsAdvancedDisk_INTERFACE_DEFINED__
define __IVdsAdvancedDisk_INTERFACE_DEFINED__

DEFINE_IIDX(IVdsAdvancedDisk, "6e6f6b40-977c-4069-bddd-ac710059f8c0")

.comdef IVdsAdvancedDisk : public IUnknown

    GetPartitionProperties proc :ULONGLONG, :ptr
    QueryPartitions	proc
    CreatePartition	proc :ULONGLONG, :ULONGLONG, :ptr, :ptr
    DeletePartition	proc :ULONGLONG, :BOOL, :BOOL
    ChangeAttributes	proc :ULONGLONG, :ptr
    AssignDriveLetter	proc :ULONGLONG, :WCHAR
    DeleteDriveLetter	proc :ULONGLONG, :WCHAR
    GetDriveLetter	proc :ULONGLONG, :ptr
    FormatPartition	proc :ULONGLONG, :VDS_FILE_SYSTEM_TYPE, :LPWSTR, :DWORD, :BOOL, :BOOL, :BOOL, :ptr
    Clean		proc :BOOL, :BOOL, :BOOL, :ptr
   .ends

endif

ifndef __IVdsAdvancedDisk2_INTERFACE_DEFINED__
define __IVdsAdvancedDisk2_INTERFACE_DEFINED__

DEFINE_IIDX(IVdsAdvancedDisk2, "9723f420-9355-42de-ab66-e31bb15beeac")

.comdef IVdsAdvancedDisk2 : public IUnknown

    ChangePartitionType proc :ULONGLONG, :BOOL, :ptr
   .ends

endif

ifndef __IVdsAdvancedDisk3_INTERFACE_DEFINED__
define __IVdsAdvancedDisk3_INTERFACE_DEFINED__

DEFINE_IIDX(IVdsAdvancedDisk3, "3858C0D5-0F35-4BF5-9714-69874963BC36")

.comdef IVdsAdvancedDisk3 : public IUnknown

    GetProperties	proc :ptr
    GetUniqueId		proc :ptr
   .ends

endif

ifndef __IVdsCreatePartitionEx_INTERFACE_DEFINED__
define __IVdsCreatePartitionEx_INTERFACE_DEFINED__

DEFINE_IIDX(IVdsCreatePartitionEx, "9882f547-cfc3-420b-9750-00dfbec50662")

.comdef IVdsCreatePartitionEx : public IUnknown

    CreatePartitionEx	proc :ULONGLONG, :ULONGLONG, :ULONG, :ptr, :ptr
   .ends

endif

ifndef __IVdsRemovable_INTERFACE_DEFINED__
define __IVdsRemovable_INTERFACE_DEFINED__

DEFINE_IIDX(IVdsRemovable, "0316560b-5db4-4ed9-bbb5-213436ddc0d9")

.comdef IVdsRemovable : public IUnknown

    QueryMedia		proc
    Eject		proc
   .ends

endif

ifndef __IVdsVolume_INTERFACE_DEFINED__
define __IVdsVolume_INTERFACE_DEFINED__

DEFINE_IIDX(IVdsVolume, "88306bb2-e71f-478c-86a2-79da200a0f11")

.comdef IVdsVolume : public IUnknown

    GetProperties	proc :ptr
    GetPack		proc :ptr
    QueryPlexes		proc :ptr
    Extend		proc
    Shrink		proc :ULONGLONG, :ptr
    AddPlex		proc :VDS_OBJECT_ID, :ptr
    BreakPlex		proc :VDS_OBJECT_ID, :ptr
    RemovePlex		proc :VDS_OBJECT_ID, :ptr
    Delete		proc :BOOL
    SetFlags		proc :ULONG, :BOOL
    ClearFlags		proc :ULONG
   .ends

endif

ifndef __IVdsVolume2_INTERFACE_DEFINED__
define __IVdsVolume2_INTERFACE_DEFINED__

DEFINE_IIDX(IVdsVolume2, "72AE6713-DCBB-4a03-B36B-371F6AC6B53D")

.comdef IVdsVolume2 : public IUnknown

    GetProperties2	proc :ptr
   .ends

endif

ifndef __IVdsVolumeOnline_INTERFACE_DEFINED__
define __IVdsVolumeOnline_INTERFACE_DEFINED__

DEFINE_IIDX(IVdsVolumeOnline, "1BE2275A-B315-4f70-9E44-879B3A2A53F2")

.comdef IVdsVolumeOnline : public IUnknown

    Online		proc
   .ends

endif

ifndef __IVdsVolumePlex_INTERFACE_DEFINED__
define __IVdsVolumePlex_INTERFACE_DEFINED__

DEFINE_IIDX(IVdsVolumePlex, "4daa0135-e1d1-40f1-aaa5-3cc1e53221c3")

.comdef IVdsVolumePlex : public IUnknown

    GetProperties	proc :ptr
    GetVolume		proc :ptr
    QueryExtents	proc
    Repair		proc
   .ends

endif

ifndef __IVdsDisk3_INTERFACE_DEFINED__
define __IVdsDisk3_INTERFACE_DEFINED__

DEFINE_IIDX(IVdsDisk3, "8F4B2F5D-EC15-4357-992F-473EF10975B9")

.comdef IVdsDisk3 : public IUnknown

    GetProperties2	proc :ptr
    QueryFreeExtents	proc :ULONG
   .ends

endif


VDS_SUB_SYSTEM_STATUS	typedef SDWORD
VDS_SSS_UNKNOWN		equ 0
VDS_SSS_ONLINE		equ 1
VDS_SSS_NOT_READY	equ 2
VDS_SSS_OFFLINE		equ 4
VDS_SSS_FAILED		equ 5
VDS_SSS_PARTIALLY_MANAGED equ 9

PVDS_SUB_SYSTEM_STATUS	typedef ptr VDS_SUB_SYSTEM_STATUS

VDS_SUB_SYSTEM_FLAG	typedef SDWORD
VDS_SF_LUN_MASKING_CAPABLE equ 0x1
VDS_SF_LUN_PLEXING_CAPABLE equ 0x2
VDS_SF_LUN_REMAPPING_CAPABLE equ 0x4
VDS_SF_DRIVE_EXTENT_CAPABLE equ 0x8
VDS_SF_HARDWARE_CHECKSUM_CAPABLE equ 0x10
VDS_SF_RADIUS_CAPABLE	equ 0x20
VDS_SF_READ_BACK_VERIFY_CAPABLE equ 0x40
VDS_SF_WRITE_THROUGH_CACHING_CAPABLE equ 0x80
VDS_SF_SUPPORTS_FAULT_TOLERANT_LUNS equ 0x200
VDS_SF_SUPPORTS_NON_FAULT_TOLERANT_LUNS equ 0x400
VDS_SF_SUPPORTS_SIMPLE_LUNS equ 0x800
VDS_SF_SUPPORTS_SPAN_LUNS equ 0x1000
VDS_SF_SUPPORTS_STRIPE_LUNS equ 0x2000
VDS_SF_SUPPORTS_MIRROR_LUNS equ 0x4000
VDS_SF_SUPPORTS_PARITY_LUNS equ 0x8000
VDS_SF_SUPPORTS_AUTH_CHAP equ 0x10000
VDS_SF_SUPPORTS_AUTH_MUTUAL_CHAP equ 0x20000
VDS_SF_SUPPORTS_SIMPLE_TARGET_CONFIG equ 0x40000
VDS_SF_SUPPORTS_LUN_NUMBER equ 0x80000
VDS_SF_SUPPORTS_MIRRORED_CACHE equ 0x100000
VDS_SF_READ_CACHING_CAPABLE equ 0x200000
VDS_SF_WRITE_CACHING_CAPABLE equ 0x400000
VDS_SF_MEDIA_SCAN_CAPABLE equ 0x800000
VDS_SF_CONSISTENCY_CHECK_CAPABLE equ 0x1000000

PVDS_SUB_SYSTEM_FLAG	typedef ptr VDS_SUB_SYSTEM_FLAG

VDS_SUB_SYSTEM_SUPPORTED_RAID_TYPE_FLAG typedef SDWORD
VDS_SF_SUPPORTS_RAID2_LUNS equ 0x1
VDS_SF_SUPPORTS_RAID3_LUNS equ 0x2
VDS_SF_SUPPORTS_RAID4_LUNS equ 0x4
VDS_SF_SUPPORTS_RAID5_LUNS equ 0x8
VDS_SF_SUPPORTS_RAID6_LUNS equ 0x10
VDS_SF_SUPPORTS_RAID01_LUNS equ 0x20
VDS_SF_SUPPORTS_RAID03_LUNS equ 0x40
VDS_SF_SUPPORTS_RAID05_LUNS equ 0x80
VDS_SF_SUPPORTS_RAID10_LUNS equ 0x100
VDS_SF_SUPPORTS_RAID15_LUNS equ 0x200
VDS_SF_SUPPORTS_RAID30_LUNS equ 0x400
VDS_SF_SUPPORTS_RAID50_LUNS equ 0x800
VDS_SF_SUPPORTS_RAID51_LUNS equ 0x1000
VDS_SF_SUPPORTS_RAID53_LUNS equ 0x2000
VDS_SF_SUPPORTS_RAID60_LUNS equ 0x4000
VDS_SF_SUPPORTS_RAID61_LUNS equ 0x8000

PVDS_SUB_SYSTEM_SUPPORTED_RAID_TYPE_FLAG typedef ptr VDS_SUB_SYSTEM_SUPPORTED_RAID_TYPE_FLAG

VDS_INTERCONNECT_FLAG	typedef SDWORD
VDS_ITF_PCI_RAID	equ 0x1
VDS_ITF_FIBRE_CHANNEL	equ 0x2
VDS_ITF_ISCSI		equ 0x4
VDS_ITF_SAS		equ 0x8

PVDS_INTERCONNECT_FLAG	typedef ptr VDS_INTERCONNECT_FLAG

VDS_CONTROLLER_STATUS	typedef SDWORD
VDS_CS_UNKNOWN		equ 0
VDS_CS_ONLINE		equ 1
VDS_CS_NOT_READY	equ 2
VDS_CS_OFFLINE		equ 4
VDS_CS_FAILED		equ 5
VDS_CS_REMOVED		equ 8

PVDS_CONTROLLER_STATUS	typedef ptr VDS_CONTROLLER_STATUS

VDS_PORT_STATUS		typedef SDWORD
VDS_PRS_UNKNOWN		equ 0
VDS_PRS_ONLINE		equ 1
VDS_PRS_NOT_READY	equ 2
VDS_PRS_OFFLINE		equ 4
VDS_PRS_FAILED		equ 5
VDS_PRS_REMOVED		equ 8

PVDS_PORT_STATUS	typedef ptr VDS_PORT_STATUS

VDS_DRIVE_STATUS	typedef SDWORD
VDS_DRS_UNKNOWN		equ 0
VDS_DRS_ONLINE		equ 1
VDS_DRS_NOT_READY	equ 2
VDS_DRS_OFFLINE		equ 4
VDS_DRS_FAILED		equ 5
VDS_DRS_REMOVED		equ 8

PVDS_DRIVE_STATUS	typedef ptr VDS_DRIVE_STATUS

VDS_DRIVE_FLAG		typedef SDWORD
VDS_DRF_HOTSPARE	equ 0x1
VDS_DRF_ASSIGNED	equ 0x2
VDS_DRF_UNASSIGNED	equ 0x4
VDS_DRF_HOTSPARE_IN_USE equ 0x8
VDS_DRF_HOTSPARE_STANDBY equ 0x10

PVDS_DRIVE_FLAG		typedef ptr VDS_DRIVE_FLAG

VDS_LUN_TYPE		typedef SDWORD
VDS_LT_UNKNOWN		equ 0
VDS_LT_DEFAULT		equ 1
VDS_LT_FAULT_TOLERANT	equ 2
VDS_LT_NON_FAULT_TOLERANT equ 3
VDS_LT_SIMPLE		equ 10
VDS_LT_SPAN		equ 11
VDS_LT_STRIPE		equ 12
VDS_LT_MIRROR		equ 13
VDS_LT_PARITY		equ 14
VDS_LT_RAID2		equ 15
VDS_LT_RAID3		equ 16
VDS_LT_RAID4		equ 17
VDS_LT_RAID5		equ 18
VDS_LT_RAID6		equ 19
VDS_LT_RAID01		equ 20
VDS_LT_RAID03		equ 21
VDS_LT_RAID05		equ 22
VDS_LT_RAID10		equ 23
VDS_LT_RAID15		equ 24
VDS_LT_RAID30		equ 25
VDS_LT_RAID50		equ 26
VDS_LT_RAID51		equ 27
VDS_LT_RAID53		equ 28
VDS_LT_RAID60		equ 29
VDS_LT_RAID61		equ 30

PVDS_LUN_TYPE		typedef ptr VDS_LUN_TYPE

VDS_LUN_STATUS		typedef SDWORD
VDS_LS_UNKNOWN		equ 0
VDS_LS_ONLINE		equ 1
VDS_LS_NOT_READY	equ 2
VDS_LS_OFFLINE		equ 4
VDS_LS_FAILED		equ 5

PVDS_LUN_STATUS		typedef ptr VDS_LUN_STATUS

VDS_LUN_FLAG		typedef SDWORD
VDS_LF_LBN_REMAP_ENABLED equ 0x1
VDS_LF_READ_BACK_VERIFY_ENABLED equ 0x2
VDS_LF_WRITE_THROUGH_CACHING_ENABLED equ 0x4
VDS_LF_HARDWARE_CHECKSUM_ENABLED equ 0x8
VDS_LF_READ_CACHE_ENABLED equ 0x10
VDS_LF_WRITE_CACHE_ENABLED equ 0x20
VDS_LF_MEDIA_SCAN_ENABLED equ 0x40
VDS_LF_CONSISTENCY_CHECK_ENABLED equ 0x80
VDS_LF_SNAPSHOT		equ 0x100

PVDS_LUN_FLAG		typedef ptr VDS_LUN_FLAG

VDS_LUN_PLEX_TYPE	typedef SDWORD
VDS_LPT_UNKNOWN		equ 0
VDS_LPT_SIMPLE		equ VDS_LT_SIMPLE
VDS_LPT_SPAN		equ VDS_LT_SPAN
VDS_LPT_STRIPE		equ VDS_LT_STRIPE
VDS_LPT_PARITY		equ VDS_LT_PARITY
VDS_LPT_RAID2		equ VDS_LT_RAID2
VDS_LPT_RAID3		equ VDS_LT_RAID3
VDS_LPT_RAID4		equ VDS_LT_RAID4
VDS_LPT_RAID5		equ VDS_LT_RAID5
VDS_LPT_RAID6		equ VDS_LT_RAID6
VDS_LPT_RAID03		equ VDS_LT_RAID03
VDS_LPT_RAID05		equ VDS_LT_RAID05
VDS_LPT_RAID10		equ VDS_LT_RAID10
VDS_LPT_RAID15		equ VDS_LT_RAID15
VDS_LPT_RAID30		equ VDS_LT_RAID30
VDS_LPT_RAID50		equ VDS_LT_RAID50
VDS_LPT_RAID53		equ VDS_LT_RAID53
VDS_LPT_RAID60		equ VDS_LT_RAID60

VDS_LUN_PLEX_STATUS	typedef SDWORD
VDS_LPS_UNKNOWN		equ 0
VDS_LPS_ONLINE		equ 1
VDS_LPS_NOT_READY	equ 2
VDS_LPS_OFFLINE		equ 4
VDS_LPS_FAILED		equ 5

VDS_LUN_PLEX_FLAG	typedef SDWORD
VDS_LPF_LBN_REMAP_ENABLED equ VDS_LF_LBN_REMAP_ENABLED

VDS_ISCSI_PORTAL_STATUS typedef SDWORD
VDS_IPS_UNKNOWN		equ 0
VDS_IPS_ONLINE		equ 1
VDS_IPS_NOT_READY	equ 2
VDS_IPS_OFFLINE		equ 4
VDS_IPS_FAILED		equ 5

VDS_STORAGE_POOL_STATUS typedef SDWORD
VDS_SPS_UNKNOWN		equ 0
VDS_SPS_ONLINE		equ 1
VDS_SPS_NOT_READY	equ 2
VDS_SPS_OFFLINE		equ 4

VDS_STORAGE_POOL_TYPE	typedef SDWORD
VDS_SPT_UNKNOWN		equ 0
VDS_SPT_PRIMORDIAL	equ 0x1
VDS_SPT_CONCRETE	equ 0x2

VDS_MAINTENANCE_OPERATION typedef SDWORD
BlinkLight		equ 1
BeepAlarm		equ 2
SpinDown		equ 3
SpinUp			equ 4
Ping			equ 5

VDS_HINTS		STRUC
ullHintMask		ULONGLONG ?
ullExpectedMaximumSize	ULONGLONG ?
ulOptimalReadSize	ULONG ?
ulOptimalReadAlignment	ULONG ?
ulOptimalWriteSize	ULONG ?
ulOptimalWriteAlignment ULONG ?
ulMaximumDriveCount	ULONG ?
ulStripeSize		ULONG ?
bFastCrashRecoveryRequired BOOL ?
bMostlyReads		BOOL ?
bOptimizeForSequentialReads BOOL ?
bOptimizeForSequentialWrites BOOL ?
bRemapEnabled		BOOL ?
bReadBackVerifyEnabled	BOOL ?
bWriteThroughCachingEnabled BOOL ?
bHardwareChecksumEnabled BOOL ?
bIsYankable		BOOL ?
sRebuildPriority	SWORD ?
VDS_HINTS		ENDS
PVDS_HINTS		typedef ptr VDS_HINTS

VDS_HINT_FASTCRASHRECOVERYREQUIRED equ 0x1
VDS_HINT_MOSTLYREADS	equ 0x2
VDS_HINT_OPTIMIZEFORSEQUENTIALREADS equ 0x4
VDS_HINT_OPTIMIZEFORSEQUENTIALWRITES equ 0x8
VDS_HINT_READBACKVERIFYENABLED equ 0x10
VDS_HINT_REMAPENABLED	equ 0x20
VDS_HINT_WRITETHROUGHCACHINGENABLED equ 0x40
VDS_HINT_HARDWARECHECKSUMENABLED equ 0x80
VDS_HINT_ISYANKABLE	equ 0x100

VDS_HINTS2		STRUC
ullHintMask		ULONGLONG ?
ullExpectedMaximumSize	ULONGLONG ?
ulOptimalReadSize	ULONG ?
ulOptimalReadAlignment	ULONG ?
ulOptimalWriteSize	ULONG ?
ulOptimalWriteAlignment ULONG ?
ulMaximumDriveCount	ULONG ?
ulStripeSize		ULONG ?
ulReserved1		ULONG ?
ulReserved2		ULONG ?
ulReserved3		ULONG ?
bFastCrashRecoveryRequired BOOL ?
bMostlyReads		BOOL ?
bOptimizeForSequentialReads BOOL ?
bOptimizeForSequentialWrites BOOL ?
bRemapEnabled		BOOL ?
bReadBackVerifyEnabled	BOOL ?
bWriteThroughCachingEnabled BOOL ?
bHardwareChecksumEnabled BOOL ?
bIsYankable		BOOL ?
bAllocateHotSpare	BOOL ?
bUseMirroredCache	BOOL ?
bReadCachingEnabled	BOOL ?
bWriteCachingEnabled	BOOL ?
bMediaScanEnabled	BOOL ?
bConsistencyCheckEnabled BOOL ?
BusType			VDS_STORAGE_BUS_TYPE ?
bReserved1		BOOL ?
bReserved2		BOOL ?
bReserved3		BOOL ?
sRebuildPriority	SWORD ?
VDS_HINTS2		ENDS
PVDS_HINTS2		typedef ptr VDS_HINTS2

VDS_HINT_ALLOCATEHOTSPARE equ 0x200
VDS_HINT_BUSTYPE	equ 0x400
VDS_HINT_USEMIRROREDCACHE equ 0x800
VDS_HINT_READCACHINGENABLED equ 0x1000
VDS_HINT_WRITECACHINGENABLED equ 0x2000
VDS_HINT_MEDIASCANENABLED equ 0x4000
VDS_HINT_CONSISTENCYCHECKENABLED equ 0x8000

VDS_SUB_SYSTEM_PROP	STRUC
id			VDS_OBJECT_ID <>
pwszFriendlyName	LPWSTR ?
pwszIdentification	LPWSTR ?
ulFlags			ULONG ?
ulStripeSizeFlags	ULONG ?
status			VDS_SUB_SYSTEM_STATUS ?
health			VDS_HEALTH ?
sNumberOfInternalBuses	SWORD ?
sMaxNumberOfSlotsEachBus SWORD ?
sMaxNumberOfControllers SWORD ?
sRebuildPriority	SWORD ?
VDS_SUB_SYSTEM_PROP	ENDS
PVDS_SUB_SYSTEM_PROP	typedef ptr VDS_SUB_SYSTEM_PROP

VDS_SUB_SYSTEM_PROP2	STRUC
id			VDS_OBJECT_ID <>
pwszFriendlyName	LPWSTR ?
pwszIdentification	LPWSTR ?
ulFlags			ULONG ?
ulStripeSizeFlags	ULONG ?
ulSupportedRaidTypeFlags ULONG ?
status			VDS_SUB_SYSTEM_STATUS ?
health			VDS_HEALTH ?
sNumberOfInternalBuses	SWORD ?
sMaxNumberOfSlotsEachBus SWORD ?
sMaxNumberOfControllers SWORD ?
sRebuildPriority	SWORD ?
ulNumberOfEnclosures	ULONG ?
VDS_SUB_SYSTEM_PROP2	ENDS
PVDS_SUB_SYSTEM_PROP2	typedef ptr VDS_SUB_SYSTEM_PROP2

VDS_CONTROLLER_PROP	STRUC
id			VDS_OBJECT_ID <>
pwszFriendlyName	LPWSTR ?
pwszIdentification	LPWSTR ?
status			VDS_CONTROLLER_STATUS ?
health			VDS_HEALTH ?
sNumberOfPorts		SWORD ?
VDS_CONTROLLER_PROP	ENDS
PVDS_CONTROLLER_PROP	typedef ptr VDS_CONTROLLER_PROP

VDS_DRIVE_PROP		STRUC
id			VDS_OBJECT_ID <>
ullSize			ULONGLONG ?
pwszFriendlyName	LPWSTR ?
pwszIdentification	LPWSTR ?
ulFlags			ULONG ?
status			VDS_DRIVE_STATUS ?
health			VDS_HEALTH ?
sInternalBusNumber	SWORD ?
sSlotNumber		SWORD ?
VDS_DRIVE_PROP		ENDS
PVDS_DRIVE_PROP		typedef ptr VDS_DRIVE_PROP

VDS_DRIVE_PROP2		STRUC
id			VDS_OBJECT_ID <>
ullSize			ULONGLONG ?
pwszFriendlyName	LPWSTR ?
pwszIdentification	LPWSTR ?
ulFlags			ULONG ?
status			VDS_DRIVE_STATUS ?
health			VDS_HEALTH ?
sInternalBusNumber	SWORD ?
sSlotNumber		SWORD ?
ulEnclosureNumber	ULONG ?
busType			VDS_STORAGE_BUS_TYPE ?
ulSpindleSpeed		ULONG ?
VDS_DRIVE_PROP2		ENDS
PVDS_DRIVE_PROP2	typedef ptr VDS_DRIVE_PROP2

VDS_DRIVE_EXTENT	STRUC
id			VDS_OBJECT_ID <>
LunId			VDS_OBJECT_ID <>
ullSize			ULONGLONG ?
bUsed			BOOL ?
VDS_DRIVE_EXTENT	ENDS
PVDS_DRIVE_EXTENT	typedef ptr VDS_DRIVE_EXTENT

VDS_REBUILD_PRIORITY_MIN equ 0
VDS_REBUILD_PRIORITY_MAX equ 16
VDS_LUN_PROP		STRUC
id			VDS_OBJECT_ID <>
ullSize			ULONGLONG ?
pwszFriendlyName	LPWSTR ?
pwszIdentification	LPWSTR ?
pwszUnmaskingList	LPWSTR ?
ulFlags			ULONG ?
type			VDS_LUN_TYPE ?
status			VDS_LUN_STATUS ?
health			VDS_HEALTH ?
TransitionState		VDS_TRANSITION_STATE ?
sRebuildPriority	SWORD ?
VDS_LUN_PROP		ENDS
PVDS_LUN_PROP		typedef ptr VDS_LUN_PROP

VDS_LUN_PLEX_PROP	STRUC
id			VDS_OBJECT_ID <>
ullSize			ULONGLONG ?
type			VDS_LUN_PLEX_TYPE ?
status			VDS_LUN_PLEX_STATUS ?
health			VDS_HEALTH ?
TransitionState		VDS_TRANSITION_STATE ?
ulFlags			ULONG ?
ulStripeSize		ULONG ?
sRebuildPriority	SWORD ?
VDS_LUN_PLEX_PROP	ENDS
PVDS_LUN_PLEX_PROP	typedef ptr VDS_LUN_PLEX_PROP

VDS_PORT_PROP		STRUC
id			VDS_OBJECT_ID <>
pwszFriendlyName	LPWSTR ?
pwszIdentification	LPWSTR ?
status			VDS_PORT_STATUS ?
VDS_PORT_PROP		ENDS
PVDS_PORT_PROP		typedef ptr VDS_PORT_PROP

VDS_ISCSI_PORTAL_PROP	STRUC
id			VDS_OBJECT_ID <>
address			VDS_IPADDRESS <>
status			VDS_ISCSI_PORTAL_STATUS ?
VDS_ISCSI_PORTAL_PROP	ENDS
PVDS_ISCSI_PORTAL_PROP	typedef ptr VDS_ISCSI_PORTAL_PROP

VDS_ISCSI_TARGET_PROP	STRUC
id			VDS_OBJECT_ID <>
pwszIscsiName		LPWSTR ?
pwszFriendlyName	LPWSTR ?
bChapEnabled		BOOL ?
VDS_ISCSI_TARGET_PROP	ENDS
PVDS_ISCSI_TARGET_PROP	typedef ptr VDS_ISCSI_TARGET_PROP

VDS_ISCSI_PORTALGROUP_PROP STRUC
id			VDS_OBJECT_ID <>
tag			VDS_ISCSI_PORTALGROUP_TAG ?
VDS_ISCSI_PORTALGROUP_PROP ENDS
PVDS_ISCSI_PORTALGROUP_PROP typedef ptr VDS_ISCSI_PORTALGROUP_PROP

VDS_RAID_TYPE		typedef SDWORD
VDS_RT_UNKNOWN		equ 0
VDS_RT_RAID0		equ 10
VDS_RT_RAID1		equ 11
VDS_RT_RAID2		equ 12
VDS_RT_RAID3		equ 13
VDS_RT_RAID4		equ 14
VDS_RT_RAID5		equ 15
VDS_RT_RAID6		equ 16
VDS_RT_RAID01		equ 17
VDS_RT_RAID03		equ 18
VDS_RT_RAID05		equ 19
VDS_RT_RAID10		equ 20
VDS_RT_RAID15		equ 21
VDS_RT_RAID30		equ 22
VDS_RT_RAID50		equ 23
VDS_RT_RAID51		equ 24
VDS_RT_RAID53		equ 25
VDS_RT_RAID60		equ 26
VDS_RT_RAID61		equ 27

PVDS_RAID_TYPE		typedef ptr VDS_RAID_TYPE

VDS_POOL_CUSTOM_ATTRIBUTES STRUC
pwszName		LPWSTR ?
pwszValue		LPWSTR ?
VDS_POOL_CUSTOM_ATTRIBUTES ENDS
PVDS_POOL_CUSTOM_ATTRIBUTES typedef ptr VDS_POOL_CUSTOM_ATTRIBUTES

VDS_POOL_ATTRIBUTES	STRUC
ullAttributeMask	ULONGLONG ?
raidType		VDS_RAID_TYPE ?
busType			VDS_STORAGE_BUS_TYPE ?
pwszIntendedUsage	LPWSTR ?
bSpinDown		BOOL ?
bIsThinProvisioned	BOOL ?
ullProvisionedSpace	ULONGLONG ?
bNoSinglePointOfFailure BOOL ?
ulDataRedundancyMax	ULONG ?
ulDataRedundancyMin	ULONG ?
ulDataRedundancyDefault ULONG ?
ulPackageRedundancyMax	ULONG ?
ulPackageRedundancyMin	ULONG ?
ulPackageRedundancyDefault ULONG ?
ulStripeSize		ULONG ?
ulStripeSizeMax		ULONG ?
ulStripeSizeMin		ULONG ?
ulDefaultStripeSize	ULONG ?
ulNumberOfColumns	ULONG ?
ulNumberOfColumnsMax	ULONG ?
ulNumberOfColumnsMin	ULONG ?
ulDefaultNumberofColumns ULONG ?
ulDataAvailabilityHint	ULONG ?
ulAccessRandomnessHint	ULONG ?
ulAccessDirectionHint	ULONG ?
ulAccessSizeHint	ULONG ?
ulAccessLatencyHint	ULONG ?
ulAccessBandwidthWeightHint ULONG ?
ulStorageCostHint	ULONG ?
ulStorageEfficiencyHint ULONG ?
ulNumOfCustomAttributes ULONG ?
pPoolCustomAttributes	PVDS_POOL_CUSTOM_ATTRIBUTES ?
bReserved1		BOOL ?
bReserved2		BOOL ?
ulReserved1		ULONG ?
ulReserved2		ULONG ?
ullReserved1		ULONGLONG ?
ullReserved2		ULONGLONG ?
VDS_POOL_ATTRIBUTES	ENDS
PVDS_POOL_ATTRIBUTES	typedef ptr VDS_POOL_ATTRIBUTES

VDS_POOL_ATTRIB_RAIDTYPE equ 0x1
VDS_POOL_ATTRIB_BUSTYPE equ 0x2
VDS_POOL_ATTRIB_ALLOW_SPINDOWN equ 0x4
VDS_POOL_ATTRIB_THIN_PROVISION equ 0x8
VDS_POOL_ATTRIB_NO_SINGLE_POF equ 0x10
VDS_POOL_ATTRIB_DATA_RDNCY_MAX equ 0x20
VDS_POOL_ATTRIB_DATA_RDNCY_MIN equ 0x40
VDS_POOL_ATTRIB_DATA_RDNCY_DEF equ 0x80
VDS_POOL_ATTRIB_PKG_RDNCY_MAX equ 0x100
VDS_POOL_ATTRIB_PKG_RDNCY_MIN equ 0x200
VDS_POOL_ATTRIB_PKG_RDNCY_DEF equ 0x400
VDS_POOL_ATTRIB_STRIPE_SIZE equ 0x800
VDS_POOL_ATTRIB_STRIPE_SIZE_MAX equ 0x1000
VDS_POOL_ATTRIB_STRIPE_SIZE_MIN equ 0x2000
VDS_POOL_ATTRIB_STRIPE_SIZE_DEF equ 0x4000
VDS_POOL_ATTRIB_NUM_CLMNS equ 0x8000
VDS_POOL_ATTRIB_NUM_CLMNS_MAX equ 0x10000
VDS_POOL_ATTRIB_NUM_CLMNS_MIN equ 0x20000
VDS_POOL_ATTRIB_NUM_CLMNS_DEF equ 0x40000
VDS_POOL_ATTRIB_DATA_AVL_HINT equ 0x80000
VDS_POOL_ATTRIB_ACCS_RNDM_HINT equ 0x100000
VDS_POOL_ATTRIB_ACCS_DIR_HINT equ 0x200000
VDS_POOL_ATTRIB_ACCS_SIZE_HINT equ 0x400000
VDS_POOL_ATTRIB_ACCS_LTNCY_HINT equ 0x800000
VDS_POOL_ATTRIB_ACCS_BDW_WT_HINT equ 0x1000000
VDS_POOL_ATTRIB_STOR_COST_HINT equ 0x2000000
VDS_POOL_ATTRIB_STOR_EFFCY_HINT equ 0x4000000
VDS_POOL_ATTRIB_CUSTOM_ATTRIB equ 0x8000000

VDS_STORAGE_POOL_PROP	STRUC
id			VDS_OBJECT_ID <>
status			VDS_STORAGE_POOL_STATUS ?
health			VDS_HEALTH ?
type			VDS_STORAGE_POOL_TYPE ?
pwszName		LPWSTR ?
pwszDescription		LPWSTR ?
ullTotalConsumedSpace	ULONGLONG ?
ullTotalManagedSpace	ULONGLONG ?
ullRemainingFreeSpace	ULONGLONG ?
VDS_STORAGE_POOL_PROP	ENDS
PVDS_STORAGE_POOL_PROP	typedef ptr VDS_STORAGE_POOL_PROP

VDS_STORAGE_POOL_DRIVE_EXTENT STRUC
id			VDS_OBJECT_ID <>
ullSize			ULONGLONG ?
bUsed			BOOL ?
VDS_STORAGE_POOL_DRIVE_EXTENT ENDS
PVDS_STORAGE_POOL_DRIVE_EXTENT typedef ptr VDS_STORAGE_POOL_DRIVE_EXTENT

ifndef __IVdsHwProvider_INTERFACE_DEFINED__
define __IVdsHwProvider_INTERFACE_DEFINED__

DEFINE_IIDX(IVdsHwProvider, "d99bdaae-b13a-4178-9fdb-e27f16b4603e")

.comdef IVdsHwProvider : public IUnknown

    QuerySubSystems	proc :ptr
    Reenumerate		proc
    Refresh		proc
   .ends

endif

ifndef __IVdsHwProviderType_INTERFACE_DEFINED__
define __IVdsHwProviderType_INTERFACE_DEFINED__

DEFINE_IIDX(IVdsHwProviderType, "3e0f5166-542d-4fc6-947a-012174240b7e")

.comdef IVdsHwProviderType : public IUnknown

    GetProviderType	proc :ptr
   .ends

endif

ifndef __IVdsHwProviderType2_INTERFACE_DEFINED__
define __IVdsHwProviderType2_INTERFACE_DEFINED__

DEFINE_IIDX(IVdsHwProviderType2, "8190236f-c4d0-4e81-8011-d69512fcc984")

.comdef IVdsHwProviderType2 : public IUnknown

    GetProviderType2	proc :ptr
   .ends

endif

ifndef __IVdsHwProviderStoragePools_INTERFACE_DEFINED__
define __IVdsHwProviderStoragePools_INTERFACE_DEFINED__

DEFINE_IIDX(IVdsHwProviderStoragePools, "d5b5937a-f188-4c79-b86c-11c920ad11b8")

.comdef IVdsHwProviderStoragePools : public IUnknown

    QueryStoragePools	proc :ULONG, :ULONGLONG, :ptr, :ptr
    CreateLunInStoragePool proc :VDS_LUN_TYPE, :ULONGLONG, :VDS_OBJECT_ID, :LPWSTR, :ptr, :ptr
    QueryMaxLunCreateSizeInStoragePool proc :VDS_LUN_TYPE, :VDS_OBJECT_ID, :ptr, :ptr
   .ends

endif

ifndef __IVdsSubSystem_INTERFACE_DEFINED__
define __IVdsSubSystem_INTERFACE_DEFINED__

DEFINE_IIDX(IVdsSubSystem, "6fcee2d3-6d90-4f91-80e2-a5c7caaca9d8")

.comdef IVdsSubSystem : public IUnknown

    GetProperties	proc :ptr
    GetProvider		proc :ptr
    QueryControllers	proc :ptr
    QueryLuns		proc :ptr
    QueryDrives		proc :ptr
    GetDrive		proc :SWORD, :SWORD, :ptr
    Reenumerate		proc
    SetControllerStatus proc :ptr, :LONG
    CreateLun		proc :VDS_LUN_TYPE, :ULONGLONG
    ReplaceDrive	proc :VDS_OBJECT_ID, :VDS_OBJECT_ID
    SetStatus		proc :VDS_SUB_SYSTEM_STATUS
    QueryMaxLunCreateSize proc :VDS_LUN_TYPE
   .ends

endif

ifndef __IVdsSubSystem2_INTERFACE_DEFINED__
define __IVdsSubSystem2_INTERFACE_DEFINED__

DEFINE_IIDX(IVdsSubSystem2, "be666735-7800-4a77-9d9c-40f85b87e292")

.comdef IVdsSubSystem2 : public IUnknown

    GetProperties2	proc :ptr
    GetDrive2		proc :SWORD, :SWORD, :ULONG, :ptr
    CreateLun2		proc :VDS_LUN_TYPE, :ULONGLONG
    QueryMaxLunCreateSize2 proc :VDS_LUN_TYPE
   .ends

endif

ifndef __IVdsSubSystemNaming_INTERFACE_DEFINED__
define __IVdsSubSystemNaming_INTERFACE_DEFINED__

DEFINE_IIDX(IVdsSubSystemNaming, "0d70faa3-9cd4-4900-aa20-6981b6aafc75")

.comdef IVdsSubSystemNaming : public IUnknown

    SetFriendlyName	proc :LPWSTR
   .ends

endif

ifndef __IVdsSubSystemIscsi_INTERFACE_DEFINED__
define __IVdsSubSystemIscsi_INTERFACE_DEFINED__

DEFINE_IIDX(IVdsSubSystemIscsi, "0027346f-40d0-4b45-8cec-5906dc0380c8")

.comdef IVdsSubSystemIscsi : public IUnknown

    QueryTargets	proc :ptr
    QueryPortals	proc :ptr
    CreateTarget	proc :LPWSTR, :LPWSTR, :ptr
    SetIpsecGroupPresharedKey proc :ptr
   .ends

endif

ifndef __IVdsSubSystemInterconnect_INTERFACE_DEFINED__
define __IVdsSubSystemInterconnect_INTERFACE_DEFINED__

DEFINE_IIDX(IVdsSubSystemInterconnect, "9e6fa560-c141-477b-83ba-0b6c38f7febf")

.comdef IVdsSubSystemInterconnect : public IUnknown

    GetSupportedInterconnects proc :ptr
   .ends

endif

ifndef __IVdsControllerPort_INTERFACE_DEFINED__
define __IVdsControllerPort_INTERFACE_DEFINED__

DEFINE_IIDX(IVdsControllerPort, "18691d0d-4e7f-43e8-92e4-cf44beeed11c")

.comdef IVdsControllerPort : public IUnknown

    GetProperties	proc :ptr
    GetController	proc :ptr
    QueryAssociatedLuns proc :ptr
    Reset		proc
    SetStatus		proc :VDS_PORT_STATUS
   .ends

endif

ifndef __IVdsController_INTERFACE_DEFINED__
define __IVdsController_INTERFACE_DEFINED__

DEFINE_IIDX(IVdsController, "cb53d96e-dffb-474a-a078-790d1e2bc082")

.comdef IVdsController : public IUnknown

    GetProperties	proc :ptr
    GetSubSystem	proc :ptr
    GetPortProperties	proc :SWORD, :ptr
    FlushCache		proc
    InvalidateCache	proc
    Reset		proc
    QueryAssociatedLuns proc :ptr
    SetStatus		proc :VDS_CONTROLLER_STATUS
   .ends

endif

ifndef __IVdsControllerControllerPort_INTERFACE_DEFINED__
define __IVdsControllerControllerPort_INTERFACE_DEFINED__

DEFINE_IIDX(IVdsControllerControllerPort, "ca5d735f-6bae-42c0-b30e-f2666045ce71")

.comdef IVdsControllerControllerPort : public IUnknown

    QueryControllerPorts proc :ptr
   .ends

endif

ifndef __IVdsDrive_INTERFACE_DEFINED__
define __IVdsDrive_INTERFACE_DEFINED__

DEFINE_IIDX(IVdsDrive, "ff24efa4-aade-4b6b-898b-eaa6a20887c7")

.comdef IVdsDrive : public IUnknown

    GetProperties	proc :ptr
    GetSubSystem	proc :ptr
    QueryExtents	proc
    SetFlags		proc :ULONG
    ClearFlags		proc :ULONG
    SetStatus		proc :VDS_DRIVE_STATUS
   .ends

endif

ifndef __IVdsDrive2_INTERFACE_DEFINED__
define __IVdsDrive2_INTERFACE_DEFINED__

DEFINE_IIDX(IVdsDrive2, "60b5a730-addf-4436-8ca7-5769e2d1ffa4")

.comdef IVdsDrive2 : public IUnknown

    GetProperties2	proc :ptr
   .ends

endif

ifndef __IVdsLun_INTERFACE_DEFINED__
define __IVdsLun_INTERFACE_DEFINED__

DEFINE_IIDX(IVdsLun, "3540a9c7-e60f-4111-a840-8bba6c2c83d8")

.comdef IVdsLun : public IUnknown

    GetProperties	proc :ptr
    GetSubSystem	proc :ptr
    GetIdentificationData proc :ptr
    QueryActiveControllers proc :ptr
    Extend		proc :ULONGLONG
    Shrink		proc :ULONGLONG, :ptr
    QueryPlexes		proc :ptr
    AddPlex		proc :VDS_OBJECT_ID, :ptr
    RemovePlex		proc :VDS_OBJECT_ID, :ptr
    Recover		proc :ptr
    SetMask		proc :LPWSTR
    Delete		proc
    AssociateControllers proc :ptr, :LONG
    QueryHints		proc :ptr
    ApplyHints		proc :ptr
    SetStatus		proc :VDS_LUN_STATUS
    QueryMaxLunExtendSize proc
   .ends

endif

ifndef __IVdsLun2_INTERFACE_DEFINED__
define __IVdsLun2_INTERFACE_DEFINED__

DEFINE_IIDX(IVdsLun2, "e5b3a735-9efb-499a-8071-4394d9ee6fcb")

.comdef IVdsLun2 : public IUnknown

    QueryHints2		proc :ptr
    ApplyHints2		proc :ptr
   .ends

endif

ifndef __IVdsLunNaming_INTERFACE_DEFINED__
define __IVdsLunNaming_INTERFACE_DEFINED__

DEFINE_IIDX(IVdsLunNaming, "907504cb-6b4e-4d88-a34d-17ba661fbb06")

.comdef IVdsLunNaming : public IUnknown

    SetFriendlyName	proc :LPWSTR
   .ends

endif

ifndef __IVdsLunNumber_INTERFACE_DEFINED__
define __IVdsLunNumber_INTERFACE_DEFINED__

DEFINE_IIDX(IVdsLunNumber, "d3f95e46-54b3-41f9-b678-0f1871443a08")

.comdef IVdsLunNumber : public IUnknown

    GetLunNumber	proc :ptr
   .ends

endif

ifndef __IVdsLunControllerPorts_INTERFACE_DEFINED__
define __IVdsLunControllerPorts_INTERFACE_DEFINED__

DEFINE_IIDX(IVdsLunControllerPorts, "451fe266-da6d-406a-bb60-82e534f85aeb")

.comdef IVdsLunControllerPorts : public IUnknown

    AssociateControllerPorts proc :ptr, :LONG
    QueryActiveControllerPorts proc :ptr
   .ends

endif

ifndef __IVdsLunMpio_INTERFACE_DEFINED__
define __IVdsLunMpio_INTERFACE_DEFINED__

DEFINE_IIDX(IVdsLunMpio, "7c5fbae3-333a-48a1-a982-33c15788cde3")

.comdef IVdsLunMpio : public IUnknown

    GetPathInfo		proc
    GetLoadBalancePolicy proc :ptr
    SetLoadBalancePolicy proc :VDS_LOADBALANCE_POLICY_ENUM
    GetSupportedLbPolicies proc :ptr
   .ends

endif

ifndef __IVdsLunIscsi_INTERFACE_DEFINED__
define __IVdsLunIscsi_INTERFACE_DEFINED__

DEFINE_IIDX(IVdsLunIscsi, "0d7c1e64-b59b-45ae-b86a-2c2cc6a42067")

.comdef IVdsLunIscsi : public IUnknown

    AssociateTargets	proc
    QueryAssociatedTargets proc :ptr
   .ends

endif

ifndef __IVdsLunPlex_INTERFACE_DEFINED__
define __IVdsLunPlex_INTERFACE_DEFINED__

DEFINE_IIDX(IVdsLunPlex, "0ee1a790-5d2e-4abb-8c99-c481e8be2138")

.comdef IVdsLunPlex : public IUnknown

    GetProperties	proc :ptr
    GetLun		proc :ptr
    QueryExtents	proc
    QueryHints		proc :ptr
    ApplyHints		proc :ptr
   .ends

endif

ifndef __IVdsIscsiPortal_INTERFACE_DEFINED__
define __IVdsIscsiPortal_INTERFACE_DEFINED__

DEFINE_IIDX(IVdsIscsiPortal, "7fa1499d-ec85-4a8a-a47b-ff69201fcd34")

.comdef IVdsIscsiPortal : public IUnknown

    GetProperties	proc :ptr
    GetSubSystem	proc :ptr
    QueryAssociatedPortalGroups proc :ptr
    SetStatus		proc :VDS_ISCSI_PORTAL_STATUS
    SetIpsecTunnelAddress proc :ptr, :ptr
    GetIpsecSecurity	proc :ptr, :ptr
    SetIpsecSecurity	proc :ptr, :ULONGLONG, :ptr
   .ends

endif

ifndef __IVdsIscsiTarget_INTERFACE_DEFINED__
define __IVdsIscsiTarget_INTERFACE_DEFINED__

DEFINE_IIDX(IVdsIscsiTarget, "aa8f5055-83e5-4bcc-aa73-19851a36a849")

.comdef IVdsIscsiTarget : public IUnknown

    GetProperties	proc :ptr
    GetSubSystem	proc :ptr
    QueryPortalGroups	proc :ptr
    QueryAssociatedLuns proc :ptr
    CreatePortalGroup	proc :ptr
    Delete		proc :ptr
    SetFriendlyName	proc :LPWSTR
    SetSharedSecret	proc :ptr, :LPWSTR
    RememberInitiatorSharedSecret proc :LPWSTR, :ptr
    GetConnectedInitiators proc
   .ends

endif

ifndef __IVdsIscsiPortalGroup_INTERFACE_DEFINED__
define __IVdsIscsiPortalGroup_INTERFACE_DEFINED__

DEFINE_IIDX(IVdsIscsiPortalGroup, "fef5f89d-a3dd-4b36-bf28-e7dde045c593")

.comdef IVdsIscsiPortalGroup : public IUnknown

    GetProperties	proc :ptr
    GetTarget		proc :ptr
    QueryAssociatedPortals proc :ptr
    AddPortal		proc :VDS_OBJECT_ID, :ptr
    RemovePortal	proc :VDS_OBJECT_ID, :ptr
    Delete		proc :ptr
   .ends

endif

ifndef __IVdsStoragePool_INTERFACE_DEFINED__
define __IVdsStoragePool_INTERFACE_DEFINED__

DEFINE_IIDX(IVdsStoragePool, "932ca8cf-0eb3-4ba8-9620-22665d7f8450")

.comdef IVdsStoragePool : public IUnknown

    GetProvider		proc :ptr
    GetProperties	proc :ptr
    GetAttributes	proc :ptr
    QueryDriveExtents	proc
    QueryAllocatedLuns	proc :ptr
    QueryAllocatedStoragePools proc :ptr
   .ends

endif

ifndef __IVdsMaintenance_INTERFACE_DEFINED__
define __IVdsMaintenance_INTERFACE_DEFINED__

DEFINE_IIDX(IVdsMaintenance, "daebeef3-8523-47ed-a2b9-05cecce2a1ae")

.comdef IVdsMaintenance : public IUnknown

    StartMaintenance	proc :VDS_MAINTENANCE_OPERATION
    StopMaintenance	proc :VDS_MAINTENANCE_OPERATION
    PulseMaintenance	proc :VDS_MAINTENANCE_OPERATION, :ULONG
   .ends

endif

if (WINVER GE _WIN32_WINNT_WIN7)

VDS_CREATE_VDISK_PARAMETERS STRUC
UniqueId		GUID <>
MaximumSize		ULONGLONG ?
BlockSizeInBytes	ULONG ?
SectorSizeInBytes	ULONG ?
pParentPath		LPWSTR ?
pSourcePath		LPWSTR ?
VDS_CREATE_VDISK_PARAMETERS ENDS

PVDS_CREATE_VDISK_PARAMETERS typedef ptr VDS_CREATE_VDISK_PARAMETERS

ifndef __IVdsVdProvider_INTERFACE_DEFINED__
define __IVdsVdProvider_INTERFACE_DEFINED__

DEFINE_IIDX(IVdsVdProvider, "b481498c-8354-45f9-84a0-0bdd2832a91f")

.comdef IVdsVdProvider : public IUnknown

    QueryVDisks		proc :ptr
    CreateVDisk		proc :PVIRTUAL_STORAGE_TYPE, :LPWSTR, :LPWSTR, :CREATE_VIRTUAL_DISK_FLAG, :ULONG, :ULONG, :PVDS_CREATE_VDISK_PARAMETERS, :ptr
    AddVDisk		proc :PVIRTUAL_STORAGE_TYPE, :LPWSTR, :ptr
    GetDiskFromVDisk	proc :ptr, :ptr
    GetVDiskFromDisk	proc :ptr, :ptr
   .ends

endif

VDS_VDISK_STATE		typedef SDWORD
VDS_VST_UNKNOWN		equ 0
VDS_VST_ADDED		equ ( VDS_VST_UNKNOWN + 1 )
VDS_VST_OPEN		equ ( VDS_VST_ADDED + 1 )
VDS_VST_ATTACH_PENDING	equ ( VDS_VST_OPEN + 1 )
VDS_VST_ATTACHED_NOT_OPEN equ ( VDS_VST_ATTACH_PENDING + 1 )
VDS_VST_ATTACHED	equ ( VDS_VST_ATTACHED_NOT_OPEN + 1 )
VDS_VST_DETACH_PENDING	equ ( VDS_VST_ATTACHED + 1 )
VDS_VST_COMPACTING	equ ( VDS_VST_DETACH_PENDING + 1 )
VDS_VST_MERGING		equ ( VDS_VST_COMPACTING + 1 )
VDS_VST_EXPANDING	equ ( VDS_VST_MERGING + 1 )
VDS_VST_DELETED		equ ( VDS_VST_EXPANDING + 1 )
VDS_VST_MAX		equ ( VDS_VST_DELETED + 1 )

VDS_VDISK_PROPERTIES	STRUC
Id			VDS_OBJECT_ID <>
State			VDS_VDISK_STATE ?
VirtualDeviceType	VIRTUAL_STORAGE_TYPE <>
VirtualSize		ULONGLONG ?
PhysicalSize		ULONGLONG ?
pPath			LPWSTR ?
pDeviceName		LPWSTR ?
DiskFlag		DEPENDENT_DISK_FLAG ?
bIsChild		BOOL ?
pParentPath		LPWSTR ?
VDS_VDISK_PROPERTIES	ENDS

PVDS_VDISK_PROPERTIES	typedef ptr VDS_VDISK_PROPERTIES

ifndef __IVdsVDisk_INTERFACE_DEFINED__
define __IVdsVDisk_INTERFACE_DEFINED__

DEFINE_IIDX(IVdsVDisk, "1e062b84-e5e6-4b4b-8a25-67b81e8f13e8")

.comdef IVdsVDisk : public IUnknown

    Open		proc :VIRTUAL_DISK_ACCESS_MASK, :OPEN_VIRTUAL_DISK_FLAG, :ULONG, :ptr
    GetProperties	proc :PVDS_VDISK_PROPERTIES
    GetHostVolume	proc :ptr
    GetDeviceName	proc :ptr
   .ends

endif

ifndef __IVdsOpenVDisk_INTERFACE_DEFINED__
define __IVdsOpenVDisk_INTERFACE_DEFINED__

DEFINE_IIDX(IVdsOpenVDisk, "75c8f324-f715-4fe3-a28e-f9011b61a4a1")

.comdef IVdsOpenVDisk : public IUnknown

    Attach		proc :LPWSTR, :ATTACH_VIRTUAL_DISK_FLAG, :ULONG, :ULONG, :ptr
    Detach		proc :DETACH_VIRTUAL_DISK_FLAG, :ULONG
    DetachAndDelete	proc :DETACH_VIRTUAL_DISK_FLAG, :ULONG
    Compact		proc :COMPACT_VIRTUAL_DISK_FLAG, :ULONG, :ptr
    Merge		proc :MERGE_VIRTUAL_DISK_FLAG, :ULONG, :ptr
    Expand		proc :EXPAND_VIRTUAL_DISK_FLAG, :ULONGLONG, :ptr
   .ends

endif

VDS_ATTACH_VIRTUAL_DISK_FLAG_USE_FILE_ACL equ 0x1

endif ;; _WIN32_WINNT_WIN7


;; {9C38ED61-D565-4728-AEEE-C80952F0ECDE}
DEFINE_GUID(CLSID_VdsLoader,0X9C38ED61,0xD565,0x4728,0xAE,0xEE,0xC8,0x09,0x52,0xF0,0xEC,0xDE)

;; {7D1933CB-86F6-4A98-8628-01BE94C9A575}
DEFINE_GUID(CLSID_VdsService,0x7D1933CB,0x86F6,0x4A98,0x86,0x28,0x01,0xBE,0x94,0xC9,0xA5,0x75)

MAX_FS_NAME_SIZE	equ ( 8 )
MAX_FS_FORMAT_SUPPORT_NAME_SIZE equ ( 32 )
MAX_FS_ALLOWED_CLUSTER_SIZES_SIZE equ ( 32 )

VDS_SERVICE_FLAG	typedef SDWORD
VDS_SVF_SUPPORT_DYNAMIC equ 0x1
VDS_SVF_SUPPORT_FAULT_TOLERANT equ 0x2
VDS_SVF_SUPPORT_GPT	equ 0x4
VDS_SVF_SUPPORT_DYNAMIC_1394 equ 0x8
VDS_SVF_CLUSTER_SERVICE_CONFIGURED equ 0x10
VDS_SVF_AUTO_MOUNT_OFF	equ 0x20
VDS_SVF_OS_UNINSTALL_VALID equ 0x40
VDS_SVF_EFI		equ 0x80
VDS_SVF_SUPPORT_MIRROR	equ 0x100L
VDS_SVF_SUPPORT_RAID5	equ 0x200L
VDS_SVF_SUPPORT_REFS	equ 0x400L

VDS_SERVICE_PROP	STRUC
pwszVersion		LPWSTR ?
ulFlags			ULONG ?
VDS_SERVICE_PROP	ENDS

VDS_SAN_POLICY		typedef SDWORD
VDS_SP_UNKNOWN		equ 0
VDS_SP_ONLINE		equ 0x1
VDS_SP_OFFLINE_SHARED	equ 0x2
VDS_SP_OFFLINE		equ 0x3
VDS_SP_OFFLINE_INTERNAL equ 0x4
VDS_SP_MAX		equ 0x5

VDS_REPARSE_POINT_PROP	STRUC
SourceVolumeId		VDS_OBJECT_ID <>
pwszPath		LPWSTR ?
VDS_REPARSE_POINT_PROP	ENDS
PVDS_REPARSE_POINT_PROP typedef ptr VDS_REPARSE_POINT_PROP

VDS_DRIVE_LETTER_FLAG	typedef SDWORD
VDS_DLF_NON_PERSISTENT	equ 0x1

VDS_DRIVE_LETTER_PROP	STRUC
wcLetter		WCHAR ?
volumeId		VDS_OBJECT_ID <>
ulFlags			ULONG ?
bUsed			BOOL ?
VDS_DRIVE_LETTER_PROP	ENDS
PVDS_DRIVE_LETTER_PROP	typedef ptr VDS_DRIVE_LETTER_PROP

VDS_FILE_SYSTEM_FLAG	typedef SDWORD
VDS_FSF_SUPPORT_FORMAT	equ 0x1
VDS_FSF_SUPPORT_QUICK_FORMAT equ 0x2
VDS_FSF_SUPPORT_COMPRESS equ 0x4
VDS_FSF_SUPPORT_SPECIFY_LABEL equ 0x8
VDS_FSF_SUPPORT_MOUNT_POINT equ 0x10
VDS_FSF_SUPPORT_REMOVABLE_MEDIA equ 0x20
VDS_FSF_SUPPORT_EXTEND	equ 0x40
VDS_FSF_ALLOCATION_UNIT_512 equ 0x10000
VDS_FSF_ALLOCATION_UNIT_1K equ 0x20000
VDS_FSF_ALLOCATION_UNIT_2K equ 0x40000
VDS_FSF_ALLOCATION_UNIT_4K equ 0x80000
VDS_FSF_ALLOCATION_UNIT_8K equ 0x100000
VDS_FSF_ALLOCATION_UNIT_16K equ 0x200000
VDS_FSF_ALLOCATION_UNIT_32K equ 0x400000
VDS_FSF_ALLOCATION_UNIT_64K equ 0x800000
VDS_FSF_ALLOCATION_UNIT_128K equ 0x1000000
VDS_FSF_ALLOCATION_UNIT_256K equ 0x2000000

VDS_FILE_SYSTEM_TYPE_PROP STRUC
type			VDS_FILE_SYSTEM_TYPE ?
wszName			WCHAR 8 dup(?)
ulFlags			ULONG ?
ulCompressionFlags	ULONG ?
ulMaxLableLength	ULONG ?
pwszIllegalLabelCharSet LPWSTR ?
VDS_FILE_SYSTEM_TYPE_PROP ENDS
PVDS_FILE_SYSTEM_TYPE_PROP typedef ptr VDS_FILE_SYSTEM_TYPE_PROP

VDS_FILE_SYSTEM_FORMAT_SUPPORT_FLAG typedef SDWORD
VDS_FSS_DEFAULT		equ 0x1
VDS_FSS_PREVIOUS_REVISION equ 0x2
VDS_FSS_RECOMMENDED	equ 0x4

VDS_FILE_SYSTEM_FORMAT_SUPPORT_PROP STRUC
ulFlags			ULONG ?
usRevision		dw ?
ulDefaultUnitAllocationSize ULONG ?
rgulAllowedUnitAllocationSizes ULONG 32 dup(?)
wszName			WCHAR 32 dup(?)
VDS_FILE_SYSTEM_FORMAT_SUPPORT_PROP ENDS
PVDS_FILE_SYSTEM_FORMAT_SUPPORT_PROP typedef ptr VDS_FILE_SYSTEM_FORMAT_SUPPORT_PROP

VDS_FILE_SYSTEM_PROP_FLAG typedef SDWORD
VDS_FPF_COMPRESSED	equ 0x1

VDS_FORMAT_OPTION_FLAGS typedef SDWORD
VDS_FSOF_NONE		equ 0
VDS_FSOF_FORCE		equ 0x1
VDS_FSOF_QUICK		equ 0x2
VDS_FSOF_COMPRESSION	equ 0x4
VDS_FSOF_DUPLICATE_METADATA equ 0x8

VDS_FILE_SYSTEM_PROP	STRUC
type			VDS_FILE_SYSTEM_TYPE ?
volumeId		VDS_OBJECT_ID <>
ulFlags			ULONG ?
ullTotalAllocationUnits ULONGLONG ?
ullAvailableAllocationUnits ULONGLONG ?
ulAllocationUnitSize	ULONG ?
pwszLabel		LPWSTR ?
VDS_FILE_SYSTEM_PROP	ENDS

PVDS_FILE_SYSTEM_PROP	typedef ptr VDS_FILE_SYSTEM_PROP

VDS_QUERY_PROVIDER_FLAG typedef SDWORD
VDS_QUERY_SOFTWARE_PROVIDERS equ 0x1
VDS_QUERY_HARDWARE_PROVIDERS equ 0x2
VDS_QUERY_VIRTUALDISK_PROVIDERS equ 0x4

ifndef __IVdsServiceLoader_INTERFACE_DEFINED__
define __IVdsServiceLoader_INTERFACE_DEFINED__

DEFINE_IIDX(IVdsServiceLoader, "e0393303-90d4-4a97-ab71-e9b671ee2729")

.comdef IVdsServiceLoader : public IUnknown

    LoadService		proc :LPWSTR, :ptr
   .ends

endif

ifndef __IVdsService_INTERFACE_DEFINED__
define __IVdsService_INTERFACE_DEFINED__

DEFINE_IIDX(IVdsService, "0818a8ef-9ba9-40d8-a6f9-e22833cc771e")

.comdef IVdsService : public IUnknown

    IsServiceReady	proc
    WaitForServiceReady proc
    GetProperties	proc :ptr
    QueryProviders	proc :DWORD, :ptr
    QueryMaskedDisks	proc :ptr
    QueryUnallocatedDisks proc :ptr
    GetObject		proc :VDS_OBJECT_ID, :VDS_OBJECT_TYPE, :ptr
    QueryDriveLetters	proc :WCHAR, :DWORD, :ptr
    QueryFileSystemTypes proc
    Reenumerate		proc
    Refresh		proc
    CleanupObsoleteMountPoints proc
    Advise		proc :ptr, :ptr
    Unadvise		proc :DWORD
    Reboot		proc
    SetFlags		proc :ULONG
    ClearFlags		proc :ULONG
   .ends

endif

ifndef __IVdsServiceUninstallDisk_INTERFACE_DEFINED__
define __IVdsServiceUninstallDisk_INTERFACE_DEFINED__

DEFINE_IIDX(IVdsServiceUninstallDisk, "B6B22DA8-F903-4be7-B492-C09D875AC9DA")

.comdef IVdsServiceUninstallDisk : public IUnknown

    GetDiskIdFromLunInfo proc :ptr, :ptr
    UninstallDisks	proc :ptr
   .ends

endif

ifndef __IVdsServiceHba_INTERFACE_DEFINED__
define __IVdsServiceHba_INTERFACE_DEFINED__

DEFINE_IIDX(IVdsServiceHba, "0ac13689-3134-47c6-a17c-4669216801be")

.comdef IVdsServiceHba : public IUnknown

    QueryHbaPorts	proc :ptr
   .ends

endif

ifndef __IVdsServiceIscsi_INTERFACE_DEFINED__
define __IVdsServiceIscsi_INTERFACE_DEFINED__

DEFINE_IIDX(IVdsServiceIscsi, "14fbe036-3ed7-4e10-90e9-a5ff991aff01")

.comdef IVdsServiceIscsi : public IUnknown

    GetInitiatorName	proc :ptr
    QueryInitiatorAdapters proc :ptr
    SetIpsecGroupPresharedKey proc :ptr
    SetAllIpsecTunnelAddresses proc :ptr, :ptr
    SetAllIpsecSecurity proc :VDS_OBJECT_ID, :ULONGLONG, :ptr
    SetInitiatorSharedSecret proc :ptr, :VDS_OBJECT_ID
    RememberTargetSharedSecret proc :VDS_OBJECT_ID, :ptr
   .ends

endif

ifndef __IVdsServiceInitialization_INTERFACE_DEFINED__
define __IVdsServiceInitialization_INTERFACE_DEFINED__

DEFINE_IIDX(IVdsServiceInitialization, "4afc3636-db01-4052-80c3-03bbcb8d3c69")

.comdef IVdsServiceInitialization : public IUnknown

    Initialize		proc :LPWSTR
   .ends

endif

ifndef __IVdsHbaPort_INTERFACE_DEFINED__
define __IVdsHbaPort_INTERFACE_DEFINED__

DEFINE_IIDX(IVdsHbaPort, "2abd757f-2851-4997-9a13-47d2a885d6ca")

.comdef IVdsHbaPort : public IUnknown

    GetProperties	proc :ptr
    SetAllPathStatuses	proc :VDS_PATH_STATUS
   .ends

endif

ifndef __IVdsIscsiInitiatorAdapter_INTERFACE_DEFINED__
define __IVdsIscsiInitiatorAdapter_INTERFACE_DEFINED__

DEFINE_IIDX(IVdsIscsiInitiatorAdapter, "b07fedd4-1682-4440-9189-a39b55194dc5")

.comdef IVdsIscsiInitiatorAdapter : public IUnknown

    GetProperties	proc :ptr
    QueryInitiatorPortals proc :ptr
    LoginToTarget	proc :VDS_ISCSI_LOGIN_TYPE, :VDS_OBJECT_ID, :VDS_OBJECT_ID, :VDS_OBJECT_ID, :ULONG, :BOOL, :BOOL, :VDS_ISCSI_AUTH_TYPE, :ptr
    LogoutFromTarget	proc :VDS_OBJECT_ID, :ptr
   .ends

endif

ifndef __IVdsIscsiInitiatorPortal_INTERFACE_DEFINED__
define __IVdsIscsiInitiatorPortal_INTERFACE_DEFINED__

DEFINE_IIDX(IVdsIscsiInitiatorPortal, "38a0a9ab-7cc8-4693-ac07-1f28bd03c3da")

.comdef IVdsIscsiInitiatorPortal : public IUnknown

    GetProperties	proc :ptr
    GetInitiatorAdapter proc :ptr
    SetIpsecTunnelAddress proc :ptr, :ptr
    GetIpsecSecurity	proc :VDS_OBJECT_ID, :ptr
    SetIpsecSecurity	proc :VDS_OBJECT_ID, :ULONGLONG, :ptr
   .ends

endif

ifndef __IVdsDiskPartitionMF_INTERFACE_DEFINED__
define __IVdsDiskPartitionMF_INTERFACE_DEFINED__

DEFINE_IIDX(IVdsDiskPartitionMF, "538684e0-ba3d-4bc0-aca9-164aff85c2a9")

.comdef IVdsDiskPartitionMF : public IUnknown

    GetPartitionFileSystemProperties proc :ULONGLONG, :ptr
    GetPartitionFileSystemTypeName proc :ULONGLONG, :ptr
    QueryPartitionFileSystemFormatSupport proc :ULONGLONG
    FormatPartitionEx	proc :ULONGLONG, :LPWSTR, :USHORT, :ULONG, :LPWSTR, :BOOL, :BOOL, :BOOL, :ptr
   .ends

endif

ifndef __IVdsVolumeMF_INTERFACE_DEFINED__
define __IVdsVolumeMF_INTERFACE_DEFINED__

DEFINE_IIDX(IVdsVolumeMF, "ee2d5ded-6236-4169-931d-b9778ce03dc6")

.comdef IVdsVolumeMF : public IUnknown

    GetFileSystemProperties proc :ptr
    Format		proc :VDS_FILE_SYSTEM_TYPE, :LPWSTR, :DWORD, :BOOL, :BOOL, :BOOL, :ptr
    AddAccessPath	proc :LPWSTR
    QueryAccessPaths	proc
    QueryReparsePoints	proc
    DeleteAccessPath	proc
    Mount		proc
    Dismount		proc :BOOL, :BOOL
    SetFileSystemFlags	proc :ULONG
    ClearFileSystemFlags proc :ULONG
   .ends

endif

ifndef __IVdsVolumeMF2_INTERFACE_DEFINED__
define __IVdsVolumeMF2_INTERFACE_DEFINED__

DEFINE_IIDX(IVdsVolumeMF2, "4dbcee9a-6343-4651-b85f-5e75d74d983c")

.comdef IVdsVolumeMF2 : public IUnknown

    GetFileSystemTypeName proc :ptr
    QueryFileSystemFormatSupport proc
    FormatEx		proc :LPWSTR, :USHORT, :ULONG, :LPWSTR, :BOOL, :BOOL, :BOOL, :ptr
   .ends

endif

ifndef __IVdsVolumeShrink_INTERFACE_DEFINED__
define __IVdsVolumeShrink_INTERFACE_DEFINED__

DEFINE_IIDX(IVdsVolumeShrink, "d68168c9-82a2-4f85-b6e9-74707c49a58f")

.comdef IVdsVolumeShrink : public IUnknown

    QueryMaxReclaimableBytes proc :ptr
    Shrink		proc :ULONGLONG, :ULONGLONG, :ptr
   .ends

endif

ifndef __IVdsSubSystemImportTarget_INTERFACE_DEFINED__
define __IVdsSubSystemImportTarget_INTERFACE_DEFINED__

DEFINE_IIDX(IVdsSubSystemImportTarget, "83bfb87f-43fb-4903-baa6-127f01029eec")

.comdef IVdsSubSystemImportTarget : public IUnknown

    GetImportTarget	proc :ptr
    SetImportTarget	proc :LPWSTR
   .ends

endif

ifndef __IVdsIscsiPortalLocal_INTERFACE_DEFINED__
define __IVdsIscsiPortalLocal_INTERFACE_DEFINED__

DEFINE_IIDX(IVdsIscsiPortalLocal, "ad837c28-52c1-421d-bf04-fae7da665396")

.comdef IVdsIscsiPortalLocal : public IUnknown

    SetIpsecSecurityLocal proc :ULONGLONG, :ptr
   .ends

endif

ifndef __IVdsServiceSAN_INTERFACE_DEFINED__
define __IVdsServiceSAN_INTERFACE_DEFINED__

DEFINE_IIDX(IVdsServiceSAN, "FC5D23E8-A88B-41a5-8DE0-2D2F73C5A630")

.comdef IVdsServiceSAN : public IUnknown

    GetSANPolicy	proc :ptr
    SetSANPolicy	proc :VDS_SAN_POLICY
   .ends

endif

ifndef __IVdsVolumeMF3_INTERFACE_DEFINED__
define __IVdsVolumeMF3_INTERFACE_DEFINED__

DEFINE_IIDX(IVdsVolumeMF3, "6788FAF9-214E-4b85-BA59-266953616E09")

.comdef IVdsVolumeMF3 : public IUnknown

    QueryVolumeGuidPathnames proc
    FormatEx2		proc :LPWSTR, :USHORT, :ULONG, :LPWSTR, :DWORD, :ptr
    OfflineVolume	proc
   .ends

endif

ifndef __IVdsDiskPartitionMF2_INTERFACE_DEFINED__
define __IVdsDiskPartitionMF2_INTERFACE_DEFINED__

DEFINE_IIDX(IVdsDiskPartitionMF2, "9CBE50CA-F2D2-4bf4-ACE1-96896B729625")

.comdef IVdsDiskPartitionMF2 : public IUnknown

    FormatPartitionEx2	proc :ULONGLONG, :LPWSTR, :USHORT, :ULONG, :LPWSTR, :DWORD, :ptr
   .ends

endif

ifndef __IVdsServiceSw_INTERFACE_DEFINED__
define __IVdsServiceSw_INTERFACE_DEFINED__

DEFINE_IIDX(IVdsServiceSw, "15fc031c-0652-4306-b2c3-f558b8f837e2")

.comdef IVdsServiceSw : public IUnknown

    GetDiskObject	proc :LPCWSTR, :ptr
   .ends

endif

endif ;; WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
endif ;; __vds_h__
