Hi I am trying to install a windows printer driver uploaded on a
RED-HAT 9.0 machine through a samba server. During Installation in the
windows client, the setprinterdata function gets called to write the
printer setting onto the registry. But here I get an access_denied
error. But then I modified the code to open the registry manually and
then write to the registry. This works fine. So I if I can still write
to the registry using RegSetValue why does SetPrinterData give me
Access_denied???

Please let me know if you guys ever had this problem and is there some
fix to this behaviour of setprinterdata function.

Thanks
Debashis

Re: SetPrinterData ERROR_ACCESS_DENIED by Carey

Carey
Wed Feb 04 15:24:38 CST 2004

x42une@yahoo.com (dave) wrote:

>Hi I am trying to install a windows printer driver uploaded on a
>RED-HAT 9.0 machine through a samba server. During Installation in the
>windows client, the setprinterdata function gets called to write the
>printer setting onto the registry. But here I get an access_denied
>error. But then I modified the code to open the registry manually and
>then write to the registry. This works fine. So I if I can still write
>to the registry using RegSetValue why does SetPrinterData give me
>Access_denied???

Where did you get the printer handle? If you used OpenPrinter, did you
specify PRINTER_ALL_ACCESS or PRINTER_ACCESS_ADMINISTER?


--
Carey Gregory
Windows Print Drivers & Components
http://www.gw-tech.com