Regarding OpenPrinter

K

Kartik Narayanan

Hi,

We are developing monolithic printer drivers on Windows XP and Windows 2003.
Currently we are facing a peculiar problem in a scenario where printer driver
is installed on Windows XP x86 machines (Print server) and shared. From
another Windows XP x86 machine (client) I have accessed the server XP machine
over network and double clicked the shared printer icon. It got installed
successfully.

But in the above scenario OpenPrinter is failing with a desired access value
as PRITNER_ALL_ACCESS. If we change it to PRINTER_ACCESS_USE OpenPrinter has
passed but which is no use to call SetPrinterData.

This is happening only in case of both server and client as XP x86. This is
not happening when we use Windows 2003 as Print server and Windows XP as
client.

Is this behavior expected? If so, as I have logged in an account where I
have administrative rights we are expecting OpenPrinter with
PRINTER_ALL_ACCESS as desired access value should get passed.

Any information on this would be a great help for our printer driver project.

Thanks and Regards,
Kartik.
 
P

Paul Baker [MVP, Windows Desktop Experience]

Check the Security page of the printer properties to see what kind of access
you should expect to be granted.

What is the error code when OpenPrinter fails with PRINTER_ALL_ACCESS. Is it
ERROR_ACCESS_DENIED or something else?

Paul
 
K

Kartik Narayanan

Hi Paul,

Yes, We are getting the error code as ERROR_ACCESS_DENIED.
I am checking the options available in security page.
Please recommend the options.

Thanks and Regards,
Kartik.

Paul Baker [MVP said:
Check the Security page of the printer properties to see what kind of access
you should expect to be granted.

What is the error code when OpenPrinter fails with PRINTER_ALL_ACCESS. Is it
ERROR_ACCESS_DENIED or something else?

Paul

Kartik Narayanan said:
Hi,

We are developing monolithic printer drivers on Windows XP and Windows
2003.
Currently we are facing a peculiar problem in a scenario where printer
driver
is installed on Windows XP x86 machines (Print server) and shared. From
another Windows XP x86 machine (client) I have accessed the server XP
machine
over network and double clicked the shared printer icon. It got installed
successfully.

But in the above scenario OpenPrinter is failing with a desired access
value
as PRITNER_ALL_ACCESS. If we change it to PRINTER_ACCESS_USE OpenPrinter
has
passed but which is no use to call SetPrinterData.

This is happening only in case of both server and client as XP x86. This
is
not happening when we use Windows 2003 as Print server and Windows XP as
client.

Is this behavior expected? If so, as I have logged in an account where I
have administrative rights we are expecting OpenPrinter with
PRINTER_ALL_ACCESS as desired access value should get passed.

Any information on this would be a great help for our printer driver
project.

Thanks and Regards,
Kartik.
 
P

Paul Baker [MVP, Windows Desktop Experience]

Kartik,

Please go to the Security page, click Advanced, then list all the content of
the rows and columns of the list view on that page in a reply to this post.

Paul

Kartik Narayanan said:
Hi Paul,

Yes, We are getting the error code as ERROR_ACCESS_DENIED.
I am checking the options available in security page.
Please recommend the options.

Thanks and Regards,
Kartik.

Paul Baker [MVP said:
Check the Security page of the printer properties to see what kind of
access
you should expect to be granted.

What is the error code when OpenPrinter fails with PRINTER_ALL_ACCESS. Is
it
ERROR_ACCESS_DENIED or something else?

Paul

Kartik Narayanan said:
Hi,

We are developing monolithic printer drivers on Windows XP and Windows
2003.
Currently we are facing a peculiar problem in a scenario where printer
driver
is installed on Windows XP x86 machines (Print server) and shared. From
another Windows XP x86 machine (client) I have accessed the server XP
machine
over network and double clicked the shared printer icon. It got
installed
successfully.

But in the above scenario OpenPrinter is failing with a desired access
value
as PRITNER_ALL_ACCESS. If we change it to PRINTER_ACCESS_USE
OpenPrinter
has
passed but which is no use to call SetPrinterData.

This is happening only in case of both server and client as XP x86.
This
is
not happening when we use Windows 2003 as Print server and Windows XP
as
client.

Is this behavior expected? If so, as I have logged in an account where
I
have administrative rights we are expecting OpenPrinter with
PRINTER_ALL_ACCESS as desired access value should get passed.

Any information on this would be a great help for our printer driver
project.

Thanks and Regards,
Kartik.
 
K

Kartik Narayanan

Hi Paul,

We found that in some Windows XP machines this security tab itself is not
present.
While searching for this security tab in printer properties we found that
ForceGuest in
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\ForceGuest
is repsonsible to decide on the log-in in peer-peer network of Wondows XP.

When we made this ForceGuest key as zero the problem of OpenPrinter returning
ERROR_ACCESS_DENIED is not observed.
So our understanding is that OpenPrinter with desired access value as
PRINTER_ALL_ACCESS returns error if the log-in to the other Windows XP
machine happens with Guest user prvilages.

Is the above understanding correct?
Please confirm.

Thanks and Regards,
Kartik.
Paul Baker [MVP said:
Kartik,

Please go to the Security page, click Advanced, then list all the content of
the rows and columns of the list view on that page in a reply to this post.

Paul

Kartik Narayanan said:
Hi Paul,

Yes, We are getting the error code as ERROR_ACCESS_DENIED.
I am checking the options available in security page.
Please recommend the options.

Thanks and Regards,
Kartik.

Paul Baker [MVP said:
Check the Security page of the printer properties to see what kind of
access
you should expect to be granted.

What is the error code when OpenPrinter fails with PRINTER_ALL_ACCESS. Is
it
ERROR_ACCESS_DENIED or something else?

Paul

message Hi,

We are developing monolithic printer drivers on Windows XP and Windows
2003.
Currently we are facing a peculiar problem in a scenario where printer
driver
is installed on Windows XP x86 machines (Print server) and shared. From
another Windows XP x86 machine (client) I have accessed the server XP
machine
over network and double clicked the shared printer icon. It got
installed
successfully.

But in the above scenario OpenPrinter is failing with a desired access
value
as PRITNER_ALL_ACCESS. If we change it to PRINTER_ACCESS_USE
OpenPrinter
has
passed but which is no use to call SetPrinterData.

This is happening only in case of both server and client as XP x86.
This
is
not happening when we use Windows 2003 as Print server and Windows XP
as
client.

Is this behavior expected? If so, as I have logged in an account where
I
have administrative rights we are expecting OpenPrinter with
PRINTER_ALL_ACCESS as desired access value should get passed.

Any information on this would be a great help for our printer driver
project.

Thanks and Regards,
Kartik.
 
P

Paul Baker [MVP, Windows Desktop Experience]

I would have to see how your machines are set up, it gets complicated.

But yes, that is likely the problem.

How to Set Security in Windows XP Professional That Is Installed in a
Workgroup:
http://support.microsoft.com/kb/290403

Paul

Kartik Narayanan said:
Hi Paul,

We found that in some Windows XP machines this security tab itself is not
present.
While searching for this security tab in printer properties we found that
ForceGuest in
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\ForceGuest
is repsonsible to decide on the log-in in peer-peer network of Wondows XP.

When we made this ForceGuest key as zero the problem of OpenPrinter
returning
ERROR_ACCESS_DENIED is not observed.
So our understanding is that OpenPrinter with desired access value as
PRINTER_ALL_ACCESS returns error if the log-in to the other Windows XP
machine happens with Guest user prvilages.

Is the above understanding correct?
Please confirm.

Thanks and Regards,
Kartik.
Paul Baker [MVP said:
Kartik,

Please go to the Security page, click Advanced, then list all the content
of
the rows and columns of the list view on that page in a reply to this
post.

Paul

Kartik Narayanan said:
Hi Paul,

Yes, We are getting the error code as ERROR_ACCESS_DENIED.
I am checking the options available in security page.
Please recommend the options.

Thanks and Regards,
Kartik.

:

Check the Security page of the printer properties to see what kind of
access
you should expect to be granted.

What is the error code when OpenPrinter fails with PRINTER_ALL_ACCESS.
Is
it
ERROR_ACCESS_DENIED or something else?

Paul

in
message Hi,

We are developing monolithic printer drivers on Windows XP and
Windows
2003.
Currently we are facing a peculiar problem in a scenario where
printer
driver
is installed on Windows XP x86 machines (Print server) and shared.
From
another Windows XP x86 machine (client) I have accessed the server
XP
machine
over network and double clicked the shared printer icon. It got
installed
successfully.

But in the above scenario OpenPrinter is failing with a desired
access
value
as PRITNER_ALL_ACCESS. If we change it to PRINTER_ACCESS_USE
OpenPrinter
has
passed but which is no use to call SetPrinterData.

This is happening only in case of both server and client as XP x86.
This
is
not happening when we use Windows 2003 as Print server and Windows
XP
as
client.

Is this behavior expected? If so, as I have logged in an account
where
I
have administrative rights we are expecting OpenPrinter with
PRINTER_ALL_ACCESS as desired access value should get passed.

Any information on this would be a great help for our printer driver
project.

Thanks and Regards,
Kartik.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top