Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can any see what's wrong with the following?
Message
General information
Forum:
Visual C++
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00266137
Message ID:
00269353
Views:
24
Hi Vlad,

First, thanks for your help. What I wrote was a modification of MS KB Article Q140285Q140285 (How to modify printer settings using SetPrinter).

Anyway, after changing the printer handle from LPHANDLE to HANDLE, and the parameter passing required. It still didn't work. Then, on a guess, I removed changed the following:
/* Removed the following */
dSize = sizeof(prninfo)
/* Changed */
GetPrinter(iHandle, level, (LPBYTE)prninfo, dSize, &numbytes);
/* to the following */
GetPrinter(iHandle, level, (LPBYTE)prninfo, numbytes, &numbytes);
Then I could get the attributes correctly. However, the status must only be available after a print job has been set.

Anyway, thanks for the help.
George

Ubi caritas et amor, deus ibi est
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform