Mechaflash Posted November 30, 2012 Share Posted November 30, 2012 Trying to use the following and looking up the last error code given by the printerFunc _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 EndFuncthe 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? Spoiler “Hello, ladies, look at your man, now back to me, now back at your man, now back to me. Sadly, he isn’t me, but if he stopped using ladies scented body wash and switched to Old Spice, he could smell like he’s me. Look down, back up, where are you? You’re on a boat with the man your man could smell like. What’s in your hand, back at me. I have it, it’s an oyster with two tickets to that thing you love. Look again, the tickets are now diamonds. Anything is possible when your man smells like Old Spice and not a lady. I’m on a horse.” Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted November 30, 2012 Moderators Share Posted November 30, 2012 Have you tried msgbox(0,"", int($objItem.LastErrorCode))? Not where I can test it, but I seem to recall having to define it. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
Mechaflash Posted November 30, 2012 Author Share Posted November 30, 2012 You know what I'm approaching this all wrong... I thought that I could use this as a solution but the last error code of the printer isn't going to help for my situation... I'm going to re-word my question and change the title. Spoiler “Hello, ladies, look at your man, now back to me, now back at your man, now back to me. Sadly, he isn’t me, but if he stopped using ladies scented body wash and switched to Old Spice, he could smell like he’s me. Look down, back up, where are you? You’re on a boat with the man your man could smell like. What’s in your hand, back at me. I have it, it’s an oyster with two tickets to that thing you love. Look again, the tickets are now diamonds. Anything is possible when your man smells like Old Spice and not a lady. I’m on a horse.” Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now