winapi - GetDefaultPrinter() reference unfound in VC6 -
I getDefaultPrinter () and then according to the suggestion to use CreateDC (), but VC6 I have learned, but many People are facing the same problem, but none of them was fruitful. Is this the correct way to use GetDefaultPrinter ().
Includes Winspool.h and Windows.h.
You probably have very old SDKs. Check whether GetDefaultPrinter is defined in your winspool.h file. If not, here are the definitions:
BOOL WINAPI GetDefaultPrinterA (LPTST pszBuffer, LPDWORD pcchBuffer); BOOL WINAPI GetDefaultPrinterW (LPWSTR pszBuffer, LPDword pcchBuffer); #ifdef UNICODE #define GetDefaultPrinter GetDefaultPrinterW #else #define GetDefaultPrinter GetDefaultPrinterA #endif //! Unicode BOOL WINAPI SetDefaultPrinterA (LPCSTR psz printer); BOOL WINAPI SetDefaultPrinterW (LPCWSTR pszPrinter); #ifdef UNICODE #define SetDefaultPrinter SetDefaultPrinterW #else #define SetDefaultPrinter SetDefaultPrinterA #endif //! UNICODE
Comments
Post a Comment