5 52free Unregistered / Unconfirmed GUEST, unregistred user! 2003-06-22 #2 HUBDOG的方案,不知可不可行 var pinfo: pPRINTERINFO2; pprt,a: Cardinal; bDWORD; begin b:=allocmem(256); pinfo:=AllocMem(1000); if OpenPrinter('HP DJ 200',pprt,nil) then begin a:=1000; if getprinter(pprt,2,pinfo,a,b) then showmessage(pinfo.pPrinterName+' ststus:'+inttostr(pinfo.Status)); ClosePrinter(pprt); end; freemem(b); freemem(pinfo); end;
HUBDOG的方案,不知可不可行 var pinfo: pPRINTERINFO2; pprt,a: Cardinal; bDWORD; begin b:=allocmem(256); pinfo:=AllocMem(1000); if OpenPrinter('HP DJ 200',pprt,nil) then begin a:=1000; if getprinter(pprt,2,pinfo,a,b) then showmessage(pinfo.pPrinterName+' ststus:'+inttostr(pinfo.Status)); ClosePrinter(pprt); end; freemem(b); freemem(pinfo); end;