DosError Function | |
Return the last DOS error code associated with an activation of the runtime error block.
Namespace:
XSharp.Core
Assembly:
XSharp.Core (in XSharp.Core.dll) Version: 2.21
Syntax FUNCTION DosError() AS DWORD
public static uint DosError()
Request Example
View SourceReturn Value
Type:
DWord
The number of the last DOS error.
If the failed operation has no associated DOS error, DOSError() returns 0.
Remarks
When a runtime error occurs and the operation has an associated DOS error, DOSError() is set to that error code.
This value is retained until another runtime error occurs or until you set the value of DOSError() by specifying the nNewDosCode argument.
With file functions, FError() returns the same value as DOSError().
Examples
The following example displays the DOS error code as a string:
1FUNCTION Start()
2 Dir AA:
3 QOut(DOSErrString(DOSError()))
4
See Also