Hi,
I have been using the IMAPI2 API to format DVD-RAMs, and am stuck on a lot of problems:
Firstly, I am working with IMAPIv2 installed on Windows XP SP2. My client application is a managed .net 2.0 application, which accesses the IMAPI API through COM imports.
The wrapper code is borrowed from the folowing codeproject location: http://www.codeproject.com/KB/miscctrl/imapi2.aspx
Now, I have been trying to achieve the following:
- Format a DVD-RAM.
- The format of the DVD-RAM should be UDF 2.0 (UDFFS20)
- The DVD-RAM, after formatting as above, should allow files to be dragged and dropped on the fly like a hard disk, and not like a conventional DVD-RW (Disc at once).
My experiments have produced the following results:
- I have been able to "Erase" a DVD-RAM through the following piece of code:
MsftDiscRecorder2 discRecorder = new MsftDiscRecorder2(); MsftDiscFormat2Erase discFormatErase = new MsftDiscFormat2Erase(); discFormatErase.Recorder = discRecorder; discFormatErase.EraseMedia();
Result: This gives me a DVD-RAM with the File system as "RAW".
- The MsftDiscFormat2Erase does not allow specifying a File System while erasing, therefore, to achieve (2), I "Erased" the DVD-RAM (as above) and wrote an empty UDF File system on the DVD-RAM with the following piece of code:
MsftFileSystemImage fileSystemImage = new MsftFileSystemImage(); fileSystemImage.ChooseImageDefaults(discRecorder); fileSystemImage.FileSystemsToCreate = FsiFileSystems.FsiFileSystemUDF; // FsiFileSystems.FsiFileSystemUDF = 4 IStream fileSystem = fileSystemImage.CreateResultImage().ImageStream; discFormatData.ForceOverwrite = true; discFormatData.Write(fileSystem);
Result: This gives me a DVD-RAM formatted with UDF filesystem. (I suspect this is UDF 1.02) There is no way I can format the DVD-RAM with UDF 2.0.
- Now, after doing all the above, the DVD-RAM does not allow me to add/delete files on the fly (like a hard disk).
Result: I am tearing my hair out.
I have the following questions for you guys: - Is what I want possible through IMAPIv2? - If yes, what am I doing wrong? (Any code samples would be welcome) - If no, does that mean that I will need to use something other than IMAPIv2? Any suggestions? - Would developing on Vista with IMAPIv2 make any difference?
Regards, Santosh