WinBatch® Technical Support Forum

All Things WinBatch => WinBatch => Topic started by: keslaa on July 13, 2015, 09:59:23 AM

Title: DllLastError
Post by: keslaa on July 13, 2015, 09:59:23 AM
I am running a script that is using the UDF ShellTrayModifyTip to display updates to the user. Occasionally, the line
Message("Shell_NotifyIcon Error",DllLastError())
pops up with an error 2. What is that error? I found something online that references an unknown return type, but I'm not sure what that means.
Title: Re: DllLastError
Post by: td on July 13, 2015, 10:10:38 AM
Windows System error 2 has the following associated text:

'The system cannot find the file specified. '

You can find the text for Windows System error in the Tech Database or on MSFT's MSDN Website:

http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/nftechsupt.web+WinBatch/Error~Codes+!!Windows~System~Errors!!.txt (http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/nftechsupt.web+WinBatch/Error~Codes+!!Windows~System~Errors!!.txt)

There is also a script for obtaining the text on the fly in the Tech Database:

http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/nftechsupt.web+WinBatch/DllCall~Information+Get~Windows~System~Error~String.txt (http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/nftechsupt.web+WinBatch/DllCall~Information+Get~Windows~System~Error~String.txt)
Title: Re: DllLastError
Post by: keslaa on July 14, 2015, 05:49:48 AM
Thanks for the reply.

I have been wondering about this because the times it fails or returns this error is when the script is running with no user logged in. I will probably have to account for this; if not logged in, display no tray icon.