Nudity, XP, and CreateFile Problems

(The “nudity” part was to get you to read this. Was that bad?)

I have a driver and test app that works on Win2k. I run the same thing on
XP and the CreateFile fails, with the last error being 31, “A device
attached to the system is not functioning.”

As far as I can tell, my device IS working! At least, the driver is
running, according to the device manager. sysinternals.com’s WinObj and
Oney’s DevView show that my symbolic link is in place.

There are a few posts of guys with the same problems, but no solutions.

Thanks for any clues.

john reilly.


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Do you receive IRP_MJ_CREATE in you DispatchHandler?

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of John Reilly
Sent: Thursday, December 06, 2001 2:17 PM
To: NT Developers Interest List
Subject: [ntdev] Nudity, XP, and CreateFile Problems

(The “nudity” part was to get you to read this. Was that bad?)

I have a driver and test app that works on Win2k. I run the same thing on
XP and the CreateFile fails, with the last error being 31, “A device
attached to the system is not functioning.”

As far as I can tell, my device IS working! At least, the driver is
running, according to the device manager. sysinternals.com’s WinObj and
Oney’s DevView show that my symbolic link is in place.

There are a few posts of guys with the same problems, but no solutions.

Thanks for any clues.

john reilly.


You are currently subscribed to ntdev as: xxxxx@pcausa.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

I’m not sure. I haven’t yet run under the checked build, but I’m about to
do so.


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

The least you could do is provide a link!


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

I don’t see any reason to use checked build. You could simply use a
debugger, SoftIce an example.

Alternatively, you could download this utility
http://www.ntndis.com/utilities/devfilter.htm and attach to the device
object you create. You will see IRP_MJ_CREATE in trace log if it will passed
to your drvier.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of John Reilly
Sent: Thursday, December 06, 2001 3:31 PM
To: NT Developers Interest List
Subject: [ntdev] RE: Nudity, XP, and CreateFile Problems

I’m not sure. I haven’t yet run under the checked build, but I’m about to
do so.


You are currently subscribed to ntdev as: xxxxx@pcausa.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Yes, I get an IRP_MJ_CREATE. That is the only IRP I get.

I used the fabulous and wonderful tool, Device Filter, which was obviously
written by a genius!

Thanks. What now?

john.


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

“Vadim Smirnov” wrote in message news:xxxxx@ntdev…
>
> I don’t see any reason to use checked build. You could simply use a
> debugger, SoftIce an example.
>

Right. You can run the driver under the debugger, irrespective of whether
or not you’re using the checked kernel and hal.

Or, for poor man’s debugging, just DbgPrint something on entry to your
Create dispatch entry point. You could even look for the output using
DbgGui from the OSR web site.

Peter
OSR


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

“John Reilly” wrote in message news:xxxxx@ntdev…
>
> Yes, I get an IRP_MJ_CREATE. That is the only IRP I get.
>
>
> Thanks. What now?
>

What now? Ah, you debug the problem!

Are you completing the IRP with success??

Peter
OSR


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Thanks, guys! I found out that my IRP_MJ_CREATE dispatch method is
failing. It is trying to map a driver-allocated block of memory into the
calling process’s space, and failing the ZwMapViewOfSection() call with the
error (from ntstatus.h):

// MessageId: STATUS_CONFLICTING_ADDRESSES
//
// MessageText:
//
// {Conflicting Address Range}
// The specified address range conflicts with the address space.
//
#define STATUS_CONFLICTING_ADDRESSES ((NTSTATUS)0xC0000018L)

I should have debugged further, but I was thrown off by a driver that
worked in Win2k, and failed in XP, and the fact that others have posted a
similar-sounding problem. However, you have pointed me to some fantastic
new tools (add DbgMon to the list) and i’m on my way!

Thanks for all the help!

john.


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Do you assign a drive letter to is using DefineDosDevice()? If so, read
latest QB on DefineDosDevice() in XP.

Jamey

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of John Reilly
Sent: Thursday, December 06, 2001 2:17 PM
To: NT Developers Interest List
Subject: [ntdev] Nudity, XP, and CreateFile Problems

(The “nudity” part was to get you to read this. Was that bad?)

I have a driver and test app that works on Win2k. I run the same thing
on
XP and the CreateFile fails, with the last error being 31, “A device
attached to the system is not functioning.”

As far as I can tell, my device IS working! At least, the driver is
running, according to the device manager. sysinternals.com’s WinObj and

Oney’s DevView show that my symbolic link is in place.

There are a few posts of guys with the same problems, but no solutions.

Thanks for any clues.

john reilly.


You are currently subscribed to ntdev as: xxxxx@storagecraft.com To
unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

“John Reilly” wrote in message news:xxxxx@ntdev…
>
> Thanks, guys! I found out that my IRP_MJ_CREATE dispatch method is
> failing. It is trying to map a driver-allocated block of memory into the
> calling process’s space, and failing the ZwMapViewOfSection() call with
the
> error (from ntstatus.h):
>
> // MessageId: STATUS_CONFLICTING_ADDRESSES
>

Bravo! Yup, you ran into a Win2k-> XP change.

There was a memo from Hector on this dated 31 July 2001
(http://www.osr.com/hector_notes.shtml) in case you wonder about the reason
for the change…

Peter
OSR


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

I suspect you have a bug in processing IRP_MJ_CREATE (probably XP specific
if driver works on Win2k). However, the only thing you can be sure that
devices and symbolic links are created and resolved. In you show your
handler for IRP_MJ_CREATE may be I’ll be able to say more.

Good Night,

Vadik

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of John Reilly
Sent: Thursday, December 06, 2001 4:27 PM
To: NT Developers Interest List
Subject: [ntdev] RE: Nudity, XP, and CreateFile Problems

Yes, I get an IRP_MJ_CREATE. That is the only IRP I get.

I used the fabulous and wonderful tool, Device Filter, which was obviously
written by a genius!

Thanks. What now?

john.


You are currently subscribed to ntdev as: xxxxx@pcausa.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com