|
GetError
|
|
|
The GetError method returns error code of last operation.
C++
long GetError(void);
BASIC
GetError() As Long
Parameters
Method has no parameters.
Return Values
The return value is the system error code of the last operation.
The return value is 0 if last operation succeeded.
See Windows SDK documentation for complete list of system error codes.
Remarks
To obtain an error description for system error codes, use GetErrorDescription method
or Windows system function FormatMessage. You can also call GetFailure method to obtain
failure code which gives you additional information on type of failure.
Most IXFile methods set error and failure codes on completion regardless of result; if operation failed codes are set to their appropriate values;
if operation succeeded error and failure codes are both set to 0. For this reason you should retrieve error code immediately when method returns to avoid
wiping it out by another call.
See Also
GetFailure,
GetErrorDescription,
ClearError,
Error Handling