怎样获得网络打印机的连接状态? (100分)

  • 主题发起人 主题发起人 酸橙子
  • 开始时间 开始时间

酸橙子

Unregistered / Unconfirmed
GUEST, unregistred user!
怎样知道现在网络打印机没有连接好?是不是首先要知道打印机的ip地址,然后知道跟这
台机器连接是否通畅?
 
BOOL EnumPrinters(
DWORD Flags, // types of printer objects to enumerate
LPTSTR Name, // name of printer object
DWORD Level, // specifies type of printer info structure
LPBYTE pPrinterEnum,// pointer to buffer to receive printer info structures
DWORD cbBuf, // size, in bytes, of array
LPDWORD pcbNeeded,// pointer to variable with no. of bytes copied (or required)
LPDWORD pcReturned // pointer to variable with no. of printer info. structures copied
);
 
对不起,看不懂:)。
delphi里面没有什么函数来测试打印机的状态吗?还非要用这个API?一大堆参数,看的头大
 
Printer.Printers.Count 连接的数量
if Printer.Printers.Count= 0 then
...............
好象在得use printers
 
不是吧?这个是安装了多少打印机才对。但是我网络打印机没有连接的话,这个不行。
 
后退
顶部