Ha! That worked! Was the problem that I needed to initialize my BytesCopied variable?
At any rate, thank you very much, palbano. You've been most helpful.
Hey, thanks! Didn't know about the Platform SDK update. I downloaded it and installed it.
Now my code compiles just fine, but when I run it, the GetDefaultPrinter() function always returns ERROR_NOT_ENOUGH_MEMORY. This can't be right, because my machine has a gigabyte of RAM, and it's just...
Unfortunately, I've tried that. I use the following code:
DWORD BytesCopied; //Number of bytes returned
char PrinterName[80]; //Name of the printer
if(!GetDefaultPrinter(PrinterName, &BytesCopied))
return false;
I've included Winspool.lib in my project settings, I've even...
I have found a number of articles explaining how to get the name of the default printer in Win95, Win98, WinNT, and Win2000. However, I have found nothing about how to get the name of the default printer in WinXP.
The method for Win95/98 is to use EnumPrinters. I can use EnumPrinters in...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.