Volume Shadow Copy SDK


The typical method of accessing Volume Shadow Copy functionality is to use the WMI classes (listed below) but if you are a hardware vendor or just like writing device drivers then you will want access to the direct Win32 calls and I just tracked down the process to get the SDK for the Volume Shadow Copy API’s; specifically the calls in vssapi.dll such as:

  • CreateVssBackupComponents()
  •  GetCurrentVolumeCount()
  •  GetCurrentVolumeArray()

And thought i should do a blog entry as the task wouldn’t have been easy without the ability to see who at Microsoft owned this dll (Turned out it was the very helpful Keith Hageman http://msdn.microsoft.com/chats/transcripts/enterprise/windows_081804.aspx)

The original method was to send email to vssapi@microsoft.com and request a copy which still works and “If” you know the VSSAPI email address( i just did a search and it came up only 6 times on the whole internet i.e. NOT very well known).  The new method which is much easier and more discoverable which is to sign up for membership at: www.microsoftstoragepartners.com

Hope this helps somebody!

Chuck

WMI classes:

Win32_ShadowBy
Win32_ShadowContext
Win32_ShadowCopy
Win32_ShadowDiffVolumeSupport
Win32_ShadowFor
Win32_ShadowOn
Win32_ShadowStorage
Win32_ShadowVolumeSupport
Win32_Volume


Comments (4)

  1. Adi Oltean says:

    Just a correction – GetVolumeCount/GetVolumeArray are implemented by the sample code. The volumes are added to the shadow copy through the AddToSnapshotSet API.

    The complete sequence of APIs to create a shadow copy set is more complicated – see the create.cpp in the VSHADOW sample code.

    The pointer to the MSDN documentation for the VSS API is here:

    http://msdn.microsoft.com/library/en-us/vss/base/vss_portal.asp

    The pointer to the downloadable VSS SDK is here.

    http://www.microsoft.com/downloads/details.aspx?familyid=0b4f56e4-0ccc-4626-826a-ed2c4c95c871&displaylang=en

    This SDK also contains the latest VSHADOW sample code. Note that the http://www.microsoftstoragepartners.com contains the old (and deprecated) 7.0 SDK.

    Thanks, Adi

  2. Adi Oltean says:

    In my previous post I indicated that GetCurrentVolumeCount is implemented by the sample code – AFAIK this is used in the old VSREQ VSS sample. This method is also implemented in the CVssWriter class which is part of the VSS API.