IoCreateDevice on demand (outside DriverEntry)

Hi,

I’m developing a driver that have to create a new device (is a disk
image mounter) dynamically.

So if the main device receives a specific IOCTL command it have to
create the device.

If I create a device in the DriverEntry all works fine, but if I try to
create a device when the primary device is running:

  • the device was created (I can see it on WinObj)

  • if I attempt to open the newly created device I can’t (error
    0x2) an also a can’t get the It’s properies with WinObj

I’ve to do some other works?

Thank’s

You are most likely creating your symbolic link in a session specific ??
directory.

If you post the device creation so that it executes in a system thread, that
would probably work, or you can create the symlink in \DosDevices\Global.

  • Dan.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Gian-luca Tenti
Sent: Wednesday, April 26, 2006 8:22 AM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] IoCreateDevice on demand (outside DriverEntry)

Hi,

I’m developing a driver that have to create a new device (is a disk image
mounter) dynamically.

So if the main device receives a specific IOCTL command it have to create
the device.

If I create a device in the DriverEntry all works fine, but if I try to
create a device when the primary device is running:

  • the device was created (I can see it on WinObj)

  • if I attempt to open the newly created device I can’t (error 0x2)
    an also a can’t get the It’s properies with WinObj

I’ve to do some other works?

Thank’s


Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

You are currently subscribed to ntfsd as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com

Clear DO_DEVICE_INITIALIZING in DeviceObject->Flags ?

“Gian-luca Tenti” wrote in message
news:xxxxx@ntfsd…
Hi,

I’m developing a driver that have to create a new device (is a disk image
mounter) dynamically.
So if the main device receives a specific IOCTL command it have to create
the device.

If I create a device in the DriverEntry all works fine, but if I try to
create a device when the primary device is running:

- the device was created (I can see it on WinObj)
- if I attempt to open the newly created device I can’t (error 0x2)
an also a can’t get the It’s properies with WinObj

I’ve to do some other works?

Thank’s

Hi,

Did you clear DO_DEVICE_INITIALIZING in the Flags of the newly created
device?

Cheers,
Michael B.

“Gian-luca Tenti”
Sent by: xxxxx@lists.osr.com
26.04.2006 17:21
Please respond to
“Windows File Systems Devs Interest List”

To
“Windows File Systems Devs Interest List”
cc

Subject
[ntfsd] IoCreateDevice on demand (outside DriverEntry)

Hi,

I?m developing a driver that have to create a new device (is a disk image
mounter) dynamically.
So if the main device receives a specific IOCTL command it have to create
the device.

If I create a device in the DriverEntry all works fine, but if I try to
create a device when the primary device is running:

- the device was created (I can see it on WinObj)
- if I attempt to open the newly created device I can?t (error
0x2) an also a can?t get the It?s properies with WinObj

I?ve to do some other works?

Thank?s


Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

You are currently subscribed to ntfsd as: unknown lmsubst tag argument: ‘’

To unsubscribe send a blank email to xxxxx@lists.osr.com
---------------------------------------------------------------
Vogon International GmbH
http://www.vogon-international.com