- Register standalone volume DO to Mount Mgr
- Posted by Steve on August 20th, 2004
Hi all,
I have a Volume Manager driver which creates a volume device object on which
the filesystem
will be mounted. For now, this device has no relation to PnP and is just a
standalone DO. Is it
right to implement a volume manager in this way?
I want to register this DO to Mount Manager,and to let Mount Manager manage
the name space of the Volume.
So far, I have tried two methods of IoRegisterDeviceInterface and
IOCTL_MOUNTMGR_VOLUME_ARRIVAL_NOTIFICATION,
however unfortunately,I have gotten the same
error:STATUS_INVALID_DEVICE_REQUEST from both methods.
Thus, my standalone DO is invalid to be registered to MountMgr,isn't it? In
this case,do I have to use IOCTL_MOUNTMGR_CREATE_POINT? And I wonder if
IOCTL_MOUNTMGR_CREATE_POINT will work.
Any suggestion and comment will be appreciated. TIA
Steve
- Posted by on August 20th, 2004
Are you sure you are sending IOCTL_MOUNTMGR_VOLUME_ARRIVAL_NOTIFICATION to
the mount manager, not to someone else?
"Steve" <non_stop@163.com> wrote in message
news:ui6EPrlhEHA.140@TK2MSFTNGP12.phx.gbl...
- Posted by Maxim S. Shatskih on August 20th, 2004
Use IoReportDetectedDevice with NULLs in parameters to create a standalone
PDO. Then attach your DO to it.
This will form the simplest possible PnP stack with a PDO, and thus will
allow IoRegisterDeviceInterface/MOUNTDEV_MOUNTED_DEVICE_GUID.
--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com
"Steve" <non_stop@163.com> wrote in message
news:ui6EPrlhEHA.140@TK2MSFTNGP12.phx.gbl...
- Posted by Maxim S. Shatskih on August 20th, 2004
To see this, the "mounted device" interface must be registered, and this
requires a PDO.
--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com
- Posted by on August 20th, 2004
This IOCTL is supposed to be sent from a client to the Mount Manager, not
the other way around. This IOCTL is for the case when you don't have a PDO.
"Maxim S. Shatskih" <maxim@storagecraft.com> wrote in message
news:eMxpkFmhEHA.3980@TK2MSFTNGP12.phx.gbl...
- Posted by Steve on August 20th, 2004
Use the name of the Mount Manager device object defined in mountmgr.h
(MOUNTMGR_DEVICE_NAME) to obtain a pointer to the Mount Manager. And send
IOCTL to it.
<nospam@cristalink.com> дÈëÏûÏ¢
news:eSd9L$lhEHA.2848@TK2MSFTNGP10.phx.gbl...
- Posted by on August 20th, 2004
It's a bit strange that you get STATUS_INVALID_DEVICE_REQUEST both from
IoRegisterDeviceInterface and IOCTL_MOUNTMGR_VOLUME_ARRIVAL_NOTIFICATION. I
would rather expect INVALID_PARAMETER or so.
"Steve" <non_stop@163.com> wrote in message
news:eSKR3SmhEHA.3348@TK2MSFTNGP12.phx.gbl...
- Posted by on August 20th, 2004
When you send IOCTL_MOUNTMGR_VOLUME_ARRIVAL_NOTIFICATION to the Mount
Manager, the latter sends several IOCTLs to your device specified in
MOUNTMGR_TARGET_NAME. Your device does not process those new IOCTLs, and
return STATUS_INVALID_DEVICE_REQUEST to the Mount Manager, which in turn
returns the same status back to the sender of
IOCTL_MOUNTMGR_VOLUME_ARRIVAL_NOTIFICATION.
"Steve" <non_stop@163.com> wrote in message
news:eSKR3SmhEHA.3348@TK2MSFTNGP12.phx.gbl...
- Posted by Steve on August 20th, 2004
Hi,Maxim,
It is a good idea to use IoReportDetectedDevice,but its parameters is
complicated and it need INF file to do sth additional.
Could you give me some source code? Thank you.
Steve
"Maxim S. Shatskih" <maxim@storagecraft.com> дÈëÏûÏ¢
news:#lRdJFmhEHA.2624@TK2MSFTNGP12.phx.gbl...
- Posted by Maxim S. Shatskih on August 20th, 2004
Just pass NULLs everywhere you can.
--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com
"Steve" <non_stop@163.com> wrote in message
news:uULthjohEHA.3076@tk2msftngp13.phx.gbl...
- Posted by Steve on August 21st, 2004
Maxim,Thank you very much.
"Maxim S. Shatskih" <maxim@storagecraft.com> дÈëÏûÏ¢
news:evyeKYphEHA.1652@TK2MSFTNGP09.phx.gbl...
- Posted by Steve on August 21st, 2004
Hi,maxim,
I have tried IoReportDetectedDevice to get a PDO from PNP manager, used
IoAttachDeviceToDeviceStack to attach my DO to the PDO, and finally used
IoRegisterDeviceInterface to register PDO to MountMgr. What should be
mentioned are that all these are implemented in DriverEntry,and that my
driver's start type is 1.
status= IoReportDetectedDevice(
DriverObject,
InterfaceTypeUndefined,
-1,
-1,
NULL,//not sure
NULL,
TRUE,
&PDO
);
Unfortuanately,when the system boots,a panic jumps out and says that
Object not found. And after one minutes,my computer reboots.
All that I can image is that IRP_MN_QUERY_DEVICE_RELATIONS should be
supported, But I don't know the relation type.
Could you give me some advice?thank you.
Steve
"Maxim S. Shatskih" <maxim@storagecraft.com> дÈëÏûÏ¢
news:evyeKYphEHA.1652@TK2MSFTNGP09.phx.gbl...
- Posted by Maxim S. Shatskih on August 22nd, 2004
Try to determine the call stack of the crash.
--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com
"Steve" <non_stop@163.com> wrote in message
news:uYR5BJ4hEHA.3944@tk2msftngp13.phx.gbl...
- Posted by Steve on August 23rd, 2004
Thank you for your suggestion.
Could you tell me how to determine the call stack of the crash? Thank you
again.
"Maxim S. Shatskih" <maxim@storagecraft.com> дÈëÏûÏ¢
news:uaUAfm#hEHA.3632@TK2MSFTNGP09.phx.gbl...
- Posted by Steve on August 23rd, 2004
Can the parameter of IoReportDetectedDevice,IN PCM_RESOURCE_LIST
ResourceList, be Null?
If not,how to build a default Resource list?
"Maxim S. Shatskih" <maxim@storagecraft.com> дÈëÏûÏ¢
news:evyeKYphEHA.1652@TK2MSFTNGP09.phx.gbl...
- Posted by Maxim S. Shatskih on August 23rd, 2004
!analyze -v in WinDbg at the moment of crash.
--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com
"Steve" <non_stop@163.com> wrote in message
news:uLFlZ0KiEHA.2544@TK2MSFTNGP10.phx.gbl...
- Posted by Maxim S. Shatskih on August 23rd, 2004
Yes it can.
--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com
"Steve" <non_stop@163.com> wrote in message
news:eHoTBLMiEHA.2880@TK2MSFTNGP10.phx.gbl...
- Posted by Steve on August 24th, 2004
Hi,Maxim,
I have found the crash point.
It is ok to use IoReportDetectedDevice to get a Pdo,to use
IoAttachDeviceToDeviceStack to attach my DO to the Pdo,and to use
IoRegisterDeviceInterface to register the Pdo to MountMgr.However,when using
IoSetDeviceInterfaceState to Activate the InterfaceName, I am informed by
Lsass.exe that Object not found.And after a minute,the system reboots.
that's all I can tell you. Thanks for your help.
Steve
"Maxim S. Shatskih" <maxim@storagecraft.com> дÈëÏûÏ¢
news:uaUAfm#hEHA.3632@TK2MSFTNGP09.phx.gbl...
- Posted by Steve on August 24th, 2004
Hi,Maxim,
I have found the crash point.
It is ok to use IoReportDetectedDevice to get a Pdo,to use
IoAttachDeviceToDeviceStack to attach my DO to the Pdo,and to use
IoRegisterDeviceInterface to register the Pdo to MountMgr.However,when using
IoSetDeviceInterfaceState to Activate the InterfaceName, I am informed by
Lsass.exe that Object not found.And after a minute,the system reboots.
BTW:these are implemented in DriverEntry.
that's all I can tell you. Thanks for your help.
Steve
"Maxim S. Shatskih" <maxim@storagecraft.com>
news:uaUAfm#hEHA.3632@TK2MSFTNGP09.phx.gbl...