iDiscRecorder2 接口 (imapi2.h)

此接口表示物理设备。 使用此接口可以检索计算机上安装的 CD 和 DVD 设备的相关信息,并执行关闭托盘或弹出介质等操作。

若要创建此接口的实例,请调用 CoCreateInstance 函数。 Use__uuidof (类标识符的 MsftDiscRecorder2) ,接口标识符__uuidof (IDiscRecorder2) 。

继承

IDiscRecorder2 接口继承自 IDispatch 接口。 IDiscRecorder2 还具有以下类型的成员:

方法

IDiscRecorder2 接口包含以下方法。

 
IDiscRecorder2::AcquireExclusiveAccess

获取对设备的独占访问权限。
IDiscRecorder2::CloseTray

关闭媒体托盘。
IDiscRecorder2::D isableMcn

禁用设备的媒体更改通知 (MCN) 。
IDiscRecorder2::弹出媒体

从设备中弹出媒体。
IDiscRecorder2::EnableMcn

为设备启用媒体更改通知 (MCN) 。
IDiscRecorder2::get_ActiveDiscRecorder

检索用于初始化光盘设备的唯一标识符。
IDiscRecorder2::get_CurrentFeaturePages

检索标记为当前设备的功能页列表。
IDiscRecorder2::get_CurrentProfiles

检索标记为当前设备的所有 MMC 配置文件。
IDiscRecorder2::get_DeviceCanLoadMedia

确定设备是否可以弹出并随后重新加载媒体。
IDiscRecorder2::get_ExclusiveAccessOwner

检索对设备具有独占访问权限的客户端应用程序的名称。
IDiscRecorder2::get_LegacyDeviceNumber

检索 CD 或 DVD 设备的旧设备编号。
IDiscRecorder2::get_ProductId

检索设备的产品 ID。
IDiscRecorder2::get_ProductRevision

检索设备的产品修订代码。
IDiscRecorder2::get_SupportedFeaturePages

检索设备支持的功能列表。
IDiscRecorder2::get_SupportedModePages

检索设备支持的 MMC 模式页的列表。
IDiscRecorder2::get_SupportedProfiles

检索设备支持的 MMC 配置文件的列表。
IDiscRecorder2::get_VendorId

检索设备的供应商 ID。
IDiscRecorder2::get_VolumeName

检索与设备关联的唯一卷名称。
IDiscRecorder2::get_VolumePathNames

检索设备的驱动器号和 NTFS 装入点的列表。
IDiscRecorder2::InitializeDiscRecorder

将 对象与指定的光盘设备相关联。
IDiscRecorder2::ReleaseExclusiveAccess

释放对设备的独占访问。

注解

若要在脚本中创建 MsftDiscRecorder2 对象,请使用 IMAPI2。调用 CreateObject 时,MsftDiscRecorder2 作为程序标识符。

若要将数据写入媒体,需要将记录器附加到格式编写器,例如,若要将记录器附加到数据编写器,请调用 IDiscFormat2Data::p ut_Recorder 方法。

此接口的多个属性返回由多媒体命令 (MMC) 定义的数据包数据。 有关数据包数据格式的信息,请参阅 ftp://ftp.t10.org/t10/drafts/mmc5 上的最新 MMC 规范修订版。

要求

   
最低受支持的客户端 Windows Vista、Windows XP SP2 [仅限桌面应用]
最低受支持的服务器 Windows Server 2003 [仅限桌面应用]
目标平台 Windows
标头 imapi2.h

另请参阅

IDiscRecorder2Ex