Virtual CD/DVD device driver

Hi, I need to develop virtual CD/DVD device driver (to mount .ISO and other files), can anybody point me what kind of driver will suit my needs the best?

Thank you,
Roman

This is not a driver reference, but this will do what you want

http://blogs.msdn.com/doronh/archive/2006/05/16/599443.aspx

of course, you can’t distribute it but it certainly is useful for personal use.

d

– I can spell, I just can’t type.
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Roman Kudinov
Sent: Thursday, June 01, 2006 2:56 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Virtual CD/DVD device driver

Hi, I need to develop virtual CD/DVD device driver (to mount .ISO and other files),?can anybody point me what kind of driver will suit my needs the best?
?
?
Thank you,
Roman


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Roman Kudinov wrote:

Hi, I need to develop virtual CD/DVD device driver (to mount .ISO and
other files), can anybody point me what kind of driver will suit my
needs the best?

The best solution to your problem is to use one of the many well-tested
products which provide this function already, many of which are free.
IsoBuster, for example. Heck, Microsoft even supplies one.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Strange reply for the driver development group…

I doubt that there are drivers which come with source code and which can be
used in commercial software.

“Tim Roberts” ÓÏÏÂÝÉÌ/ÓÏÏÂÝÉÌÁ × ÎÏ×ÏÓÔÑÈ ÓÌÅÄÕÀÝÅÅ:
news:xxxxx@ntdev…
> Roman Kudinov wrote:
>
> > Hi, I need to develop virtual CD/DVD device driver (to mount .ISO and
> > other files), can anybody point me what kind of driver will suit my
> > needs the best?
>
>
> The best solution to your problem is to use one of the many well-tested
> products which provide this function already, many of which are free.
> IsoBuster, for example. Heck, Microsoft even supplies one.
>
> –
> Tim Roberts, xxxxx@probo.com
> Providenza & Boekelheide, Inc.
>
>

The bottom line is that this has already been done a lot. Yes you can roll
your own, take a look at the cdrom class driver in the DDK. But from a
business point of view, you are probably better off contacting one of the
firms (including OSR) that have already done one, and asking what it costs
to license the code. You are looking at a lot of work, that has already
been done before.


Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
http://www.windrvr.com
Remove StopSpam from the email to reply

“Roman Kudinov” wrote in message news:xxxxx@ntdev…
> Strange reply for the driver development group…
>
> I doubt that there are drivers which come with source code and which can
> be
> used in commercial software.
>
>
>
> “Tim Roberts” ÓÏÏÂÝÉÌ/ÓÏÏÂÝÉÌÁ × ÎÏ×ÏÓÔÑÈ ÓÌÅÄÕÀÝÅÅ:
> news:xxxxx@ntdev…
>> Roman Kudinov wrote:
>>
>> > Hi, I need to develop virtual CD/DVD device driver (to mount .ISO and
>> > other files), can anybody point me what kind of driver will suit my
>> > needs the best?
>>
>>
>> The best solution to your problem is to use one of the many well-tested
>> products which provide this function already, many of which are free.
>> IsoBuster, for example. Heck, Microsoft even supplies one.
>>
>> –
>> Tim Roberts, xxxxx@probo.com
>> Providenza & Boekelheide, Inc.
>>
>>
>
>
>

Not really.

Commercial software isn’t for fun, it’s supposed to make money (or help make money). You have consider the total cost of writing a driver, including designing, coding, some serious testing (including learning how to test it) and supporting it in the field.

You may find that it’s more cost effective to try and license an existing solution & include that in your product rather than trying to develop an entirely new driver (one which has been done before) from scratch. If you’re an experienced driver writer this probably isn’t the case. From your question I assumed this might be one of your first drivers.

-p

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Roman Kudinov
Sent: Friday, June 02, 2006 9:13 AM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] Virtual CD/DVD device driver

Strange reply for the driver development group…

I doubt that there are drivers which come with source code and which can be used in commercial software.

“Tim Roberts” ???/??? ? ??? ???:
news:xxxxx@ntdev…
> Roman Kudinov wrote:
>
> > Hi, I need to develop virtual CD/DVD device driver (to mount .ISO
> > and other files), can anybody point me what kind of driver will suit
> > my needs the best?
>
>
> The best solution to your problem is to use one of the many
> well-tested products which provide this function already, many of which are free.
> IsoBuster, for example. Heck, Microsoft even supplies one.
>
> –
> Tim Roberts, xxxxx@probo.com
> Providenza & Boekelheide, Inc.
>
>


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

My be you are right but, for example, OSR had some reason to develop own
driver though there are a lot of 3d party solutions :wink:

“Don Burn” ÓÏÏÂÝÉÌ/ÓÏÏÂÝÉÌÁ × ÎÏ×ÏÓÔÑÈ ÓÌÅÄÕÀÝÅÅ:
news:xxxxx@ntdev…
> The bottom line is that this has already been done a lot. Yes you can
roll
> your own, take a look at the cdrom class driver in the DDK. But from a
> business point of view, you are probably better off contacting one of the
> firms (including OSR) that have already done one, and asking what it costs
> to license the code. You are looking at a lot of work, that has already
> been done before.
>
>
> –
> Don Burn (MVP, Windows DDK)
> Windows 2k/XP/2k3 Filesystem and Driver Consulting
> http://www.windrvr.com
> Remove StopSpam from the email to reply
>
>
>
> “Roman Kudinov” wrote in message news:xxxxx@ntdev…
> > Strange reply for the driver development group…
> >
> > I doubt that there are drivers which come with source code and which can
> > be
> > used in commercial software.
> >
> >
> >
> > “Tim Roberts” ÓÏÏÂÝÉÌ/ÓÏÏÂÝÉÌÁ × ÎÏ×ÏÓÔÑÈ ÓÌÅÄÕÀÝÅÅ:
> > news:xxxxx@ntdev…
> >> Roman Kudinov wrote:
> >>
> >> > Hi, I need to develop virtual CD/DVD device driver (to mount .ISO and
> >> > other files), can anybody point me what kind of driver will suit my
> >> > needs the best?
> >>
> >>
> >> The best solution to your problem is to use one of the many well-tested
> >> products which provide this function already, many of which are free.
> >> IsoBuster, for example. Heck, Microsoft even supplies one.
> >>
> >> –
> >> Tim Roberts, xxxxx@probo.com
> >> Providenza & Boekelheide, Inc.
> >>
> >>
> >
> >
> >
>
>
>

It is not my first driver, but I do not have much experience with storage
drivers so I had some concerns about what kind of a driver to develop. I
thought of either SCSI miniport or SCSI port and Don suggests to look at
CDROM class driver, so it seems I need to make a little research.

Our customer wants us to develop a custom driver for him so he should think
about the cost, not us.

“Peter Wieland” ???/??? ? ???
???: news:xxxxx@ntdev…
Not really.

Commercial software isn’t for fun, it’s supposed to make money (or help make
money). You have consider the total cost of writing a driver, including
designing, coding, some serious testing (including learning how to test it)
and supporting it in the field.

You may find that it’s more cost effective to try and license an existing
solution & include that in your product rather than trying to develop an
entirely new driver (one which has been done before) from scratch. If
you’re an experienced driver writer this probably isn’t the case. From your
question I assumed this might be one of your first drivers.

-p

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Roman Kudinov
Sent: Friday, June 02, 2006 9:13 AM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] Virtual CD/DVD device driver

Strange reply for the driver development group…

I doubt that there are drivers which come with source code and which can be
used in commercial software.

“Tim Roberts” ???/??? ? ??? ???:
news:xxxxx@ntdev…
> Roman Kudinov wrote:
>
> > Hi, I need to develop virtual CD/DVD device driver (to mount .ISO
> > and other files), can anybody point me what kind of driver will suit
> > my needs the best?
>
>
> The best solution to your problem is to use one of the many
> well-tested products which provide this function already, many of which
are free.
> IsoBuster, for example. Heck, Microsoft even supplies one.
>
> –
> Tim Roberts, xxxxx@probo.com
> Providenza & Boekelheide, Inc.
>
>


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Knowing OSR (since I have been a client), I suspect they had the technology
for a customer, and are reusing it. Bottom line is you are asking for a lot
of headaches for something you probably can buy off the shelf.


Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
http://www.windrvr.com
Remove StopSpam from the email to reply

“Roman Kudinov” wrote in message news:xxxxx@ntdev…
> My be you are right but, for example, OSR had some reason to develop own
> driver though there are a lot of 3d party solutions :wink:
>
>
> “Don Burn” ÓÏÏÂÝÉÌ/ÓÏÏÂÝÉÌÁ × ÎÏ×ÏÓÔÑÈ ÓÌÅÄÕÀÝÅÅ:
> news:xxxxx@ntdev…
>> The bottom line is that this has already been done a lot. Yes you can
> roll
>> your own, take a look at the cdrom class driver in the DDK. But from a
>> business point of view, you are probably better off contacting one of the
>> firms (including OSR) that have already done one, and asking what it
>> costs
>> to license the code. You are looking at a lot of work, that has already
>> been done before.
>>
>>
>> –
>> Don Burn (MVP, Windows DDK)
>> Windows 2k/XP/2k3 Filesystem and Driver Consulting
>> http://www.windrvr.com
>> Remove StopSpam from the email to reply
>>
>>
>>
>> “Roman Kudinov” wrote in message news:xxxxx@ntdev…
>> > Strange reply for the driver development group…
>> >
>> > I doubt that there are drivers which come with source code and which
>> > can
>> > be
>> > used in commercial software.
>> >
>> >
>> >
>> > “Tim Roberts” ÓÏÏÂÝÉÌ/ÓÏÏÂÝÉÌÁ × ÎÏ×ÏÓÔÑÈ ÓÌÅÄÕÀÝÅÅ:
>> > news:xxxxx@ntdev…
>> >> Roman Kudinov wrote:
>> >>
>> >> > Hi, I need to develop virtual CD/DVD device driver (to mount .ISO
>> >> > and
>> >> > other files), can anybody point me what kind of driver will suit my
>> >> > needs the best?
>> >>
>> >>
>> >> The best solution to your problem is to use one of the many
>> >> well-tested
>> >> products which provide this function already, many of which are free.
>> >> IsoBuster, for example. Heck, Microsoft even supplies one.
>> >>
>> >> –
>> >> Tim Roberts, xxxxx@probo.com
>> >> Providenza & Boekelheide, Inc.
>> >>
>> >>
>> >
>> >
>> >
>>
>>
>>
>
>
>

I’d also look at CDROM class driver. Using class driver is a proven way how to make virtual disk drivers. We have one (it uses encrypted files as data storage) which was originally based on RamDisk example from NT4 DDK. I also recommend to look at this sample if you have it. Later the sample was redesigned to PnP which brought nothing useful.

The design is rather straightforward in principle but there are issues, of course. If you encounter them, search this list archives. BTW, our driver including several encryption algorithms implementation and custom IOCTL handling has about 12000 lines of code; about 50 - 70% of code can be necessary to make things working.

I believe the MS virtual CD driver Doron pointed out before also uses this technology.

Best regards,

Michal Vodicka
UPEK, Inc.
[xxxxx@upek.com, http://www.upek.com]


From: xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com] on behalf of Roman Kudinov[SMTP:xxxxx@rbcmail.ru]
Reply To: Windows System Software Devs Interest List
Sent: Friday, June 02, 2006 7:03 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] Virtual CD/DVD device driver

It is not my first driver, but I do not have much experience with storage
drivers so I had some concerns about what kind of a driver to develop. I
thought of either SCSI miniport or SCSI port and Don suggests to look at
CDROM class driver, so it seems I need to make a little research.

Our customer wants us to develop a custom driver for him so he should think
about the cost, not us.

“Peter Wieland” ???/??? ? ???
> ???: news:xxxxx@ntdev…
> Not really.
>
> Commercial software isn’t for fun, it’s supposed to make money (or help make
> money). You have consider the total cost of writing a driver, including
> designing, coding, some serious testing (including learning how to test it)
> and supporting it in the field.
>
> You may find that it’s more cost effective to try and license an existing
> solution & include that in your product rather than trying to develop an
> entirely new driver (one which has been done before) from scratch. If
> you’re an experienced driver writer this probably isn’t the case. From your
> question I assumed this might be one of your first drivers.
>
> -p
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Roman Kudinov
> Sent: Friday, June 02, 2006 9:13 AM
> To: Windows System Software Devs Interest List
> Subject: Re:[ntdev] Virtual CD/DVD device driver
>
> Strange reply for the driver development group…
>
> I doubt that there are drivers which come with source code and which can be
> used in commercial software.
>
>
>
> “Tim Roberts” ???/??? ? ??? ???:
> news:xxxxx@ntdev…
> > Roman Kudinov wrote:
> >
> > > Hi, I need to develop virtual CD/DVD device driver (to mount .ISO
> > > and other files), can anybody point me what kind of driver will suit
> > > my needs the best?
> >
> >
> > The best solution to your problem is to use one of the many
> > well-tested products which provide this function already, many of which
> are free.
> > IsoBuster, for example. Heck, Microsoft even supplies one.
> >
> > –
> > Tim Roberts, xxxxx@probo.com
> > Providenza & Boekelheide, Inc.
> >
> >
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
>

Michal,

Thank you for your reply, could you let me know if there are any
restricitons like:

  1. Does it appear as a CD/DVD drive in the System Manager?
  2. Can it handle DVD?
  3. Can it handle several drives simultaneously?
  4. Can it add/remove devices dynamically without reboot?


Thank you,
Roman

“Michal Vodicka” ???/??? ? ???
???: news:xxxxx@ntdev…
I’d also look at CDROM class driver. Using class driver is a proven way how
to make virtual disk drivers. We have one (it uses encrypted files as data
storage) which was originally based on RamDisk example from NT4 DDK. I also
recommend to look at this sample if you have it. Later the sample was
redesigned to PnP which brought nothing useful.

The design is rather straightforward in principle but there are issues, of
course. If you encounter them, search this list archives. BTW, our driver
including several encryption algorithms implementation and custom IOCTL
handling has about 12000 lines of code; about 50 - 70% of code can be
necessary to make things working.

I believe the MS virtual CD driver Doron pointed out before also uses this
technology.

Best regards,

Michal Vodicka
UPEK, Inc.
[xxxxx@upek.com, http://www.upek.com]

> ----------
> From:
xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com] on
behalf of Roman Kudinov[SMTP:xxxxx@rbcmail.ru]
> Reply To: Windows System Software Devs Interest List
> Sent: Friday, June 02, 2006 7:03 PM
> To: Windows System Software Devs Interest List
> Subject: Re:[ntdev] Virtual CD/DVD device driver
>
> It is not my first driver, but I do not have much experience with storage
> drivers so I had some concerns about what kind of a driver to develop. I
> thought of either SCSI miniport or SCSI port and Don suggests to look at
> CDROM class driver, so it seems I need to make a little research.
>
> Our customer wants us to develop a custom driver for him so he should
think
> about the cost, not us.
>
>
>
> “Peter Wieland” ???/??? ?
???
> ???: news:xxxxx@ntdev…
> Not really.
>
> Commercial software isn’t for fun, it’s supposed to make money (or help
make
> money). You have consider the total cost of writing a driver, including
> designing, coding, some serious testing (including learning how to test
it)
> and supporting it in the field.
>
> You may find that it’s more cost effective to try and license an existing
> solution & include that in your product rather than trying to develop an
> entirely new driver (one which has been done before) from scratch. If
> you’re an experienced driver writer this probably isn’t the case. From
your
> question I assumed this might be one of your first drivers.
>
> -p
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Roman Kudinov
> Sent: Friday, June 02, 2006 9:13 AM
> To: Windows System Software Devs Interest List
> Subject: Re:[ntdev] Virtual CD/DVD device driver
>
> Strange reply for the driver development group…
>
> I doubt that there are drivers which come with source code and which can
be
> used in commercial software.
>
>
>
> “Tim Roberts” ???/??? ? ??? ???:
> news:xxxxx@ntdev…
> > Roman Kudinov wrote:
> >
> > > Hi, I need to develop virtual CD/DVD device driver (to mount .ISO
> > > and other files), can anybody point me what kind of driver will suit
> > > my needs the best?
> >
> >
> > The best solution to your problem is to use one of the many
> > well-tested products which provide this function already, many of which
> are free.
> > IsoBuster, for example. Heck, Microsoft even supplies one.
> >
> > –
> > Tim Roberts, xxxxx@probo.com
> > Providenza & Boekelheide, Inc.
> >
> >
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
>

> ----------

From: xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com] on behalf of Roman Kudinov[SMTP:xxxxx@rbcmail.ru]
Reply To: Windows System Software Devs Interest List
Sent: Monday, June 05, 2006 8:24 AM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] Virtual CD/DVD device driver

Thank you for your reply, could you let me know if there are any
restricitons like:

  1. Does it appear as a CD/DVD drive in the System Manager?

No. Should it? Maybe it’d be possible to interract with Mount Manager and make it appear there but after initial experiences with MM in w2k I didn’t bother with it. Mainly because I haven’t seen anything useful it’d bring for users.

  1. Can it handle DVD?

It is on you how to present the content of the image file.

  1. Can it handle several drives simultaneously?

Yes. Count with one worker thread per-drive.

  1. Can it add/remove devices dynamically without reboot?

Yes. Using a custom app and IOCTL. Just forget about PnP as used in “improved” RamDisk sample.

Best regards,

Michal Vodicka
UPEK, Inc.
[xxxxx@upek.com, http://www.upek.com]

>> 1) Does it appear as a CD/DVD drive in the System Manager?

>
No. Should it? Maybe it’d be possible to interract with Mount Manager and
make it appear there but after initial experiences with MM in w2k I didn’t
bother with it. Mainly >because I haven’t seen anything useful it’d bring
for users.

If the drive does not appear in the System Manager, unless it’s hidden on
purpose, then this most likely means that the drive:

  • is not PnP compliant.
  • is not handled by cdrom.sys, classpnp.sys, redbook.sys etc.
  • uses hacks to do the job usually done by the above drivers, namely, to
    registrer itself as \Device\CdRomNNN, to broadcast media change
    notifications and so on.

What this means for a user:

The user gets a hack which

  • may not properly work with some programs
  • may adversely affect the system if the hacks do not completely match the
    logic implemented by the system drivers mentioned above.
  • is likely to be broken if the logic changes with the next version of
    Windows. The changes are quite likely, as there was a major change in W2k,
    and there were less significant changes in XP and 2003.


http://www.cristalink.com

“Michal Vodicka” wrote in message
news:xxxxx@ntdev…
> ----------
> From:
> xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com]
> on behalf of Roman Kudinov[SMTP:xxxxx@rbcmail.ru]
> Reply To: Windows System Software Devs Interest List
> Sent: Monday, June 05, 2006 8:24 AM
> To: Windows System Software Devs Interest List
> Subject: Re:[ntdev] Virtual CD/DVD device driver
>
> Thank you for your reply, could you let me know if there are any
> restricitons like:
> 1) Does it appear as a CD/DVD drive in the System Manager?
>
No. Should it? Maybe it’d be possible to interract with Mount Manager and
make it appear there but after initial experiences with MM in w2k I didn’t
bother with it. Mainly because I haven’t seen anything useful it’d bring for
users.

> 3) Can it handle DVD?
>
It is on you how to present the content of the image file.

> 4) Can it handle several drives simultaneously?
>
Yes. Count with one worker thread per-drive.

> 5) Can it add/remove devices dynamically without reboot?
>
Yes. Using a custom app and IOCTL. Just forget about PnP as used in
“improved” RamDisk sample.

Best regards,

Michal Vodicka
UPEK, Inc.
[xxxxx@upek.com, http://www.upek.com]

> ----------

From: xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com] on behalf of cristalink[SMTP:xxxxx@cristalink.com]
Reply To: Windows System Software Devs Interest List
Sent: Tuesday, June 06, 2006 5:23 AM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] Virtual CD/DVD device driver

>> 1) Does it appear as a CD/DVD drive in the System Manager?
>>
>No. Should it? Maybe it’d be possible to interract with Mount Manager and
>make it appear there but after initial experiences with MM in w2k I didn’t
>bother with it. Mainly >because I haven’t seen anything useful it’d bring
>for users.

If the drive does not appear in the System Manager, unless it’s hidden on
purpose, then this most likely means that the drive:

  • is not PnP compliant.
  • is not handled by cdrom.sys, classpnp.sys, redbook.sys etc.

I guess we speak here about a class driver similar as MS Virtual CD ROM driver. Its whole purpose is to present CD/DVD image file contents as a virtual drive. The virtual drive doesn’t necessarily need to appear as a CD/DVD from user’s point of view. Just like a drive with the data.

  • uses hacks to do the job usually done by the above drivers, namely, to
    registrer itself as \Device\CdRomNNN, to broadcast media change
    notifications and so on.

Why? MS driver uses \Device\VirtualCdRomNNN, our driver uses something else. The device name isn’t (so) important (although XP contain a hack for VirtualCdRom IIRC). Broadcasts can be handled in the user mode. Media change are controlled by application which can send necessary broadcasts.

What this means for a user:

The user gets a hack which

  • may not properly work with some programs
  • may adversely affect the system if the hacks do not completely match the
    logic implemented by the system drivers mentioned above.
  • is likely to be broken if the logic changes with the next version of
    Windows. The changes are quite likely, as there was a major change in W2k,
    and there were less significant changes in XP and 2003.

We have such a driver which is binary compatible from NT4 to w2k3. Currently, it seems to work with no problem at Vista betas. Actually, the switch from NT4 to w2k was easy (I don’t remember if any change was necessary), signifficant changes had to be made to support XP which added several new IOCTLs which class driver needs to support.

We don’t have any report about not properly working with other programs. Well, we don’t try to pretend CDs so maybe some games which check CDs would have problems.

I guess everything depends on the purpose. What I described is quite sufficient way to access the data in the image. It may not be sufficient if software has other ambitions.

Best regards,

Michal Vodicka
UPEK, Inc.
[xxxxx@upek.com, http://www.upek.com]

>>I guess we speak here about a class driver similar as MS Virtual CD ROM

>driver

Well I thought the class drivers are those sitting above actual devices,
whether physical or virtual, and doing common tasks for them. Some class
drivers are in WINDDK\src\storage\class.

>The virtual drive doesn’t necessarily need to appear as a CD/DVD from
>user’s point of view.

I see, we are talking about different kinds of users. If a drive does not
appear as a CD/DVD, then it’s not a virtual CD/DVD drive, is it?

>MS driver uses \Device\VirtualCdRomNNN, our driver uses something else

There are some applications that still look for \.\CdRomN, just like
\.\PhysicalDriveN, see http://support.microsoft.com/kb/100027.

Let’s say I have an application that deals with CD-ROM drives. The
application wants to access all of them, physical and virtual, with a drive
letter and without. How could this application find your virtual drive? The
correct way to detect CD-ROMs is to enumerate CD-ROM device interfaces. I
guess your virtual drive doesn’t have one, as this requires a PDO.

>Broadcasts can be handled in the user mode. Media change are controlled by
>application which can send necessary broadcasts

That’s exactly what I meant by hacks. For a truly virtual CD drive, this is
all done by the class drivers. There’s no need for user mode applications.
The virtual drive appears as a physical one from every point of view.

>We have such a driver which is binary compatible from NT4 to w2k3

It will be compatible if it’s based on the primitive RamDisk sample with all
its limitations.

>We don’t try to pretend CDs so maybe some games which check CDs would have
>problems.

Exactly. RamDisk may work in some cases, but not in all of them.

>What I described is quite sufficient way to access the data in the image.

It does not matter where the data comes from - media or image file. Yes, one
can take RamDisk, modify it and then claim they have a virtual CD-ROM. Yes,
this will give some appearance of a CD drive and will work with some
programs. But I wouldn’t buy such software. In my humble opinion, this
approach is good only for freeware tools to mount ISO images from MSDN.

Cheers

“Michal Vodicka” wrote in message
news:xxxxx@ntdev…
> ----------
> From:
> xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com]
> on behalf of cristalink[SMTP:xxxxx@cristalink.com]
> Reply To: Windows System Software Devs Interest List
> Sent: Tuesday, June 06, 2006 5:23 AM
> To: Windows System Software Devs Interest List
> Subject: Re:[ntdev] Virtual CD/DVD device driver
>
> >> 1) Does it appear as a CD/DVD drive in the System Manager?
> >>
> >No. Should it? Maybe it’d be possible to interract with Mount Manager and
> >make it appear there but after initial experiences with MM in w2k I
> >didn’t
> >bother with it. Mainly >because I haven’t seen anything useful it’d bring
> >for users.
>
> If the drive does not appear in the System Manager, unless it’s hidden on
> purpose, then this most likely means that the drive:
>
> - is not PnP compliant.
> - is not handled by cdrom.sys, classpnp.sys, redbook.sys etc.
>
I guess we speak here about a class driver similar as MS Virtual CD ROM
driver. Its whole purpose is to present CD/DVD image file contents as a
virtual drive. The virtual drive doesn’t necessarily need to appear as a
CD/DVD from user’s point of view. Just like a drive with the data.

> - uses hacks to do the job usually done by the above drivers, namely, to
> registrer itself as \Device\CdRomNNN, to broadcast media change
> notifications and so on.
>
Why? MS driver uses \Device\VirtualCdRomNNN, our driver uses something else.
The device name isn’t (so) important (although XP contain a hack for
VirtualCdRom IIRC). Broadcasts can be handled in the user mode. Media change
are controlled by application which can send necessary broadcasts.

> What this means for a user:
>
> The user gets a hack which
>
> - may not properly work with some programs
> - may adversely affect the system if the hacks do not completely match the
> logic implemented by the system drivers mentioned above.
> - is likely to be broken if the logic changes with the next version of
> Windows. The changes are quite likely, as there was a major change in W2k,
> and there were less significant changes in XP and 2003.
>
We have such a driver which is binary compatible from NT4 to w2k3.
Currently, it seems to work with no problem at Vista betas. Actually, the
switch from NT4 to w2k was easy (I don’t remember if any change was
necessary), signifficant changes had to be made to support XP which added
several new IOCTLs which class driver needs to support.

We don’t have any report about not properly working with other programs.
Well, we don’t try to pretend CDs so maybe some games which check CDs would
have problems.

I guess everything depends on the purpose. What I described is quite
sufficient way to access the data in the image. It may not be sufficient if
software has other ambitions.

Best regards,

Michal Vodicka
UPEK, Inc.
[xxxxx@upek.com, http://www.upek.com]

> ----------

From: xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com] on behalf of cristalink[SMTP:xxxxx@cristalink.com]
Reply To: Windows System Software Devs Interest List
Sent: Tuesday, June 06, 2006 10:38 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] Virtual CD/DVD device driver

I see, we are talking about different kinds of users. If a drive does not
appear as a CD/DVD, then it’s not a virtual CD/DVD drive, is it?

Tell it to MS developers who named this kind of driver Virtual CDROM :wink: Opinions may differ; for me if it allows to mount CD/DVD drive, it is virtual CD/DVD drive.

There are some applications that still look for \.\CdRomN, just like
\.\PhysicalDriveN, see http://support.microsoft.com/kb/100027.

Let’s say I have an application that deals with CD-ROM drives. The
application wants to access all of them, physical and virtual, with a drive
letter and without. How could this application find your virtual drive? The
correct way to detect CD-ROMs is to enumerate CD-ROM device interfaces. I
guess your virtual drive doesn’t have one, as this requires a PDO.

Why should an application care about CD-ROM drives at all? Apps need data and need to know their location. It shouldn’t matter if data are stored at CD-ROM or somewhere else.

For completeness, I haven’t implemented virtual CD-ROM driver at all. Our driver allows to create encrypted virtual drives this way, instead. I believe it should be easy to add CD/DVD mount support to this driver but I don’t have a need when there are such tools already available. Maybe if I don’t find something for x64 OSes. From user’s point of view it looks like a safe protected by fingerprint. Users may completely ignore the fact there is a virtual drive – it is mounted to a directory and can be accessed standard way.

That’s exactly what I meant by hacks. For a truly virtual CD drive, this is
all done by the class drivers. There’s no need for user mode applications.
The virtual drive appears as a physical one from every point of view.

Don’t you need an user mode app anyway? How’d you tell the driver the location of the CD/DVD image? If an app is involved with mounting, it can also send necessary broadcast.

>>We have such a driver which is binary compatible from NT4 to w2k3

It will be compatible if it’s based on the primitive RamDisk sample with all
its limitations.

IIRC there were serious problems with implementing virtual drives as SCSI miniports. I’m not sure if there is any easy solution nowadays. On the other hand, this primitive approach is rather easy and efficient.

>>We don’t try to pretend CDs so maybe some games which check CDs would have
>>problems.

Exactly. RamDisk may work in some cases, but not in all of them.

>>What I described is quite sufficient way to access the data in the image.

It does not matter where the data comes from - media or image file. Yes, one
can take RamDisk, modify it and then claim they have a virtual CD-ROM. Yes,
this will give some appearance of a CD drive and will work with some
programs. But I wouldn’t buy such software. In my humble opinion, this
approach is good only for freeware tools to mount ISO images from MSDN.

I guess we agree. Everything depends on the purpose. I never needed anything more from virtual CD-ROM driver than mount MSDN images. It is much more convenient than to burn them. Unfortunately, I don’t have time to play games so maybe I’d change my mind if I encounter some “smart” game which check for the installation CD :slight_smile:

Best regards,

Michal Vodicka
UPEK, Inc.
[xxxxx@upek.com, http://www.upek.com]

>Hi, I need to develop virtual CD/DVD device driver (to mount .ISO and other

files), can anybody point me what kind of driver will suit my needs the
best?

If you search for HttpDisk on google you will find source code for a driver
that can mount the .ISO file directly from a web server over HTTP.


Hitta drömresan! http://www.msn.se/resor/