Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

Win32_Printer class

$
0
0
Trying to use the following and looking up the last error code given by the printer

[ autoit ]      
Func _GetLastPrinterError()     Local $objWMIService, $colItems     $objWMIService = ObjGet("winmgmts:\\.\root\CIMV2")     $colItems = $objWMIService.ExecQuery ('SELECT * FROM Win32_Printer')     For $objItem in $colItems         msgbox(0,"",$objItem.LastErrorCode)     Next EndFunc

the msgbox() returns an empty string for each printer. Am I supposed to do something to $objItem.LastErrorCode for it to populate correctly? On the MSDN, it tells me that the return value is a UINT32 format value. Not sure if I'm supposed to be doing something special here?

Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>