Hello,
I’m trying to create a virtual dvd device. When I am doing IoCreateDevice
like this:
IoCreateDevice( DriverObject, sizeof( MYDRV_EXTENSION ), &deviceString,
FILE_DEVICE_DVD, FILE_READ_ONLY_DEVICE|FILE_REMOVABLE_MEDIA,FALSE,
&deviceObject )
I get STATUS_SUCCESS… everything is ok… but I don’t get any
IOCTL_DVD_XXX calls.
Can anyone tell me what the problem might be? I did this for CDs and
everything went fine…
Thank you,
Andrei Ciubotaru
Um, did you attach it to a drive letter?
Andrei Ciubotaru wrote:
Hello,
I’m trying to create a virtual dvd device. When I am doing IoCreateDevice
like this:
IoCreateDevice( DriverObject, sizeof( MYDRV_EXTENSION ), &deviceString,
FILE_DEVICE_DVD, FILE_READ_ONLY_DEVICE|FILE_REMOVABLE_MEDIA,FALSE,
&deviceObject )
I get STATUS_SUCCESS… everything is ok… but I don’t get any
IOCTL_DVD_XXX calls.
Can anyone tell me what the problem might be? I did this for CDs and
everything went fine…
Thank you,
Andrei Ciubotaru
–
Nick Ryan (MVP for DDK)
Yes! I attached it to a drive letter. Still nothing. I mean it sais
STATUS_SUCCESS… no error what so ever… but I does not mount it - I
cannot see it in Explorer( I do not receive any IOCTLs). The only thing
that it does is to call the IRP_MJ_CREATE function.
Thank you,
Andrei Ciubotaru
One more thing - for mounting I am using IoCreateSymbolicLink!
What’s very wierd is that if I am using FILE_DEVICE_CD_ROM instead of
FIE_DEVICE_DVD… it works!
Thank you,
Andrei Ciubotaru
Did you bother to read the sources for ClassPnp & the CdRom driver? There
is an interesting comment found in them about the use of FILE_DEVICE_DVD and
I guess from the other comments that you don’t use it to identify devices.
“Andrei Ciubotaru” wrote in message
news:xxxxx@ntfsd…
>
> One more thing - for mounting I am using IoCreateSymbolicLink!
>
> What’s very wierd is that if I am using FILE_DEVICE_CD_ROM instead of
> FIE_DEVICE_DVD… it works!
>
> Thank you,
> Andrei Ciubotaru
>
>
Yes… I read them - so, I’m probably missing something. For now I just
noticed that inside the driver(CdRomStartDevice) they are doing this:
ClassSendDeviceIoControlSynchronous(
IOCTL_DVD_READ_KEY,
Fdo,
copyProtectKey,
DVD_RPC_KEY_LENGTH,
DVD_RPC_KEY_LENGTH,
FALSE,
&ioStatus
);
… ???
One more thing - in CdromInitDevice they’re saying that DVD requires Start
by setting DEV_SAFE_START_UNIT flag - this is a flag of the device
extension… I do not have such thing in my driver.
Could you, please, give me a straight answer… instead of questioning me
back?
Thank you,
Andrei Ciubotaru