IoCreateFileSpecifyDeviceObjectHint on Win2k

I am trying to implement to implement a function like
IoCreateFileSpecifyDeviceObjectHint on Win2k by using the method
explained on http://osronline.com/article.cfm?id=258
(IoCreateFileSpecifyDeviceObjectHint for Windows 2000 The NT Insider,
Vol 10, Issue 4, July-August 2003) but I have a weird problem, when I
attach my 2 devices (I attach the shadow device to the FSD object, then
my filter device to the shadow device) I am unable to unload my driver,
my DrvUnload function is never called. I know that Microsoft dont
support fs filter driver unloading, by it work fine if I attach only 1
device and it is usefull when debugging the driver.

By the way, it is possible to have the code associated with the article
? On top of the article it is written “*Code Associated With This
Article Will Be Posted Shortly*” but the article is dated August 2003…

Best regards,

Benjamin Lauzi?re

Are you deleting both device objects? Are you deleting the 2nd shadow object when you delete the first one? Any device object still around will keep the driver from being unloaded.

D

This posting is provided “AS IS” with no warranties, and confers no rights

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Benjamin Lauzi?re
Sent: Wednesday, March 03, 2004 9:08 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] IoCreateFileSpecifyDeviceObjectHint on Win2k

I am trying to implement to implement a function like
IoCreateFileSpecifyDeviceObjectHint on Win2k by using the method
explained on http://osronline.com/article.cfm?id=258
(IoCreateFileSpecifyDeviceObjectHint for Windows 2000 The NT Insider,
Vol 10, Issue 4, July-August 2003) but I have a weird problem, when I
attach my 2 devices (I attach the shadow device to the FSD object, then
my filter device to the shadow device) I am unable to unload my driver,
my DrvUnload function is never called. I know that Microsoft dont
support fs filter driver unloading, by it work fine if I attach only 1
device and it is usefull when debugging the driver.

By the way, it is possible to have the code associated with the article
? On top of the article it is written “*Code Associated With This
Article Will Be Posted Shortly*” but the article is dated August 2003…

Best regards,

Benjamin Lauzi?re


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

You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

It is still a bad idea to unload the FSD. It will cause problems in
production at some point.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Doron Holan
Sent: Wednesday, March 03, 2004 9:27 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] IoCreateFileSpecifyDeviceObjectHint on Win2k

Are you deleting both device objects? Are you deleting the 2nd shadow
object when you delete the first one? Any device object still around will
keep the driver from being unloaded.

D

This posting is provided “AS IS” with no warranties, and confers no rights

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Benjamin Lauzi?re
Sent: Wednesday, March 03, 2004 9:08 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] IoCreateFileSpecifyDeviceObjectHint on Win2k

I am trying to implement to implement a function like
IoCreateFileSpecifyDeviceObjectHint on Win2k by using the method
explained on http://osronline.com/article.cfm?id=258
(IoCreateFileSpecifyDeviceObjectHint for Windows 2000 The NT Insider,
Vol 10, Issue 4, July-August 2003) but I have a weird problem, when I
attach my 2 devices (I attach the shadow device to the FSD object, then
my filter device to the shadow device) I am unable to unload my driver,
my DrvUnload function is never called. I know that Microsoft dont
support fs filter driver unloading, by it work fine if I attach only 1
device and it is usefull when debugging the driver.

By the way, it is possible to have the code associated with the article
? On top of the article it is written “*Code Associated With This
Article Will Be Posted Shortly*” but the article is dated August 2003…

Best regards,

Benjamin Lauzi?re


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

You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com


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

You are currently subscribed to ntdev as: xxxxx@storagecraft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

Doron Holan wrote:

Are you deleting both device objects? Are you deleting the 2nd shadow object when you delete the first one? Any device object still around will keep the driver from being unloaded.

D

This posting is provided “AS IS” with no warranties, and confers no rights

Well, as it is I am deleting the device in my DrvUnload() function, but
this function is never called.

Best regards,

Benjamin Lauzi?re

You have a chicken and egg problem. where you delete your last “real” (ie not shadow) device object, you must also delete the shadow device object as well.

D

This posting is provided “AS IS” with no warranties, and confers no rights

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Benjamin Lauzi?re
Sent: Wednesday, March 03, 2004 9:47 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] IoCreateFileSpecifyDeviceObjectHint on Win2k

Doron Holan wrote:

Are you deleting both device objects? Are you deleting the 2nd shadow object when you delete the first one? Any device object still around will keep the driver from being unloaded.

D

This posting is provided “AS IS” with no warranties, and confers no rights

Well, as it is I am deleting the device in my DrvUnload() function, but
this function is never called.

Best regards,

Benjamin Lauzi?re


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

You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

Doron Holan wrote:

You have a chicken and egg problem. where you delete your last “real” (ie not shadow) device object, you must also delete the shadow device object as well.

D

This posting is provided “AS IS” with no warranties, and confers no rights

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Benjamin Lauzi?re
Sent: Wednesday, March 03, 2004 9:47 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] IoCreateFileSpecifyDeviceObjectHint on Win2k

Doron Holan wrote:

>Are you deleting both device objects? Are you deleting the 2nd shadow object when you delete the first one? Any device object still around will keep the driver from being unloaded.
>
>D
>
>This posting is provided “AS IS” with no warranties, and confers no rights
>
>
>
>
>
Well, as it is I am deleting the device in my DrvUnload() function, but
this function is never called.

Best regards,

Benjamin Lauzi?re

But where would you delete these device ? Usually I delete all the
device that I have created in my DrvUnload() function. My problem with
this driver is that when I try to unload the driver, my DrvUnload() is
never called for an unknow reason.

Thanks for your time,

Benjamin Lauzi?re

If it is a file system or file system filter driver, you may want to pay
close attention to the fastiodetachdevice call. I do not know what you are
doing, but deleting the devices in unload is not reliable; since an FSD is
not suppose to unload.

I know everyone and their siblings want to unload their FSD, but it really
is not a good idea. It may work 99% of the time, but that 1% will surly come
back to bite you.

That is all I am going to say on this thread.

Jamey

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Benjamin Lauzi?re
Sent: Wednesday, March 03, 2004 2:50 PM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] IoCreateFileSpecifyDeviceObjectHint on Win2k

Doron Holan wrote:

You have a chicken and egg problem. where you delete your last “real” (ie
not shadow) device object, you must also delete the shadow device object as
well.

D

This posting is provided “AS IS” with no warranties, and confers no rights

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Benjamin Lauzi?re
Sent: Wednesday, March 03, 2004 9:47 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] IoCreateFileSpecifyDeviceObjectHint on Win2k

Doron Holan wrote:

>Are you deleting both device objects? Are you deleting the 2nd shadow
object when you delete the first one? Any device object still around will
keep the driver from being unloaded.
>
>D
>
>This posting is provided “AS IS” with no warranties, and confers no rights

>
>
>
>
>
Well, as it is I am deleting the device in my DrvUnload() function, but
this function is never called.

Best regards,

Benjamin Lauzi?re

But where would you delete these device ? Usually I delete all the
device that I have created in my DrvUnload() function. My problem with
this driver is that when I try to unload the driver, my DrvUnload() is
never called for an unknow reason.

Thanks for your time,

Benjamin Lauzi?re


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

You are currently subscribed to ntdev as: xxxxx@storagecraft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

Sorry, I don’t know enough about the FS archicture to answer. OSR has an FSD alias, ask there.

D

This posting is provided “AS IS” with no warranties, and confers no rights

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Benjamin Lauzi?re
Sent: Wednesday, March 03, 2004 2:50 PM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] IoCreateFileSpecifyDeviceObjectHint on Win2k

Doron Holan wrote:

You have a chicken and egg problem. where you delete your last “real” (ie not shadow) device object, you must also delete the shadow device object as well.

D

This posting is provided “AS IS” with no warranties, and confers no rights

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Benjamin Lauzi?re
Sent: Wednesday, March 03, 2004 9:47 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] IoCreateFileSpecifyDeviceObjectHint on Win2k

Doron Holan wrote:

>Are you deleting both device objects? Are you deleting the 2nd shadow object when you delete the first one? Any device object still around will keep the driver from being unloaded.
>
>D
>
>This posting is provided “AS IS” with no warranties, and confers no rights
>
>
>
>
>
Well, as it is I am deleting the device in my DrvUnload() function, but
this function is never called.

Best regards,

Benjamin Lauzi?re

But where would you delete these device ? Usually I delete all the
device that I have created in my DrvUnload() function. My problem with
this driver is that when I try to unload the driver, my DrvUnload() is
never called for an unknow reason.

Thanks for your time,

Benjamin Lauzi?re


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

You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com