getlasterror

Description:

A calling process retrieves the last error occurred during the last call to any kernel function. This way the process is able to determine why an operation was not successful and can inform the user about the symptom or remedies respectively.

Function Prototype:

BYTE getlasterror ();

Parameters:

(This function does not accept any parameters in the current kernel release.)

Return Values:

An 8-bit unsigned integer (BYTE) value representing the code of the last error.

Additional Information

The following table shows a list with all possible error codes and their meaning

Error Code Message Description
0x00 MSG_NO_ERROR There has been no error
0x01 MSG_OUT_OF_MEM There was insufficent memory to perform the operation
0x02 MSG_ACCESS_VIOLATION An unauthorized access to an object belonging to a different process was attempted
0x03 MSG_FILE_NOT_FOUND It was attempted to perform an operation with a file that does not exist
0x04 MSG_ILLEGAL_FILENAME The filename provided contained invalid characters or had zero length
0x05 MSG_FILE_READ_ONLY It was attempted to write a file that is opened for reading only
0x06 MSG_ILLEGAL_PARAMETER The parameter provided to a kernel routine was out of the eligible range
0x07 MSG_UNKNOWN_PROCESS An attempt was made to perform an operation with a process that does not exist
0x08 MSG_UNKNOWN_TASK An attempt was made to perform an operation with a task that does not exist
0x09 MSG_MAX_NPROCS_REACHED The maximum allowed number of processes has been reached
0x0A MSG_MAX_TASKS_REACHED The maximum allowed number of tasks has been reached
0x0B MSG_DEVICE_BUSY It was attempted to perform an operation on a device that is currently not available
0x0C MSG_UNKNOWN_SIGNAL A signal sent to a task is not known


See also createproc, getproc, killproc, isowner, sendsignal, setlasterror