PBORCA_SessionOpen
Description
Establishes an ORCA session and returns a handle that you use for
subsequent ORCA calls.
Syntax
|
1 |
HPBORCA PBORCA_SessionOpen ( void ); |
Return value
HPBORCA. Returns a handle to the ORCA session if it succeeds and
returns 0 if it fails. Opening a session fails only if no memory is
available.
Usage
You must open a session before making any other ORCA function
calls.
There is no overhead or resource issue related to keeping an ORCA
session open; therefore, once it is established, you can leave the session
open as long as it is needed.
For some ORCA tasks, such as importing and querying objects or
building executables, you must call PBORCA_SessionSetLibraryList and
PBORCA_SessionSetCurrentAppl to provide an application context after
opening the session.
Likewise, PBORCA_SccSetTarget provides an implicit application
context for SCC operations. Do not call PBORCA_SessionSetLibraryList and
PBORCA_SetCurrentAppl if you intend to call PBORCA_SccSetTarget.
Examples
This example opens an ORCA session:
|
1 2 3 4 5 6 7 |
lpORCA_Info->hORCASession = PBORCA_SessionOpen(); if (lpORCA_Info->hORCASession = NULL) { lpORCA_Info->lReturnCode = 999; _tcscpy(lpORCA_Info->lpszErrorMessage, _TEXT("Open session failed")); } |
See also