Hi,
Can anyone explain the following behaviour and how to get around it:
Environment:
OS: W2K SP3
I have a mapped network drive E:
E: is valid and has been accessed before running the following,
Open My Computer and show all volumes
Run the following:
Within my driver I call the following code:
bHardErrorMode = IoSetThreadHardErrorMode( FALSE );
ntstatus = IoGetDeviceObjectPointer( (PUNICODE_STRING) ObjectName,
FILE_READ_ATTRIBUTES,
&fileObject,
&pDeviceObject
);
IoSetThreadHardErrorMode( bHardErrorMode );
ObjectName is set to “\DosDevices\E:”
On return ntstatus is 0xC0000022 (STATUS_ACCESS_DENIED), fileObject is
NULL, pDeviceObject is NULL (This is not the point of concern, but would
be interested in knowing why I am getting a STATUS_ACCESS_DENIED,
anyways…)
However when this all returns and I refresh the “My Computer” view (F5),
E: has the network disconnet icon, but functions as normal.
If I substitute FILE_READ_ATTRIBUTES with FILE_READ_DATA the same
happens.
Any hints as to why this is happening and how I can NOT have this
happen?
Thanks in advance,
John