The standard method is to use the: EnumPrinters () function to obtain#define Printer_enum_default 0x00000001#define printer_enum_local 0x00000002#define printer_enum_ CONNECTIONS 0x00000004#define printer_enum_favorite 0x00000004#define printer_enum_name 0x00000008#define Printer_enum_remote 0x00000010#define printer_enum_shared 0x00000020#define printer_enum_network 0x00000040 BOOL enumprinters ( _in_ DWORD Flags,//Prin
; Pdevnames->woutputoffset =Tcoffset; memcpy ((LPTSTR) Pdevnames+ Tcoffset, p2->Pportname, Pornamelen*sizeof(TCHAR)); Pdevnames->wdefault =0; GlobalUnlock (hDevNames); GlobalFree (p2); //Free printer_info_2//set the new Hdevmode and hDevNames*phdevmode =Hdevmode; *phdevnames =hDevNames; returnTRUE;}/*First, you print the preparation work, get the action handle to the device*/BOOL cprinter::P rintstr (C
software, so you have to turn off the affiliate software will go to the next print, so it hurts, so I made a thread, this thread is to implement the automatic shutdown of the associated software function, But in the process of use will find the card owner phenomenon, so that the user experience is not goodSo I think of the second implementation: After a print request sent to the
Ext: http://blog.csdn.net/lijipan/archive/2005/04/18/352678.aspx
To obtain the status of a printer, you should define a union.
Enum Printerstatus{Other states = 1,UnknownFreeis printing,PreheatingStop printing,In print,Offline}
"Printing" and "printing" are the same meaning, as to why it is so, not yet known.
Add a system.management reference to the program: using System.Management;
Then write the function
Ext: http://blog.csdn.net/lijipan/archive/2005/04/18/352678.aspx
To obtain the status of a printer, you should define a union.
Enum Printerstatus{Other states = 1,UnknownFreeis printing,PreheatingStop printing,In print,Offline}
"Printing" and "printing" are the same meaning, as to why it is so, not yet known.
Add a system.management reference to the program: using System.Management;
Then write the function
Endure for a year, every time problems have to restart the system, and sometimes restart after all normal, and sometimes restart after the useless, often in Word 2010 in a Select font, Word collapsed, and found that at the same time the entire system you can not get to the printer list.
Check the information, there is no good solution, tried many methods, can not be used: There are 3 main reasons:
1. Some i
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.