HTFC Forums

H.T.F.C.

How To Fix Computers





Go Back   HTFC Forums > Hardware Newsgroups > Printers

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1  
Old 09-22-2007, 03:25 PM
hari
 
Posts: n/a
Default help in setPrinterdata function.

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

Reply With Quote
Sponsored Links
Fix your Windows Problems - FAST.
FREE Safe Scan Registry Check. Locate & Fix Errors in Minutes!
  #2  
Old 09-22-2007, 09:43 PM
Kellie Fitton
 
Posts: n/a
Default Re: help in setPrinterdata function.

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:

AddPrinterDriverEx()

http://msdn2.microsoft.com/en-us/library/ms535645.aspx

http://msdn2.microsoft.com/en-us/library/ms535657.aspx

Kellie.


Reply With Quote
Sponsored Links
Fix your Windows Problems - FAST.
FREE Safe Scan Registry Check. Locate & Fix Errors in Minutes!
Reply


Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Itunes - What is it's function? George Windows XP 6 09-21-2007 06:24 PM
Explore Function DRFineman Windows XP 1 08-06-2007 06:33 PM
Hibernate Function Hooman Rezaei Windows Vista 2 07-20-2007 03:40 AM
Korean ime right alt function Onefornine Windows XP 0 06-27-2007 04:50 AM
F8 function key use Compdoc Windows XP 2 05-18-2007 09:58 PM


All times are GMT. The time now is 02:18 PM.


Powered by vBulletin® Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0
© 2004 - 2007 Web-S-Sense Pty. Ltd. Usenet and forums posts © their respective authors.
Ad Management by RedTyger