I m calling setprinterdata API in my printer driver ,It is called
in a While(1) (infinite loop),When I restart my Personal computer,the
driver vanishes in the printer and faxes folder.
On Sep 22, 7:25 am, hari <haricib...@gmail.com> wrote:
> Hi all,
>
> I m calling setprinterdata API in my printer driver ,It is called
> in a While(1) (infinite loop),When I restart my Personal computer,the
> driver vanishes in the printer and faxes folder.
>
> Code is
>
> While(1)
> {
>
> hPrinter = Openprinter(L"Pname"...................);
>
> DWORD dwErr = SetPrinterData(hPrinter, L"Printer_Status", REG_BINARY ,
> (LPBYTE)szID1, 6);
> ClosePrinter(hPrinter);
>
> }
>
> Thanks in Advance.
> please help me in this issue.
>
> Regards
> Hari
Hi,
You can use the following API to install a local or remote
printer driver, and link the configuration, data, and driver
files as well. The function SetPrinterData() sets the
configuration data for a printer or print server: