' ########################################################################################
' Microsoft Windows
' File: vdslun.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_vdslun_PBI)
#DEFINE PBX_vdslun_PBI
%EQUATE `VDSLUN_INC = 1
' /* header files for imported files */
#INCLUDE ONCE "Legacy/COM/OAIdl.inc"
#INCLUDE ONCE "Legacy/COM/OCIdl.inc"
' enum VDS_STORAGE_IDENTIFIER_CODE_SET
%EQUATE `VDSStorageIdCodeSetReserved = 0
%EQUATE `VDSStorageIdCodeSetBinary = 1
%EQUATE `VDSStorageIdCodeSetAscii = 2
%EQUATE `VDSStorageIdCodeSetUtf8 = 3
' enum VDS_STORAGE_IDENTIFIER_TYPE
%EQUATE `VDSStorageIdTypeVendorSpecific = 0
%EQUATE `VDSStorageIdTypeVendorId = 1
%EQUATE `VDSStorageIdTypeEUI64 = 2
%EQUATE `VDSStorageIdTypeFCPHName = 3
%EQUATE `VDSStorageIdTypePortRelative = 4
%EQUATE `VDSStorageIdTypeTargetPortGroup = 5
%EQUATE `VDSStorageIdTypeLogicalUnitGroup = 6
%EQUATE `VDSStorageIdTypeMD5LogicalUnitIdentifier = 7
%EQUATE `VDSStorageIdTypeScsiNameString = 8
' enum VDS_STORAGE_BUS_TYPE
%EQUATE `VDSBusTypeUnknown = 0
%EQUATE `VDSBusTypeScsi = &H1
%EQUATE `VDSBusTypeAtapi = &H2
%EQUATE `VDSBusTypeAta = &H3
%EQUATE `VDSBusType1394 = &H4
%EQUATE `VDSBusTypeSsa = &H5
%EQUATE `VDSBusTypeFibre = &H6
%EQUATE `VDSBusTypeUsb = &H7
%EQUATE `VDSBusTypeRAID = &H8
%EQUATE `VDSBusTypeiScsi = &H9
%EQUATE `VDSBusTypeSas = &Ha
%EQUATE `VDSBusTypeSata = &Hb
%EQUATE `VDSBusTypeSd = &Hc
%EQUATE `VDSBusTypeMmc = &Hd
%EQUATE `VDSBusTypeMax = &He
%EQUATE `VDSBusTypeFileBackedVirtual = &Hf
%EQUATE `VDSBusTypeMaxReserved = &H7f
' // Size = 16 bytes
TYPE VDS_STORAGE_IDENTIFIER DWORD
 m_CodeSet AS LONG ' VDS_STORAGE_IDENTIFIER_CODE_SET
 m_Type AS LONG ' VDS_STORAGE_IDENTIFIER_TYPE
 m_cbIdentifier AS DWORD ' ULONG
 m_rgbIdentifier AS BYTE PTR ' BYTE*
END TYPE
' // Size = 12 bytes
TYPE VDS_STORAGE_DEVICE_ID_DESCRIPTOR
 m_version AS DWORD ' ULONG
 m_cIdentifiers AS DWORD ' ULONG
 m_rgIdentifiers AS VDS_STORAGE_IDENTIFIER PTR ' VDS_STORAGE_IDENTIFIER*
END TYPE
' enum VDS_INTERCONNECT_ADDRESS_TYPE
%EQUATE `VDS_IA_UNKNOWN = 0
%EQUATE `VDS_IA_FCFS = 1
%EQUATE `VDS_IA_FCPH = 2
%EQUATE `VDS_IA_FCPH3 = 3
%EQUATE `VDS_IA_MAC = 4
%EQUATE `VDS_IA_SCSI = 5
' // Size = 20 bytes
TYPE VDS_INTERCONNECT DWORD
 m_addressType AS LONG ' VDS_INTERCONNECT_ADDRESS_TYPE
 m_cbPort AS DWORD ' ULONG
 m_pbPort AS BYTE PTR ' BYTE*
 m_cbAddress AS DWORD ' ULONG
 m_pbAddress AS BYTE PTR ' BYTE*
END TYPE
' // Size = 68 bytes
TYPE VDS_LUN_INFORMATION DWORD FILL
 m_version AS DWORD ' ULONG
 m_DeviceType AS BYTE ' BYTE
 m_DeviceTypeModifier AS BYTE ' BYTE
 m_bCommandQueueing AS LONG
 m_BusType AS LONG ' VDS_STORAGE_BUS_TYPE
 m_szVendorId AS ASCIIZ PTR ' char*
 m_szProductId AS ASCIIZ PTR ' char*
 m_szProductRevision AS ASCIIZ PTR ' char*
 m_szSerialNumber AS ASCIIZ PTR ' char*
 m_diskSignature AS GUID ' GUID
 m_deviceIdDescriptor AS VDS_STORAGE_DEVICE_ID_DESCRIPTOR
 m_cInterconnects AS DWORD ' ULONG
 m_rgInterconnects AS VDS_INTERCONNECT PTR ' VDS_INTERCONNECT*
END TYPE
%EQUATE `VER_VDS_LUN_INFORMATION = 1
#ENDIF
