Displaying 1 result from an estimated 1 matches for "dwneed".
Did you mean:
wneed
2002 Oct 07
9
GetPrinter Level 2 does not get devmode
...hPrinter=NULL;
PRINTER_DEFAULTS pDefaults;
pDefaults.DesiredAccess = PRINTER_ACCESS_USE;
pDefaults.pDatatype=NULL;
pDefaults.pDevMode=NULL;
BOOL b = OpenPrinter(cPrinterName,&hPrinter,&pDefaults);
if (b)
{
LPBYTE printerInfo=NULL;
DWORD dwNeeded;
b = GetPrinter(hPrinter,2,NULL,NULL,&dwNeeded);
printerInfo = (LPBYTE) new BYTE [dwNeeded];
b = GetPrinter(hPrinter,2,printerInfo,dwNeeded,&dwNeeded);
if(b)
{
PRINTER_INFO_2 * pInfo = (PRINTER_INFO_2 *)printerInfo;...