Click or drag to resize

GetDosError Function

Return the DOS error code from any application.

Namespace:  XSharp.Core
Assembly:  XSharp.Core (in XSharp.Core.dll) Version: 2.5
Syntax
 FUNCTION GetDosError() AS DWORD

Return Value

Type: UInt32
Remarks
The value of GetDOSError() is an extended DOS error code which is never cleared.
The application which sets this error code need not be the current application or even a X# application.  By contrast, on every DOS call in a X# application, the value of DOSError() is set to the current DOS error if there was an error or is cleared to 0 if there was no error.
Examples
In this example, DOSError() indicates that the last DOS call in the current application did not generate an error.  By contrast, GetDOSError() indicates that a DOS error occurred in the system previously:
X#
1? DOSError()            // 0
2? GetDOSError()        // 2
See Also