Startup and Service Objects

[Beginning with Windows 8 and Windows Server 2012, the Virtual Disk Service COM interface is superseded by the Windows Storage Management API.]

VDS provides objects for performing service-related activities. This topic describes each object.

Service Loader Object

The service loader object provides the methods that are used by applications to load and initialize VDS. To prepare VDS for use, an application must perform the following operations:

For a code example, see Loading VDS.

Always allow the service to initialize completely before calling the methods that are exposed by the service object. Use the IVdsService::IsServiceReady method to determine the status of the load process. Use the IVdsService::WaitForServiceReady method to block calls to VDS objects until the initialization completes.

The following table lists related interfaces, enumerations, and structures.

Type Element
Interfaces that are always exposed by this object IVdsServiceLoader.
Associated enumerations None.
Associated structures None.

 

Service Object

The service object is a multifunctional object that is central to all VDS applications. With this object, a caller can perform the following operations:

  • Determine the status of the service initialization.
  • Retrieve all hardware or software providers registered with VDS.
  • Report on unallocated disks.
  • Return the file system type and drive letter associated with volumes on a disk.
  • Remove unused user-mode paths and mounted folders from the registry and refresh disks.
  • Receive VDS notifications.
  • Reboot the host.
  • Retrieve Fibre Channel HBA ports or iSCSI initiator adapters on the local computer.
  • Safely prepare LUNs exposed as disks on the local computer for removal.

VDS notification structures pass object GUIDs to all applications that are registered with VDS to receive notifications. Use the IVdsService::GetObject method to convert an object GUID to an object pointer. For a more complete description of the notification model, see VDS Notifications.

The following table lists related interfaces, enumerations, and structures.

Type Element
Interfaces that are always exposed by this object IVdsService, IVdsServiceHba*, IVdsServiceIscsi*, IVdsServiceUninstallDisk*.
Interfaces that are always implemented but not exposed to applications IVdsAdmin
Associated enumerations VDS_QUERY_PROVIDER_FLAG, VDS_OBJECT_TYPE, VDS_SERVICE_FLAG, VDS_DRIVE_LETTER_FLAG, VDS_FILE_SYSTEM_FLAG, VDS_FILE_SYSTEM_PROP_FLAG.
Associated structures VDS_SERVICE_PROP, VDS_FILE_SYSTEM_PROP, VDS_FILE_SYSTEM_TYPE_PROP, VDS_DRIVE_LETTER_NOTIFICATION, VDS_FILE_SYSTEM_NOTIFICATION, VDS_MOUNT_POINT_NOTIFICATION.

 

*Windows Server 2003: These interfaces are not supported until Windows Server 2003 R2.

Initiator Adapter Object

An initiator adapter object models an iSCSI initiator adapter on the host machine of the VDS service. The VDS service can only view initiator adapters on the local machine. The role of an initiator adapter object is for managing login sessions from the local computer to iSCSI targets.

The following table lists related interfaces, enumerations, and structures.

Type Element
Interfaces that are always exposed by this object IVdsIscsiInitiatorAdapter*.
Associated enumerations VDS_ISCSI_LOGIN_TYPE. VDS_ISCSI_LOGIN_FLAG, VDS_ISCSI_AUTH_TYPE.
Associated structures VDS_ISCSI_INITIATOR_ADAPTER_PROP.

 

*Windows Server 2003: This interface is not supported until Windows Server 2003 R2.

Initiator Portal Object

An initiator portal object models an iSCSI initiator portal on an iSCSI initiator. An initiator portal is the combination of an IP address and port through which a host computer connects to a portal on an iSCSI subsystem. The role of an initiator portal object is to serve as one of the endpoints of an MPIO path and to configure IPSEC security settings.

The following table lists the related interfaces, enumerations, and structures.

Type Element
Interfaces that are always exposed by this object IVdsIscsiInitiatorPortal*.
Associated enumerations VDS_ISCSI_IPSEC_FLAG.
Associated structures VDS_ISCSI_INITIATOR_PORTAL_PROP, VDS_ISCSI_IPSEC_KEY, VDS_IPADDRESS.

 

*Windows Server 2003: This interface is not supported until Windows Server 2003 R2.

HBA Port Object

The HBA port object models a Fibre Channel host bus adapter (HBA) port.

Use the IVdsServiceHba::QueryHbaPorts method to determine the HBA ports that are known to VDS on the local computer.

The following table lists the related interfaces, enumerations, and structures.

Type Element
Interfaces that are always exposed by this object IVdsHbaPort*.
Associated enumerations VDS_HBAPORT_TYPE, VDS_HBAPORT_STATUS, VDS_HBAPORT_SPEED_FLAG.
Associated structures VDS_HBAPORT_PROP.

 

*Windows Server 2003: This interface is not supported until Windows Server 2003 R2.

VDS Object Model

IVdsServiceLoader::LoadService

Loading VDS

IVdsService::GetObject

VDS Notifications