Live UDF
Hello There,
What is Live UDF?
Does the optical platform support third party UDF implementations?
How do we ensure compatibility of Live UDF with OSTA standard?
Rgds,
Hello There,
What is Live UDF?
Does the optical platform support third party UDF implementations?
How do we ensure compatibility of Live UDF with OSTA standard?
Rgds,
Hello, Atul Kulkarni,
(some details simplified for clarity)
"Live UDF" is another name for what is also known as "packet writing". It is basically the use of a normal file system to write to optical media. The usage model is very similar to floppy disk, USB Flash Drives, etc. -- you format the media, write files to it. There is a slight difference with optical in that you usually must "close" the disc before ejection.
The Optical Platform Group is currently focused on the "Mastering" type of writing to the media, where the files to be written and their full location can be determined prior to writing to any portion of the disc. When the writing starts, it continues until the full file system, files, etc. are all written to the media, which is then automatically "closed". This type of writing is most often used when compatibility with consumer electronics is required.
Windows Vista has both the "Live UDF" and "Mastering" support built-in with the product.
Hope that helps,
Henry Gabryjelski
I'm sorry to ask how about the 3rd party Live UDF software compatibility ?
Vista Beta2 Explorer seems to have some special checking which may prevent 3rd party Live UDF software from working correctly.
We do not perform any special checking to restrict 3rd party Live UDF software. Can you provide some context as to, what problem you experienced and what 3rd party application you were running when you experienced this problem?
Minway wrote:
I'm sorry to ask how about the 3rd party Live UDF software compatibility ?
Vista Beta2 Explorer seems to have some special checking which may prevent 3rd party Live UDF software from working correctly.
Is there any difference in APIs applications should use while accessing Live UDF? The Optical Platform Architecture does give that kind of impression. I assume that Live UDF also supports write for UDF 2.6 version?
Any ideas on this?
Thanks,
a
The Live UDF uses the standard IFS APIs.
It does not support writing for UDF 2.60 at this time. This is however a feature that the file system team is considering.
>>>
The usage model is very similar to floppy disk, USB Flash Drives, etc. -- you format the media, write files to it. There is a slight difference with optical in that you usually must "close" the disc before ejection.
<<<
I'm unable to find the APIs to do these things. Can you point me in the right direction please ? Read, write, etc. seems clearly done via the normal file APIs (ReadFile, CreateFile, etc.) But how do you format a DVD in Live UDF ? How do you close the disk ? And how do you eject it ? (I found an IOCTL for eject, but is there an easier way ?) How are these things done from a user level app ? Thanks.
Also, is there compatibility with Live UDF formats used by other apps, such as Roxio Drag-to-Disk ?
>>>
The Live UDF uses the standard IFS APIs.
<<<
Sorry, but what does IFS stand for, and where do I find documentation for it ? Thanks.
IFS stands for Installable File System. It is a system designed by Microsoft to uncouple the kernel from the file system(s) in Windows. It allows adding ("Installing") a new file system without touching the kernel.
It is documented in the MSDN library - see http://msdn2.microsoft.com/en-us/library/aa973515.aspx
The development kit for IFS is available within the Windows Vista WDK.
Thanks for your reply, David.
IFS then isn't what I need. My program is a user mode app, not a kernel driver. I posted the following (accidentally) into the middle of this thread. I repeat it here in a more appropriate place... Sorry for the redundancy...
>>>
The usage model is very similar to floppy disk, USB Flash Drives, etc. -- you format the media, write files to it. There is a slight difference with optical in that you usually must "close" the disc before ejection.
<<<
I'm unable to find the APIs to do these things. Can you point me in the right direction please ? Read, write, etc. seems clearly done via the normal file APIs (ReadFile, CreateFile, etc.) But how do you format a DVD in Live UDF ? How do you close the disk ? And how do you eject it ? (I found an IOCTL for eject, but is there an easier way ?) How are these things done from a user level app ? Thanks.
Also, is there compatibility with Live UDF formats used by other apps, such as Roxio Drag-to-Disk ?
*** end of repeat ***
I can see in Windows Explorer a way to manually format a DVD in Live UDF. But what I am looking for is a way I can do it via some API call from my user level program. The only format API I can find seems to only be used for floppy disks. I cannot find any API to close a UDF DVD, and the only eject method I can find requires an IOCTL. There seems to be little to no mention of Live UDF in the MSDN library, and no specific section regarding APIs for these things. Am I looking in the wrong place ? And IFS is definitely not it, because that's all kernel level stuff...
Basically, my (user level) app needs to access CD and DVD media "as if it were a hard drive". Until now, I've used Roxio Drag-to-Disk for this purpose. I assume, with Vista, this will no longer be necessary, and I can do everything I need without 3rd party software additions. I need to open and close the drive door, detect media type, erase and format media, close and eject disks, create, read, and write files. Can somebody tell me how this is done please ?
Ok, let me try to address some of your questions.
How do I format as a application?
Call the command prompt format command.
How do I open and close the door?
Use the IOCTL_STORAGE_EJECT_MEDIA and IOCTL_STORAGE_LOAD_MEDIA.
How do I detect media type?
My answer may not be the best, but I suggest using scsi pass through IOCTL to issue a Get Configuration command to the drive and deduce the current media type from the current profile. See ntddmmc.h in the WDK for definition of MMC structures and the MMC-5 document from www.t10.org
How do I erase a disc?
Check IMAPI2's IDiscFormat2Erase for rewritable CD and DVD erase.
How do I create, read and write files?
Use the standard Win32API like you would do on a floppy or hard disk.
Thank you very much, David !
Your answer confirms to me that I didn't overlook something. It's not exactly obvious how to do these things, and all of these somewhat related commands are well spread out all over the place. From IMAPI2, to SCSI pass through, to IOCTL, to even calling a DOS command line program, you can't get more spread out than that ! I'm happy to be able to do this at all, and am very glad to have received your reply. But I am also hoping that some enhancement can be made to this area in the future. It certainly could be easier to use and more "organized" with a small set of APIs to do this stuff.
The IOCTL for open and close door is what I'm already using. Works OK, and isn't too complicated.
I'm also currently using the SCSI pass through to determine media type. This, however, was way more complex than I thought. The MMC commands and so forth are only moderately complex. What was the hardest part is that I had to call many different commands to gather all of the data I need. It took me a good bit of trial and error to cobble together a bunch of commands that together reliably give me what I need. This is one area that I would very much like to see improved. To be able to call one API function and get back media type info would be great. The Win32 API already has such a command, but it is far from complete in this aspect.
The read/write/create files using the Win32 APIs was clear to me, and works well. Nothing more to say about that.
But to call the command line format command to format live UDF ? Ok, it will work, but it seems way yucky. Can I ask please then to know what API or IOCTL or whatever this command line program is using to do this ? What a DOS app can do, I can do too, no ? I think it would be far better to be able to make a direct call in my code than to bring up a DOS box and run 'format' in it. And I doubt that the amount of code involved here could be any harder than what I had to deal with for SCSI pass through ! If possible, please let me know how to do this. Thanks !
Also, one thing you didn't mention - how to close an optical disk from a user mode app ?
Cheers
BobN
Posting here to answer my own questions, somewhat, and to present these questions therefore in a different way...
I found the reg key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem\UdfsCloseSessionOnEject. This key is set via Windows Explorer in response to the checkbox the user can use to select/deselect close on eject. Presumably, I can twiddle this reg key in my program as desired in order to be able to eject UDF media with/without closing, using the IOCTL to actually eject the media. If this won't work, please advise.
I likewise found C:\Windows\System32\uudf.dll, which has some tantalizing exports named "Format" and "FormatEx". Can I please ask for the parameters to these functions, and thus be able to call this directly, rather than having to launch a command line window and invoke format.com ?
Thanks !