First, CMD.EXE is not “DOS” - this might seem like an immaterial point,
except that COMMAND.COM generates vastly different behavior from the
perspective of file systems (there are certain directory operations that
can ONLY be tested by using a true DOS operation that runs through
NTVDM.)
Jamey’s comment is right - cmd.exe runs in its own process. However,
your handle, if you created it correctly, would be valid in the context
of any process. Thus, it suggests to me that when you created the
handle in DriverEntry you did not indicate that this was a system handle
(and hence valid in arbitrary process context.) Try specifying
OBJ_KERNEL_HANDLE when you set up your object attributes to indicate
that this handle must be valid in all process contexts.
Regards,
Tony
Tony Mason
Consulting Partner
OSR Open Systems Resources, Inc.
http://www.osr.com
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Dileep Kumar
Sent: Saturday, February 14, 2004 2:36 AM
To: ntfsd redirect
Subject: [ntfsd] Are DOS operations part of system process?
Hello all,
Are IO commands originating from the DOS prompt, considered to be
running in the context of the system process, or does it run in user
process, in win2k/xp?
If the answer is system process, then I need someone to explain why the
situation described below happens.
I create a symbolic link (a drive) to a device object in driverentry.
Then I open a handle to a file. This handle is stored in the device
extension.
Now when I try to access this device from DOS prompt by typing (say,
“x:”), the read dispatcher calls my read function. Here when I access
the file handle that I opened in driverentry, I get a “0xc0000008-
Invalid handle” error. If commands from DOS Prompt are considered as
within the system process, why does this error occur? DriverEntry is
called from the context of the system process. Therefore, my
understanding is whatever handles we open in driverentry, should be
valid throughout the system process.
Thanks for the clarification,
Regards
DK
Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online.
http://taxes.yahoo.com/filing.html
Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17
You are currently subscribed to ntfsd as: xxxxx@osr.com To unsubscribe
send a blank email to xxxxx@lists.osr.com