Windows desktop applications
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

VDS Notifications

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

A provider can send an event notification to VDS, and VDS can in turn forward the notification to applications. The notification model that is used by VDS resembles the connection-point model that is used by COM objects.

VDS generates service notifications for events such as a drive letter assignment or the arrival of an unallocated disk. Once VDS allocates a disk to a provider, the provider is responsible for generating the associated notifications. The illustration that follows shows the interfaces and methods used in the VDS notification model.

Aa383400.vdsnotification(en-us,VS.85).png

To receive notifications, VDS registers its IVdsAdviseSink interface with the provider object by calling the IVdsProviderPrivate::OnLoad method and passing a pointer to the interface. When a notification event occurs, such as the arrival of a new volume or drive, the provider passes the appropriate notification structure to VDS as an IVdsAdviseSink::OnNotify method parameter.

The process is similar between an application and VDS. Specifically, to receive notifications, an application registers its IVdsAdviseSink interface with VDS by calling the IVdsService::Advise method and passing a pointer to the interface. When VDS receives a notification from a provider, it passes the appropriate notification structure to registered applications as an IVdsAdviseSink::OnNotify method parameter.

Note  An application that calls Advise must eventually call the IVdsService::Unadvise method. Ideally, it should call Unadvise as soon as it no longer needs to receive notifications.
 

The table that follows lists the provider-generated notifications by object type.

ObjectNotificationValueLink to event description
PackVDS_NF_PACK_ARRIVE1 VDS_PACK_NOTIFICATION
PackVDS_NF_PACK_DEPART2 VDS_PACK_NOTIFICATION
PackVDS_NF_PACK_MODIFY3 VDS_PACK_NOTIFICATION
VolumeVDS_NF_VOLUME_ARRIVE4 VDS_VOLUME_NOTIFICATION
VolumeVDS_NF_VOLUME_DEPART5 VDS_VOLUME_NOTIFICATION
VolumeVDS_NF_VOLUME_MODIFY6 VDS_VOLUME_NOTIFICATION
VolumeVDS_NF_VOLUME_REBUILDING_PROGRESS7 VDS_VOLUME_NOTIFICATION
DiskVDS_NF_DISK_ARRIVE8 VDS_DISK_NOTIFICATION
DiskVDS_NF_DISK_DEPART9 VDS_DISK_NOTIFICATION
DiskVDS_NF_DISK_MODIFY10 VDS_DISK_NOTIFICATION
PartitionVDS_NF_PARTITION_ARRIVE11 VDS_PARTITION_NOTIFICATION
PartitionVDS_NF_PARTITION_DEPART12 VDS_PARTITION_NOTIFICATION
PartitionVDS_NF_PARTITION_MODIFY13 VDS_PARTITION_NOTIFICATION
SubsystemVDS_NF_SUB_SYSTEM_ARRIVE101 VDS_SUB_SYSTEM_NOTIFICATION
SubsystemVDS_NF_SUB_SYSTEM_DEPART102 VDS_SUB_SYSTEM_NOTIFICATION
SubsystemVDS_NF_SUB_SYSTEM_MODIFY151 VDS_SUB_SYSTEM_NOTIFICATION
ControllerVDS_NF_CONTROLLER_ARRIVE103 VDS_CONTROLLER_NOTIFICATION
ControllerVDS_NF_CONTROLLER_DEPART104 VDS_CONTROLLER_NOTIFICATION
ControllerVDS_NF_CONTROLLER_MODIFY350 VDS_CONTROLLER_NOTIFICATION
ControllerVDS_NF_CONTROLLER_REMOVED351 VDS_CONTROLLER_NOTIFICATION
PortVDS_NF_PORT_MODIFY352 VDS_PORT_NOTIFICATION
PortVDS_NF_PORT_REMOVED353 VDS_PORT_NOTIFICATION
DriveVDS_NF_DRIVE_ARRIVE105 VDS_DRIVE_NOTIFICATION
DriveVDS_NF_DRIVE_DEPART106 VDS_DRIVE_NOTIFICATION
DriveVDS_NF_DRIVE_MODIFY107 VDS_DRIVE_NOTIFICATION
DriveVDS_NF_DRIVE_REMOVED354 VDS_DRIVE_NOTIFICATION
LUNVDS_NF_LUN_ARRIVE108 VDS_LUN_NOTIFICATION
LUNVDS_NF_LUN_DEPART109 VDS_LUN_NOTIFICATION
LUNVDS_NF_LUN_MODIFY110 VDS_LUN_NOTIFICATION

 

VDS generates the remaining notifications. The following table lists service-based notification constants by category.

CategoryNotificationValueLink to event description
DiskVDS_NF_DISK_ARRIVE8 VDS_DISK_NOTIFICATION
DiskVDS_NF_DISK_DEPART9 VDS_DISK_NOTIFICATION
DiskVDS_NF_DISK_MODIFY10 VDS_DISK_NOTIFICATION
Drive letterVDS_NF_DRIVE_LETTER_FREE201 VDS_DRIVE_LETTER_NOTIFICATION
Drive letterVDS_NF_DRIVE_LETTER_ASSIGN202 VDS_DRIVE_LETTER_NOTIFICATION
File systemVDS_NF_FILE_SYSTEM_MODIFY203 VDS_FILE_SYSTEM_NOTIFICATION
File systemVDS_NF_FILE_SYSTEM_FORMAT_PROGRESS204 VDS_FILE_SYSTEM_NOTIFICATION
VolumeVDS_NF_MOUNT_POINTS_CHANGE205 VDS_MOUNT_POINT_NOTIFICATION

 

Related topics

VDS Object Model
IVdsAdviseSink
IVdsAdviseSink::OnNotify
IVdsProviderPrivate::OnLoad
IVdsService::Advise

 

 

Community Additions

Show:
© 2016 Microsoft