请问如何知道是否有等待打印的文档?(200分)

  • 主题发起人 主题发起人 finity
  • 开始时间 开始时间
F

finity

Unregistered / Unconfirmed
GUEST, unregistred user!
我想知道<br>1。那个打印机有文档在打印<br>2。有几个文档等待<br>总之有关系统打印机的消息如何得到?<br>谢谢
 
1.BOOL OpenPrinter(<br><br>&nbsp; &nbsp; LPTSTR pPrinterName, // pointer to printer or server name <br>&nbsp; &nbsp; LPHANDLE phPrinter, // pointer to printer or server handle <br>&nbsp; &nbsp; LPPRINTER_DEFAULTS pDefault // pointer to printer defaults structure &nbsp;<br>&nbsp; &nbsp;); <br>&nbsp; &nbsp;得到打印机句饼;<br>2.BOOL GetPrinter(<br>HANDLE hPrinter,// handle to printer of interest <br>DWORD Level, // version of printer info data structure <br>//此处Level=2 &nbsp; &nbsp;<br>LPBYTE pPrinter,// pointer to array of bytes that receives printer info. structure <br>DWORD cbBuf, // size, in bytes, of array of bytes <br>LPDWORD pcbNeeded // pointer to variable with count of bytes retrieved (or required) <br>&nbsp; &nbsp;); <br>&nbsp; &nbsp;得到结构 pPrinter,可得到属性DWORD<br>3.<br>BOOL EnumPrinters(<br>DWORD Flags, // types of printer objects to enumerate<br>LPTSTR Name, // name of printer object<br>DWORD Level, // specifies type of printer info structure<br>LPBYTE pPrinterEnum,// pointer to buffer to receive printer info structures<br>DWORD cbBuf, // size, in bytes, of array<br>LPDWORD pcbNeeded,// pointer to variable with no. of bytes copied (or required)<br>LPDWORD pcReturned // pointer to variable with no. of printer info. structures copied<br>&nbsp; &nbsp;);
 
可以举个例子吗?
 

Similar threads

回复
0
查看
873
不得闲
S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
I
回复
0
查看
2K
import
I
后退
顶部