What is Image Mastering API V2.0 (IMAPIv2.0) and how to use it?
Image Mastering API V2.0 (IMAPIv2.0) is a Microsoft Windows API that enables applications to stage and burn images to CD, DVD, and Blu-ray optical storage media. It also supports other disc-like media that lay images in the same manner.
IMAPIv2.0 was released on June 26, 2007 for Windows XP and Windows Server 2003 as an update package[^2^]. It is supported natively starting with Windows Vista and Windows Server 2008[^1^].
Image Mastering API V2.0 (IMAPIv
Download Zip
https://t.co/3hV1D1E1ZB
To use IMAPIv2.0, you need to have a compatible optical drive and media, and install the appropriate update package for your operating system. You also need to have some knowledge of CD, DVD, and Blu-ray technologies and file systems.
IMAPIv2.0 provides a set of interfaces and programming elements that allow developers to create applications that can stage and burn images to optical media. You can use C/C++, C#, Visual Basic, or VBScript to write your applications using IMAPIv2.0[^1^].
Some of the key features of IMAPIv2.0 are:
Support for CD-R, CD-RW, DVD-R, DVD-RW, DVD+R, DVD+RW, DVD-RAM, DVD+R DL (Double Layer), BD-R (Blu-ray Disc Recordable), and BD-RE (Blu-ray Disc Rewritable) media types.
Support for ISO 9660, Joliet, UDF 1.02, UDF 1.50, UDF 2.00, UDF 2.01, and UDF 2.50 file systems.
Support for bootable discs, multisession discs, and mixed-mode discs.
Support for staging files from multiple sources, including local files, network files, streams, and memory buffers.
Support for verifying the integrity of the staged image before burning.
Support for event-driven progress notification and cancellation.
Support for querying the capabilities and features of the optical drive and media.
For more information about IMAPIv2.0, you can refer to the following resources:
Image Mastering API (IMAPI.h) - Win32 apps | Microsoft Learn
Description of the Image Mastering API v2.0 (IMAPIv2.0) update package that is dated June 26, 2007 - Microsoft Support
Description of the Image Mastering API v2.0 (IMAPIv2.0) update package that is dated June 26, 2007 - Microsoft Knowledge Base
How to write a simple application using IMAPIv2.0?
In this section, we will show you how to write a simple application using IMAPIv2.0 that can stage and burn an ISO image to a CD-R disc. We will use C# as the programming language and Visual Studio as the development environment.
Before you start, make sure you have the following prerequisites:
A compatible optical drive and a blank CD-R disc.
The IMAPIv2.0 update package installed on your Windows XP or Windows Server 2003 machine, or a Windows Vista or Windows Server 2008 machine.
An ISO image file that you want to burn to the disc.
Visual Studio 2005 or later installed on your machine.
Follow these steps to create and run the application:
Open Visual Studio and create a new Windows Forms Application project. Name it IMAPIv2Demo.
Add a reference to the IMAPIv2 interop assembly by right-clicking on the References node in the Solution Explorer and selecting Add Reference. In the COM tab, find and select Microsoft IMAPI2 v1.0 Type Library and click OK.
Add a button control to the form and name it btnBurn. Change its Text property to Burn Image.
Double-click on the button control to generate its click event handler in the code-behind file.
In the click event handler, add the following code to create an instance of the MsftDiscMaster2 class, which represents a collection of optical drives on the system:
// Create an instance of MsftDiscMaster2
MsftDiscMaster2 discMaster = new MsftDiscMaster2();
Add the following code to check if there is at least one optical drive on the system and if it supports recording:
// Check if there is at least one optical drive
if (discMaster.Count == 0)
MessageBox.Show("No optical drives found.");
return;
// Check if the first drive supports recording
string uniqueRecorderId = discMaster[0];
MsftDiscRecorder2 discRecorder = new MsftDiscRecorder2();
discRecorder.InitializeDiscRecorder(uniqueRecorderId);
if (!discRecorder.SupportedFeaturePages.Contains(IMAPI_FEATURE_PAGE_TYPE.IMAPI_FEATURE_PAGE_TYPE_PROFILE_LIST))
MessageBox.Show("The drive does not support recording.");
return;
Add the following code to create an instance of the MsftFileSystemImage class, which represents an ISO image file system:
// Create an instance of MsftFileSystemImage
MsftFileSystemImage fileSystemImage = new MsftFileSystemImage();
fileSystemImage.ChooseImageDefaultsForMediaType(IMAPI_MEDIA_PHYSICAL_TYPE.IMAPI_MEDIA_TYPE_CDR);
Add the following code to specify the path of the ISO image file that you want to burn to the disc. You can change this path according to your own file location:
// Specify the path of the ISO image file
string isoPath = "C:\Temp\test.iso";
Add the following code to load the ISO image file into the file system object:
// Load the ISO image file into the file system object
fileSystemImage.Root.AddTree(isoPath, false);
35727fac0c