The EnumAvailableMedia method returns a QueryResults object enumerating media visible by the referenced server running Microsoft® SQL Server™.
object.EnumAvailableMedia( [ MediaType ] ) as QueryResults
Part | Description |
---|---|
object | Expression that evaluates to an object in the Applies To list |
MediaType | Long integer optionally restricting output as described in Settings |
Constant | Value | Description |
---|---|---|
SQLDMOMedia_All | 15 | Default. List all media. |
SQLDMOMedia_CDROM | 8 | List visible CD-ROM devices. |
SQLDMOMedia_FixedDisk | 2 | List visible fixed disk drive devices. |
SQLDMOMedia_Floppy | 1 | List visible floppy disk drive devices. |
SQLDMOMedia_Tape | 4 | List visible tape devices. |
A QueryResults object containing one result set defined by these columns.
Column | Data type | Description |
---|---|---|
name | nvarchar(256) | Mapped name of the media. |
low free | integer | Interpreted as an unsigned value. Low-order doubleword of available media resource. |
high free | integer | Interpreted as an unsigned value. High order doubleword of available media resource. |
media type | tinyint | Interpreted by using the SQL-DMO enumerated data type SQLDMO_MEDIA_TYPE. |
HRESULT EnumAvailableMedia(
LPSQLDMOQUERYRESULTS* ppResults,
SQLDMO_MEDIA_TYPE MediaType = SQLDMOMedia_All);