Adding Storage Management abilities to your Windows application using VDS (Virtual Disk Service)

If you’re writing a Windows application that needs to do storage management, you should look into the VDS (Virtual Disk Services) API.
VDS storage management includes abilities like enumerating all HBAs on a system, creating a LUN, setting a disk online, formatting a volume or adding a drive letter to it.

For those not familiar with VDS, start by looking at an overview I posted at
To understand the VDS architecture from a developer’s perspective and get an overview of the VDS Interfaces, check this VDS reference from TechNet at
Once you need to start looking at the details on each interface, the best reference is the "Virtual Disk Service Programming Guide" documentation available on MSDN.
This includes a complete reference of all constants, data types, enumerations, interfaces, structures and error codes used by VDS.
The main page is

There you will also find some code samples:

There are also a few pages with instructions on how to use the VDS model, although they do not really include code samples:

Note that these are Win32 APIs. If you writing managed code, you will need to create a wrapper using p/Invoke.
There’s a good description on how to do that at

Keep in mind that you can use the VDS API to query and configure both local disks or RAID subsystems like an external disk array.
However, for VDS to interact with those RAID subsystems, you will need additional software provided by the hardware vendor called a VDS Hardware Provider.
All major storage vendors will typically offer a provider and the latest Windows Logo Kit (WLK) includes a VDS Hardware Provider test.

To get a list of Microsoft Storage Partners currently using VDS technology, follow these steps: