IDiscMaster2 interface (imapi2.h)

Use this interface to enumerate the CD and DVD devices installed on the computer.

To create an instance of this interface, call the CoCreateInstance function. Use__uuidof(MsftDiscMaster2) for the class identifier and __uuidof(IDiscMaster2) for the interface identifier.


The IDiscMaster2 interface inherits from the IDispatch interface. IDiscMaster2 also has these types of members:


The IDiscMaster2 interface has these methods.


Retrieves a list of the CD and DVD devices installed on the computer.

Retrieves the number of the CD and DVD disc devices installed on the computer.

Retrieves a value that determines if the environment contains one or more optical devices and the execution context has permission to access the devices.

Retrieves the unique identifier of the specified disc device.


To create the MsftDiscMaster2 object in a script, use IMAPI2.MsftDiscMaster2 as the program identifier when calling CreateObject.

To receive notification when a device is added or removed from the computer, implement the DDiscMaster2Events interface.


Requirement Value
Minimum supported client Windows Vista, Windows XP with SP2 [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header imapi2.h