Ok, I looked at the w2k docs, it is not supposed to fail with
STATUS_SHARING_VIOLATION, but it is. Has anyone else seen this?
All I am trying to do is (it has worked on NT4):
RtlInitUnicodeString (&Device, MY_DEV_NAME);
RC = IoGetDeviceObjectPointer (&Device, FILE_READ_DATA | FILE_WRITE_DATA,
&pFile, &pDevObj);
if (!NT_SUCCESS (RC))
{
return (FALSE);
}
I have checked MY_DEV_NAME object exists and is of the format L
“\Device\stuff”. I have also tried the /??/ name, same error.
I have tried various permissions, ANY, STANDARD, etc…
Any idea?
Thanks,
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
wrote in message news:xxxxx@ntdev…
>
> Ok, I looked at the w2k docs, it is not supposed to fail with
> STATUS_SHARING_VIOLATION, but it is. Has anyone else seen this?
>
The only time I’ve seen this happen is if the CREATE that’s implicitly
issued to the target device as part of IoGetDeviceObjectPointer(…) is
refused with STATUS_SHARING_VIOLATION. This is a pretty odd error, as
you’re implying. It would ordinarily mean “somebody else has this
file/device open and isn’t sharing it.” The error I get back when a call
to this function fails is STATUS_ACCESS_DENIED.
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
Maybe change FILE_READ_DATA | FILE_WRITE_DATA for something else?
Max
----- Original Message -----
From:
To: “NT Developers Interest List”
Sent: Tuesday, December 04, 2001 4:00 PM
Subject: [ntdev] IoGetDeviceObjectPointer fails with STATUS_SHARING_VIOLATION?
> Ok, I looked at the w2k docs, it is not supposed to fail with
> STATUS_SHARING_VIOLATION, but it is. Has anyone else seen this?
>
> All I am trying to do is (it has worked on NT4):
>
> RtlInitUnicodeString (&Device, MY_DEV_NAME);
>
> RC = IoGetDeviceObjectPointer (&Device, FILE_READ_DATA | FILE_WRITE_DATA,
> &pFile, &pDevObj);
> if (!NT_SUCCESS (RC))
> {
> return (FALSE);
> }
>
> I have checked MY_DEV_NAME object exists and is of the format L
> “\Device\stuff”. I have also tried the /??/ name, same error.
>
> I have tried various permissions, ANY, STANDARD, etc…
>
> Any idea?
>
> Thanks,
> John
>
> —
> 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