Virtual CD-R or CD-RW on Win2K

I have a working read-only virtual CD driver.
Now, I’d like to also make it writable. I’m having difficulties finding
technical documentation on how to achieve this.

I currently do a IoCreateDevice with FILE_DEVICE_CD_ROM with
characteristics of “FILE_REMOVABLE_MEDIA”. I can’t get the system to send
me WRITE requests nor IOCTL_STORAGE_GET_MEDIA_TYPES_EX.

I could switch it to a DISK device, but I would like to keep the CD icon on
Explorer. Am I setting it up wrong? I think under XP, the system makes
calls to see if there’s a physical HW, but I don’t know about 2000.

Any ideas?


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

CDFS doesn’t support writing to CD Media and therefore will reject all
write requests.

Youssef.

-----Original Message-----
From: xxxxx@phoenix.com [mailto:xxxxx@phoenix.com]
Sent: Monday, August 13, 2001 9:15 AM
To: NT Developers Interest List
Subject: [ntdev] Virtual CD-R or CD-RW on Win2K

I have a working read-only virtual CD driver.
Now, I’d like to also make it writable. I’m having difficulties finding

technical documentation on how to achieve this.

I currently do a IoCreateDevice with FILE_DEVICE_CD_ROM with
characteristics of “FILE_REMOVABLE_MEDIA”. I can’t get the system to
send
me WRITE requests nor IOCTL_STORAGE_GET_MEDIA_TYPES_EX.

I could switch it to a DISK device, but I would like to keep the CD icon
on
Explorer. Am I setting it up wrong? I think under XP, the system makes

calls to see if there’s a physical HW, but I don’t know about 2000.

Any ideas?


You are currently subscribed to ntdev as: xxxxx@microsoft.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Could you suggest a solution?


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

There’s no other FILE_DEVICE_XXXX that would match a CD-R/W device.
How can I set up my device so it shows up as a CD and also get Write
requests?

Would I have to use a custom IOCTL interface for writing?
Do you know of any documentation that could help me in this field?
Can’t find much info on the DDK and MSDN doc.

thanks


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Brian,

One solution would be to write a Filesystem filter that sits on top of
your CDFS Volume Device Object and intercepts write requests (most
driver writer software does this, in fact, unless they have their own
Filesystem implementation).

Unfortunately implementing “write” properly in a filter driver is not an
easy task to do well. In general, writing is far more involved than just
reading because of all the obvious issues with file mappings, race
conditions, cached/uncached file objects that are open on the same file
stream and so on.

The simple answer is: as long as your driver sits under CDFS, no WRITE
IRPs will be passed down. Therefore, you need to catch them before the
filesystem does and route them to your driver in any way you deem
appropriate.

I know this is not an easy solution, but this is the only (legitimate)
solution I am aware of for a driver under CDFS.

-----Original Message-----
From: xxxxx@phoenix.com [mailto:xxxxx@phoenix.com]
Sent: Sunday, August 19, 2001 5:00 PM
To: NT Developers Interest List
Subject: [ntdev] RE: Virtual CD-R or CD-RW on Win2K

Could you suggest a solution?


You are currently subscribed to ntdev as: xxxxx@microsoft.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

A custom IOCTL interface would work, but you still would not be able to
see WRITE IRPs (which means you’d have to supply your own IOCTL-aware
software to write to your device, you can’t just “drag and drop” in
Windows Explorer). If you want info on how CDFS works, look at the IFS
kit which has the complete source.

Youssef.

-----Original Message-----
From: xxxxx@phoenix.com [mailto:xxxxx@phoenix.com]
Sent: Sunday, August 19, 2001 6:00 PM
To: NT Developers Interest List
Subject: [ntdev] RE: Virtual CD-R or CD-RW on Win2K

There’s no other FILE_DEVICE_XXXX that would match a CD-R/W device.
How can I set up my device so it shows up as a CD and also get Write
requests?

Would I have to use a custom IOCTL interface for writing?
Do you know of any documentation that could help me in this field?
Can’t find much info on the DDK and MSDN doc.

thanks


You are currently subscribed to ntdev as: xxxxx@microsoft.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com