s.dllerror([message] [dll] [errornumber])
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).
Retrieves dll error description. If errnumber is 0, retrieves the last dll error (GetLastError is called internally).
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.