Description
Gets the current error for an ORCA session.
Syntax
void PBORCA_SessionGetError ( HPBORCA hORCASession, LPTSTR lpszErrorBuffer, INT iErrorBufferSize );
Argument |
Description |
---|---|
hORCASession |
Handle to previously established ORCA session. |
lpszErrorBuffer |
Pointer to a buffer in which ORCA will put the current error string. |
iErrorBufferSize |
Size of the buffer pointed to by lpszErrorBuffer. The constant PBORCA_MSGBUFFER provides a suggested buffer size of 256. It is defined in the ORCA header file PBORCA.H |
Return value
None.
Usage
You can call PBORCA_SessionGetError anytime another ORCA function call results in an error. When an error occurs, functions always return some useful error code. The complete list of codes is shown in ORCA return codes. However, you can get ORCA's complete error message by calling PBORCA_SessionGetError.
If there is no current error, the function puts an empty string ("") into the error buffer.
Examples
This example stores the current error message in the string buffer pointed to by lpszErrorMessage. The size of the buffer was set previously and stored in dwErrorBufferLen:
PBORCA_SessionGetError(lpORCA_Info->hORCASession, lpORCA_Info->lpszErrorMessage, (int) lpORCA_Info->dwErrorBufferLen);
In these examples, session information is saved in the data structure ORCA_Info, shown in About the examples.