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.