|Oracle Call Interface Programmer's Guide
Part Number A89857-01
OCI Relational Functions, 4 of 39
Creates and initializes an environment for OCI functions to work under.
sword OCIEnvCreate ( OCIEnv **envhpp, ub4 mode, CONST dvoid *ctxp, CONST dvoid *(*malocfp) (dvoid *ctxp, size_t size), CONST dvoid *(*ralocfp) (dvoid *ctxp, dvoid *memptr, size_t newsize), CONST void (*mfreefp) (dvoid *ctxp, dvoid *memptr)) size_t xtramemsz, dvoid **usrmempp );
A pointer to an environment handle whose encoding setting is specified by
mode. The setting will be inherited by statement handles derived from
Specifies initialization of the mode. Valid modes are:
OCIEnvCallback. The default behavior is to allow calling of
OCIEnvCallbackat the time that the environment is created.
Specifies the user-defined context for the memory callback routines.
Specifies the user-defined memory allocation function. If mode is OCI_THREADED, this memory allocation routine must be thread safe.
Specifies the context pointer for the user-defined memory allocation function.
Specifies the size of memory to be allocated by the user-defined memory allocation function.
Specifies the user-defined memory re-allocation function. If the mode is OCI_THREADED, this memory allocation routine must be thread safe.
Specifies the context pointer for the user-defined memory reallocation function.
Pointer to memory block.
Specifies the new size of memory to be allocated
Specifies the user-defined memory free function. If mode is OCI_THREADED, this memory free routine must be thread-safe.
Specifies the context pointer for the user-defined memory free function.
Pointer to memory to be freed
Specifies the amount of user memory to be allocated for the duration of the environment.
Returns a pointer to the user memory of size
xtramemsz allocated by the call for the user.
This call creates an environment for all the OCI calls using the modes specified by the user.
This call is invoked before any other OCI calls, so it sets up any Unicode support in the environment handle, at the top-most level. The Unicode setting is made by the
mode argument. Set mode to OCI_UTF16.
This call returns an environment handle which is then used by the remaining OCI functions. There can be multiple environments in OCI, each with its own environment modes. This function also performs any process level initialization if required by any mode. For example if the user wants to initialize an environment as OCI_THREADED, then all libraries that are used by OCI are also initialized in the threaded mode.
If you are writing a DLL or a shared library using OCI library then this call should definitely be used instead of
For more information about the