Get dll error description

Syntax

s.dllerror([message] [dll] [errornumber])

 

Parameters

s - str variable.

message - string to prepend. Default: "".

dll - where to search for error description. Default: "". Possible values:

"" or omitted search in system dlls (mostly used).
a dll filename or full path search in that dll.
"C" retrieve C run-time library (MSVCRT) error description.

errornumber - an error number (e.g., returned by the GetLastError function). Default: 0 (last dll error).

 

Remarks

Retrieves dll error description. If errnumber is 0, retrieves the last dll error (GetLastError is called internally).

 

Example

if CopyFile("nosuchfile" "tonosuchfile" 1) = 0
	str s.dllerror("Last dll error: ")
	out s
 Output:
 Last dll error: The system cannot find the file specified.