| Oracle Call Interface Programmer's Guide Release 2 (9.2) Part Number A96584-01 |
|
More OCI Relational Functions, 81 of 106
Creates a key.
sword OCIThreadKeyInit (dvoid *hndl, OCIError *err, OCIThreadKey **key, OCIThreadKeyDestFunc destFn );
The OCI environment or user session handle.
The OCI error handle. If there is an error and OCI_ERROR is returned, the error is recorded in err and diagnostic information can be obtained by calling OCIErrorGet().
The OCIThreadKey in which to create the new key.
The destructor for the key. NULL is permitted.
Each call to this routine allocate and generates a new key that is distinct from all other keys. After this function executes successfully, a pointer to an allocated and initialized key is return. That key can be used with OCIThreadKeyGet() and OCIThreadKeySet(). The initial value of the key will be NULL for all threads.
It is illegal for this function to be called more than once with the same value for the key parameter.
If the destFn parameter is not NULL, the routine pointed to by destFn will be called whenever a thread that has a non-NULL value for the key terminates. The routine will be called with one parameter. The parameter will be the keys value for the thread at the time at which the thread terminated. If the key does not need a destructor function, pass NULL for destFn.
|
![]() Copyright © 1996, 2002 Oracle Corporation. All Rights Reserved. |
|