The EnumBackups method enumerates metabase backups stored in one or more backup locations, retrieving the location, version number, and date of each backup.

HRESULT EnumBackups(
  BSTR  bstrLocation,
  LONG  lIndex,
  VARIANT*  pvVersion,
  VARIANT*  pvLocations,
  VARIANT*  pvDate


  • bstrLocation
    [in] String containing the location. If an empty string is specified, all backup locations will be searched.

  • lIndex
    [in] Long integer containing the index of the backup to enumerate. Start the index at 0 and increment by 1 until MD_ERROR_DATA_NOT_FOUND (0x800CC801L) is returned. This constant is defined in the Mdmsg.h header file.

  • pvVersion
    [out] Pointer to a VARIANT containing the version number of the backup enumerated.

  • pvLocations
    [out] Pointer to a VARIANT containing the backup location of the backup enumerated.

  • pvDate
    [out] Pointer to a VARIANT containing the date and time of the backup, in Coordinated Universal Time (UTC), formerly GMT (Greenwich Mean Time).


Client: Requires Windows XP Professional, Windows 2000 Professional, or Windows NT Workstation 4.0.

Server: Requires Windows Server 2003, Windows 2000 Server, or Windows NT Server 4.0.

Product: IIS

Header: Declared in iiisext.h; include iisext_i.c.

Return Value

Returns an HRESULT that contains one of the following values, or any errors from the file system converted to HRESULT.




Specified name is invalid.


No more items to enumerate.


Insufficient memory to perform the operation.


The method succeeded.

See Also


IIS ADSI Provider Interfaces

Using ADSI to Configure IIS in a C++ Application

IIS Constants and Header Files

IISComputer2 Interface