PDA

View Full Version : How to assign printerName in OpenPrinterW function



Prabha
2nd August 2010, 06:26
I call OpenPrinterW(szPrinterName, &hPrinter, NULL).before that i assign szPrinterName="Epson".
When i compile, the following error comes.

error: cannot convert `const char[6]' to `TCHAR*' in assignment.

I dont know how to set printer name here.

I included windows.h and winspool.h and in .pro file LIBS += -lwinspool.

Help me.Thanks in advance.