Access Denied while getting device handle as a normal user.

Hi All,
I have been developing a device driver for touch panel.

Driver:
In AddDevice method, after creating device instance, i’m creating Symbolic
link by using IOCreateSymbolicLink method.

Application:
After logging as a ‘NORMAL USER’, while calling CreateFile for getting
device handle, it is giving ‘ACCESS DENIED’ error. Could any one help me,
how to resolve this problem.

Thanks in Advance,
Regards,
**************************************************************************
This email (including any attachments) is intended for the sole use of the
intended recipient/s and may contain material that is CONFIDENTIAL AND
PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or
distribution or forwarding of any or all of the contents in this message is
STRICTLY PROHIBITED. If you are not the intended recipient, please contact
the sender by email and delete all copies; your cooperation in this regard
is appreciated.
**************************************************************************

You might try using CreateFile with MAXIMUM_ALLOWED for the desired access.
Make sure you make your IOCTL’s in this fashion:

#define IOCTL_DRIVER_GETINFO (ULONG) CTL_CODE( FILE_DEVICE_MYDRIVER, 0x00,
METHOD_BUFFERED, FILE_ANY_ACCESS )

This should give you enough access to perform ioctl’s to the device. The
FILE_ANY_ACCESS is the important part for use with MAXIMUM_ALLOWED.

If you don’t do it this way, you have to mess with security descriptors on
the device you create and give everyone permissions.

Hope that helps.

Matt

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Shiva_Shankar
Sent: Tuesday, April 22, 2003 4:12 AM
To: NT Developers Interest List
Subject: [ntdev] Access Denied while getting device handle as a normal
user.

Hi All,
I have been developing a device driver for touch panel.

Driver:
In AddDevice method, after creating device instance, i’m creating Symbolic
link by using IOCreateSymbolicLink method.

Application:
After logging as a ‘NORMAL USER’, while calling CreateFile for getting
device handle, it is giving ‘ACCESS DENIED’ error. Could any one help me,
how to resolve this problem.

Thanks in Advance,
Regards,
**************************************************************************
This email (including any attachments) is intended for the sole use of the
intended recipient/s and may contain material that is CONFIDENTIAL AND
PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or
distribution or forwarding of any or all of the contents in this message is
STRICTLY PROHIBITED. If you are not the intended recipient, please contact
the sender by email and delete all copies; your cooperation in this regard
is appreciated.
**************************************************************************


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

Make sure the DO_DEVICE_INITIALIZING bit has been cleared from the
device object. Also, are you installing under the mouse device class
(ie are you providing your pointing data through the service callback?)
If so, then mouclass is not allowing the open. You can work around this
by following the guidelines in this kb article.

http://support.microsoft.com/default.aspx?scid=kb;en-us;Q262305

d

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

-----Original Message-----
From: Shiva_Shankar [mailto:xxxxx@Satyam.com]
Sent: Tuesday, April 22, 2003 2:12 AM
To: NT Developers Interest List

Hi All,
I have been developing a device driver for touch panel.

Driver:
In AddDevice method, after creating device instance, i’m creating
Symbolic
link by using IOCreateSymbolicLink method.

Application:
After logging as a ‘NORMAL USER’, while calling CreateFile for getting
device handle, it is giving ‘ACCESS DENIED’ error. Could any one help
me,
how to resolve this problem.

Thanks in Advance,
Regards,
************************************************************************
**
This email (including any attachments) is intended for the sole use of
the
intended recipient/s and may contain material that is CONFIDENTIAL AND
PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying
or
distribution or forwarding of any or all of the contents in this message
is
STRICTLY PROHIBITED. If you are not the intended recipient, please
contact
the sender by email and delete all copies; your cooperation in this
regard
is appreciated.
************************************************************************
**


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

You are creating the link in AddDevice, but you should not be enabling the
link until StartDevice. Why? Because until the StartDevice call is made,
your driver should be in a Stopped PnP state. If the device successfully
starts, it can then move to the Running state and enable the link to open
the interface.

“Shiva_Shankar” wrote in message
news:xxxxx@ntdev…
>
>
> Hi All,
> I have been developing a device driver for touch panel.
>
> Driver:
> In AddDevice method, after creating device instance, i’m creating Symbolic
> link by using IOCreateSymbolicLink method.
>
> Application:
> After logging as a ‘NORMAL USER’, while calling CreateFile for getting
> device handle, it is giving ‘ACCESS DENIED’ error. Could any one help me,
> how to resolve this problem.
>
>
> Thanks in Advance,
> Regards,
>
> This email (including any attachments) is intended for the sole use of the
> intended recipient/s and may contain material that is CONFIDENTIAL AND
> PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying
or
> distribution or forwarding of any or all of the contents in this message
is
> STRICTLY PROHIBITED. If you are not the intended recipient, please contact
> the sender by email and delete all copies; your cooperation in this regard
> is appreciated.
>

>
>
>