Browse Source

+ update of oracle bindings

git-svn-id: trunk@2540 -
joost 19 years ago
parent
commit
3574454490

+ 13 - 0
.gitattributes

@@ -1607,7 +1607,20 @@ packages/base/oracle/example/oraclew.pp svneol=native#text/plain
 packages/base/oracle/example/test01.pp svneol=native#text/plain
 packages/base/oracle/fpmake.inc svneol=native#text/plain
 packages/base/oracle/fpmake.pp svneol=native#text/plain
+packages/base/oracle/nzerror.inc -text
+packages/base/oracle/nzt.inc -text
+packages/base/oracle/oci.inc -text
+packages/base/oracle/oci.pp -text
+packages/base/oracle/oci1.inc -text
+packages/base/oracle/ociap.inc -text
+packages/base/oracle/ocidfn.inc -text
+packages/base/oracle/ocidyn.pp -text
 packages/base/oracle/oraoci.pp svneol=native#text/plain
+packages/base/oracle/oratypes.pp -text
+packages/base/oracle/orl.inc -text
+packages/base/oracle/oro_implementation.inc -text
+packages/base/oracle/oro_interface.inc -text
+packages/base/oracle/ort.inc -text
 packages/base/pasjpeg/Makefile svneol=native#text/plain
 packages/base/pasjpeg/Makefile.fpc svneol=native#text/plain
 packages/base/pasjpeg/PasJpeg.raw -text

+ 52 - 40
packages/base/oracle/Makefile

@@ -1,8 +1,8 @@
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2006/02/04]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2006/02/12]
 #
 default: all
-MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-emx i386-watcom i386-netwlibc i386-wince m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos powerpc-linux powerpc-netbsd powerpc-macos powerpc-darwin powerpc-morphos sparc-linux sparc-netbsd sparc-solaris x86_64-linux x86_64-freebsd x86_64-win64 arm-linux arm-palmos arm-wince powerpc64-linux
+MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos powerpc-linux powerpc-netbsd powerpc-macos powerpc-darwin powerpc-morphos sparc-linux sparc-netbsd sparc-solaris x86_64-linux x86_64-freebsd x86_64-win64 arm-linux arm-palmos arm-wince powerpc64-linux
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx
 LIMIT83fs = go32v2 os2 emx watcom
@@ -233,118 +233,121 @@ PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages/base $(FPCDIR)/packages/ext
 override PACKAGE_NAME=oracle
 override PACKAGE_VERSION=2.0.0
 ifeq ($(FULL_TARGET),i386-linux)
-override TARGET_UNITS+=oraoci
+override TARGET_UNITS+=oci ocidyn oratypes oraoci
 endif
 ifeq ($(FULL_TARGET),i386-go32v2)
-override TARGET_UNITS+=oraoci
+override TARGET_UNITS+=oci ocidyn oratypes oraoci
 endif
 ifeq ($(FULL_TARGET),i386-win32)
-override TARGET_UNITS+=oraoci
+override TARGET_UNITS+=oci ocidyn oratypes oraoci
 endif
 ifeq ($(FULL_TARGET),i386-os2)
-override TARGET_UNITS+=oraoci
+override TARGET_UNITS+=oci ocidyn oratypes oraoci
 endif
 ifeq ($(FULL_TARGET),i386-freebsd)
-override TARGET_UNITS+=oraoci
+override TARGET_UNITS+=oci ocidyn oratypes oraoci
 endif
 ifeq ($(FULL_TARGET),i386-beos)
-override TARGET_UNITS+=oraoci
+override TARGET_UNITS+=oci ocidyn oratypes oraoci
 endif
 ifeq ($(FULL_TARGET),i386-netbsd)
-override TARGET_UNITS+=oraoci
+override TARGET_UNITS+=oci ocidyn oratypes oraoci
 endif
 ifeq ($(FULL_TARGET),i386-solaris)
-override TARGET_UNITS+=oraoci
+override TARGET_UNITS+=oci ocidyn oratypes oraoci
 endif
 ifeq ($(FULL_TARGET),i386-qnx)
-override TARGET_UNITS+=oraoci
+override TARGET_UNITS+=oci ocidyn oratypes oraoci
 endif
 ifeq ($(FULL_TARGET),i386-netware)
-override TARGET_UNITS+=oraoci
+override TARGET_UNITS+=oci ocidyn oratypes oraoci
 endif
 ifeq ($(FULL_TARGET),i386-openbsd)
-override TARGET_UNITS+=oraoci
+override TARGET_UNITS+=oci ocidyn oratypes oraoci
 endif
 ifeq ($(FULL_TARGET),i386-wdosx)
-override TARGET_UNITS+=oraoci
+override TARGET_UNITS+=oci ocidyn oratypes oraoci
+endif
+ifeq ($(FULL_TARGET),i386-darwin)
+override TARGET_UNITS+=oci ocidyn oratypes oraoci
 endif
 ifeq ($(FULL_TARGET),i386-emx)
-override TARGET_UNITS+=oraoci
+override TARGET_UNITS+=oci ocidyn oratypes oraoci
 endif
 ifeq ($(FULL_TARGET),i386-watcom)
-override TARGET_UNITS+=oraoci
+override TARGET_UNITS+=oci ocidyn oratypes oraoci
 endif
 ifeq ($(FULL_TARGET),i386-netwlibc)
-override TARGET_UNITS+=oraoci
+override TARGET_UNITS+=oci ocidyn oratypes oraoci
 endif
 ifeq ($(FULL_TARGET),i386-wince)
-override TARGET_UNITS+=oraoci
+override TARGET_UNITS+=oci ocidyn oratypes oraoci
 endif
 ifeq ($(FULL_TARGET),m68k-linux)
-override TARGET_UNITS+=oraoci
+override TARGET_UNITS+=oci ocidyn oratypes oraoci
 endif
 ifeq ($(FULL_TARGET),m68k-freebsd)
-override TARGET_UNITS+=oraoci
+override TARGET_UNITS+=oci ocidyn oratypes oraoci
 endif
 ifeq ($(FULL_TARGET),m68k-netbsd)
-override TARGET_UNITS+=oraoci
+override TARGET_UNITS+=oci ocidyn oratypes oraoci
 endif
 ifeq ($(FULL_TARGET),m68k-amiga)
-override TARGET_UNITS+=oraoci
+override TARGET_UNITS+=oci ocidyn oratypes oraoci
 endif
 ifeq ($(FULL_TARGET),m68k-atari)
-override TARGET_UNITS+=oraoci
+override TARGET_UNITS+=oci ocidyn oratypes oraoci
 endif
 ifeq ($(FULL_TARGET),m68k-openbsd)
-override TARGET_UNITS+=oraoci
+override TARGET_UNITS+=oci ocidyn oratypes oraoci
 endif
 ifeq ($(FULL_TARGET),m68k-palmos)
-override TARGET_UNITS+=oraoci
+override TARGET_UNITS+=oci ocidyn oratypes oraoci
 endif
 ifeq ($(FULL_TARGET),powerpc-linux)
-override TARGET_UNITS+=oraoci
+override TARGET_UNITS+=oci ocidyn oratypes oraoci
 endif
 ifeq ($(FULL_TARGET),powerpc-netbsd)
-override TARGET_UNITS+=oraoci
+override TARGET_UNITS+=oci ocidyn oratypes oraoci
 endif
 ifeq ($(FULL_TARGET),powerpc-macos)
-override TARGET_UNITS+=oraoci
+override TARGET_UNITS+=oci ocidyn oratypes oraoci
 endif
 ifeq ($(FULL_TARGET),powerpc-darwin)
-override TARGET_UNITS+=oraoci
+override TARGET_UNITS+=oci ocidyn oratypes oraoci
 endif
 ifeq ($(FULL_TARGET),powerpc-morphos)
-override TARGET_UNITS+=oraoci
+override TARGET_UNITS+=oci ocidyn oratypes oraoci
 endif
 ifeq ($(FULL_TARGET),sparc-linux)
-override TARGET_UNITS+=oraoci
+override TARGET_UNITS+=oci ocidyn oratypes oraoci
 endif
 ifeq ($(FULL_TARGET),sparc-netbsd)
-override TARGET_UNITS+=oraoci
+override TARGET_UNITS+=oci ocidyn oratypes oraoci
 endif
 ifeq ($(FULL_TARGET),sparc-solaris)
-override TARGET_UNITS+=oraoci
+override TARGET_UNITS+=oci ocidyn oratypes oraoci
 endif
 ifeq ($(FULL_TARGET),x86_64-linux)
-override TARGET_UNITS+=oraoci
+override TARGET_UNITS+=oci ocidyn oratypes oraoci
 endif
 ifeq ($(FULL_TARGET),x86_64-freebsd)
-override TARGET_UNITS+=oraoci
+override TARGET_UNITS+=oci ocidyn oratypes oraoci
 endif
 ifeq ($(FULL_TARGET),x86_64-win64)
-override TARGET_UNITS+=oraoci
+override TARGET_UNITS+=oci ocidyn oratypes oraoci
 endif
 ifeq ($(FULL_TARGET),arm-linux)
-override TARGET_UNITS+=oraoci
+override TARGET_UNITS+=oci ocidyn oratypes oraoci
 endif
 ifeq ($(FULL_TARGET),arm-palmos)
-override TARGET_UNITS+=oraoci
+override TARGET_UNITS+=oci ocidyn oratypes oraoci
 endif
 ifeq ($(FULL_TARGET),arm-wince)
-override TARGET_UNITS+=oraoci
+override TARGET_UNITS+=oci ocidyn oratypes oraoci
 endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
-override TARGET_UNITS+=oraoci
+override TARGET_UNITS+=oci ocidyn oratypes oraoci
 endif
 ifeq ($(FULL_TARGET),i386-linux)
 override TARGET_EXAMPLEDIRS+=example
@@ -382,6 +385,9 @@ endif
 ifeq ($(FULL_TARGET),i386-wdosx)
 override TARGET_EXAMPLEDIRS+=example
 endif
+ifeq ($(FULL_TARGET),i386-darwin)
+override TARGET_EXAMPLEDIRS+=example
+endif
 ifeq ($(FULL_TARGET),i386-emx)
 override TARGET_EXAMPLEDIRS+=example
 endif
@@ -1263,6 +1269,9 @@ endif
 ifeq ($(FULL_TARGET),i386-wdosx)
 REQUIRE_PACKAGES_RTL=1
 endif
+ifeq ($(FULL_TARGET),i386-darwin)
+REQUIRE_PACKAGES_RTL=1
+endif
 ifeq ($(FULL_TARGET),i386-emx)
 REQUIRE_PACKAGES_RTL=1
 endif
@@ -1983,6 +1992,9 @@ endif
 ifeq ($(FULL_TARGET),i386-wdosx)
 TARGET_EXAMPLEDIRS_EXAMPLE=1
 endif
+ifeq ($(FULL_TARGET),i386-darwin)
+TARGET_EXAMPLEDIRS_EXAMPLE=1
+endif
 ifeq ($(FULL_TARGET),i386-emx)
 TARGET_EXAMPLEDIRS_EXAMPLE=1
 endif

+ 1 - 1
packages/base/oracle/Makefile.fpc

@@ -7,7 +7,7 @@ name=oracle
 version=2.0.0
 
 [target]
-units=oraoci
+units=oci ocidyn oratypes oraoci
 exampledirs=example
 
 [require]

+ 12 - 11
packages/base/oracle/README

@@ -1,20 +1,21 @@
-  These units provides interface to Oracle Call Interface.
-Object workaround (TOraDatabase etc...) is on the way.
+These units provides interface to Oracle Call Interface.
 
-  Unit oraclew contains some procedures and functions,
+For the older 'oraoci' unit to compile you need oracle
+server installed, these units was tested and performed
+on Oracle 8.0.1.5 Standard server. One developer license
+of Oracle server is free of charge...
+
+Unit oraclew contains some procedures and functions,
 which makes usage of oraoci not so painfull... But - 
 if you wanna to program in RAW OCI, you really can ;)
 
-To compile you need oracle server installed, these units
-was tested and performed on Oracle 8.0.1.5 Standard
-server. One developer license of Oracle server is free
-of charge...
+The oci and ocidyn units are a complete conversion from
+Oracle's .h files. The former links statically to the
+library, the latter dynamically.
 
 You need to have oracle lib directory in ldpath, too,
 or you can this path set in Makefile.fpc (is commented
 there)
 
-After all this, run 'make examples' and enjoy!
-
-Pavel Stingl
[email protected]
+Joost van der Sluis,
[email protected]

+ 658 - 0
packages/base/oracle/nzerror.inc

@@ -0,0 +1,658 @@
+{
+  Automatically converted by H2Pas 1.0.0 from nzerror.h
+  The following command line parameters were used:
+    -p
+    -D
+    -l
+    jojo.so
+    nzerror.h
+}
+
+{$PACKRECORDS C}
+
+  { DISABLE check_long_lines   }
+  {
+   * $Header: nzerror.h 30-jan-2005.21:20:26 skalyana Exp $
+   *
+   * Copyright (c) 1995, 2005, Oracle. All rights reserved.  
+    }
+  { ENABLE check_long_lines   }
+  {
+    NAME
+       nzerror.h - error numbers for the Oracle Security Server
+    DESCRIPTION
+       None.
+    PUBLIC FUNCTION(S)
+       None.
+    PRIVATE FUNCTION(S)
+       None.
+    NOTES
+       A pragma is used to silence olint about the enum value names not being
+       unique within 7 characters. This limit is being changed to 30.
+    MODIFIED
+       skalyana   01/30/05 - 
+       rchahal    07/16/04 - add cert label 
+       rchahal    07/06/04 - 
+       rchahal    10/15/03 - bug 2513821 
+       rchahal    08/14/03 - new error range (43000 - 43499) 
+       skalyana   08/25/03 - Error changes 
+       rchahal    06/27/03 - RSA errors
+       rchahal    05/27/03 - convert wallet
+       skalyana   03/07/03 - Move FIPS errors
+       rchahal    02/28/03 - bug 2648177
+       rchahal    01/20/03 - use sltsky
+       rchahal    11/11/02 - pkcs11 support
+       skalyana   11/29/02 - Add mutex errors
+       akoyfman   11/01/02 - adding crl cache
+       rchahal    10/23/02 - crldp error
+       rchahal    10/15/02 - fetch crl from ldap
+       rchahal    10/07/02 - crl support
+       akoyfman   10/16/02 - Update with SSL PLus 4.2 errors
+       skalyana   10/04/02 - Certicom SSL Plus 4.2 Upgrade changes
+       akoyfman   08/06/02 - adding sso wallet errors
+       akoyfman   07/12/02 - adding secret store errors
+       skalyana   07/07/02 - Add more errors for FIPS self tests
+       skalyana   07/01/02 - Add more errors
+       skalyana   06/03/02 - Add NZ error for self test failure.
+       ajacobs    02/22/01 - Add some entrust errors
+       vle        02/09/01 - add error mesg
+       lkethana   08/11/00 - Extension Errors
+       lkethana   07/30/00 - add pkcs12 errors
+       lkethana   06/17/00 - mult cert errors
+       lkethana   06/11/00 - multiple cert support
+       rturlapa   03/29/00 - Add error meesage for Entrust Login failure.
+       rwessman   07/07/99 - Deleted include of sslerrs.h. It caused the RDBMS bu
+       rwessman   07/02/99 - fixed merge errors
+       rwessman   07/01/99 - moved NZOS errors to nzerror to make them visible
+       supriya    12/16/98 - add new error for cert chain.
+       arswamin   12/04/98 - add NZERROR_NO_MATCHING_PRIVATE_KEY
+       qdinh      11/12/98 - add NZERROR_VALIDITY_EXPIRED.
+       arswamin   06/17/98 - add INIT_FAILED
+       sdange     06/10/98 - change wrong password to bad password
+       amthakur   06/09/98 - adding error messages
+       wliau      03/10/97 - Add new error message for snzdfo.c.
+       rwessman   03/14/97 - Consolidated PL/SQL toolkit errors into generic erro
+       rwessman   02/26/97 - Added NZERROR_UNSUPPORTED. Corrected values of
+                             errors outside the valid range.
+       asriniva   03/02/97 - Fix olint warning
+       rwessman   02/26/97 - Added NZERROR_UNSUPPORTED
+       rwessman   01/02/97 - Changed PLSQL package errors to be TK_PLSQL to
+                             separate them from the errors generated by the
+                             Oracle interface.
+       rwessman   12/30/96 - Merged in PL/SQL toolkit errors
+       sdange     11/14/96 - (Added NZERROR_DECRYPT_FAILED to the enum list)
+       rwessman   12/02/96 -
+       rwessman   11/25/96 - Added error messages for PL/SQL functions.
+       asriniva   10/31/96 - Include oratypes.h
+       asriniva   10/29/96 - Fix numbering.
+       asriniva   10/29/96 - Fix error numbers
+       asriniva   10/29/96 - Correct type-o
+       asriniva   10/28/96 - Add more TK errors
+       asriniva   10/28/96 - Convert OKAPI errors to TK errors.
+       rwessman   10/17/96 - still more OSS TK errors
+       asriniva   10/16/96 - OKAPI errors
+       asriniva   10/15/96 - OSSTK errors
+       rwessman   10/15/96 - Added more OSS TK errors
+       asriniva   10/09/96 - Add OSSTK errors.
+       rwessman   09/05/96 - Added errors for PL/SQL functions.
+       wliau      09/05/96 - correct error numbers.
+       $Log:  $
+   * Revision 1.26  1996/07/15  23:07:23  wliau
+   * Added NZERROR_AUTH_SHARED_MEMORY
+   *
+   * Revision 1.25  1996/07/01  20:40:15  asriniva
+   * Finished RSA verify/sign.
+   *
+   * Revision 1.24  1996/06/27  20:39:41  rwessman
+   * Added more errors.
+   *
+   * Revision 1.23  1996/05/31  17:33:40  rwessman
+   * Updated nzerror.h to contain bug # for olint enum bug.
+   *
+   * Revision 1.22  1996/05/31  17:12:30  rwessman
+   * Assigned values to the various errors.
+   *
+   * Revision 1.21  1996/05/13  20:46:58  ggilchri
+   * Added more attribute related error conditions
+   *
+   }
+  { ORATYPES  }
+  {
+  ** Errors - when an error is added here, a message corresponding to the
+  ** error number must be added to the message file.
+  ** New errors must be assigned numbers, otherwise the compiler can assign any
+  ** value that it wants, which may lead to invalid error numbers being
+  ** generated.
+  ** The number range currently assigned to the OSS is 28750 - 29249
+  ** New number range 43000 - 43499
+   }
+  { A catchall for errors  }
+  { No more memory  }
+  { Failed to init data source  }
+  { Failed to terminate data source  }
+  { Store object in data source failed  }
+  { Failed to obtain object from data source  }
+  { Callback failed to allocate memory  }
+  { Attempted to ask for 0 bytes of memory  }
+  { Callback failed to free memory  }
+  { Open of file failed  }
+  { Creation of list failed  }
+  { No list element found  }
+  { Addition of list element failed  }
+  { Retrieval of an unknown parameter type  }
+  { Retrieval of parameter failed  }
+  { Data method list does not exist  }
+  { Failed to terminate  }
+  { Bad version number  }
+  { Bad magic number  }
+  { Data retrieval method specified does not exist  }
+  {The data source is already initialized  }
+  { The data source is not initialized  }
+  { File ID is bad  }
+  { Failed to write magic and version  }
+  { Failed to write to file  }
+  { Failed to close file  }
+  { The buffer supplied by the caller is too small  }
+  { NL failed in creating a binding  }
+  { A parameter was in a bad format  }
+  { No method was specified for a data type  }
+  { Illegal method for data type  }
+  { No method specified when required  }
+  { Data source is not allocated  }
+  { Invalid parameter name  }
+  { Could not translate OSD file name  }
+  { Selected parameter is non-existent  }
+  { Encrypted private key decryption failure  }  { Private key encryption failed  }
+  { Incorrect input or unknown error  }  { Type of name requested is not available  }
+  { Failure to generate an NLS string  }
+  { Failed to verify a certificate  }
+  { an OCI call to process some plsql failed  }
+  { an OCI call to bind an internal var. failed  }
+  { failed to init role retrieval  }
+  { Did not complete role retrieval  }
+  { Data method specified not supported  }
+  { Invalid data type specified for key  }
+  { Number of sub-keys to bind does not match count in initialized key  }
+  { Failed to retreieve authentication information from the shared memory  }
+  { RIO Open Failed  }
+  { RIO object type invalid  }
+  { RIO mode invalid  }
+  { RIO io set or numberinvalid  }
+  { RIO close failed  }
+  { RIO retrieve failed  }
+  { RIO store failed  }
+  { RIO update failed  }
+  { RIO info failed  }
+  { RIO delete failed  }
+  { Key descriptor create failed  }
+  { access descriptor invalid  }
+  { record invalid  }
+  { record type and AD type not matched  }
+  { A number passed to PL/SQL could not be converted to real format  }
+  { A number in machine format could not be converted to Oracle format  }
+  { A password was not provided to a PL/SQL function  }
+  { A PL/SQL function returned an error  }
+  { The package context was not specified to a PL/SQL function  }
+  { The user's distinguished name was not provided to a PL/SQL function  }
+  { The state of either a signature or decryption/encryption was not provided  }
+  { An input buffer was specified to a PL/SQL function  }
+  { No seed was specified to the PL/SQL seed initialization function  }
+  { Number of bytes was not specified to the PL/SQL random number generator  }
+  { Invalid encryption/decryption/signature state passed  }
+  { No crypto engine function was passed in  }
+  { An invalid crypto engine function was passed in  }
+  { An invalid cipher type was passed in  }
+  { An invalid identity type was specified  }
+  { No cipher type was specified  }
+  { No identity type was specified  }
+  { No data unit format was specified  }
+  { Invalid data unit format was provided to function  }
+  { Not enough info (usually parameters) provided to a PL/SQL function  }
+  { Buffer provided by PL/SQL is too small for data to be returned  }
+  { Identity descriptor not present or too small  }
+  { Wallet has not been opened yet  }
+  { No wallet descriptor specified to PL/SQL function  }
+  { No identity descriptor specified to PL/SQL function  }
+  { No persona descriptor was specified to PL/SQL function  }
+  { Wallet was already opened  }
+  { Operation is not supported  }
+  { Bad file permission specified  }
+  { OSD error when opening file  }
+  { cert + privkey + tp files do not exist  }
+  { no certificate  }
+  { no private-key  }
+  { no clear key-file  }
+  { no encrypted priv key  }
+  { no trustpoints  }
+  { no clear trustpoints  }
+  { no encrypted trustpoints  }
+  { bad password  }
+  { init failed or 
+                        module loading failed  }
+  {****************************** SSL ERRORS ******************************* }
+  {
+     * In order to allow SSL errors to be mapped to Oracle errors, space is
+     * provided here. One Oracle error is provided for each SSL error to make
+     * error handling easier. A macro is provided to do the conversion.
+     * NOTE: ANY CHANGE IN SSL ERRORS MUST BE REFLECTED HERE.
+     * To add an SSL error, use the following formula to calculate the Oracle
+     * error:
+     * new_oracle_error = (new_ssl_error - SSLMemoryError) + NZERROR_SSLMemoryErr
+     * or numerically:
+     * new_oracle_error = (new_ssl_error - -7000) + 28854
+      }
+  { ============>>>  ENTRUST ERRORS  }
+  { ============>>> NZERRORS CONTINUED  }
+  { ============>>> PKI VENDORS ERRORS 29050 - 29099  }
+  { ============>>> SSL Errors CONTINUED  }
+  { ============>>> PKCS12 error 29100 - 29149   }
+  { ===========>>> SSL Errors CONTINUED 29135 - 29139  }
+  { ==========>>> Mutex Errors 29138 - 29139  }
+  { ============>>> EXTENSIONS Errors 29140 - 29149  }
+  { ============>>> FIPS ERRORS 29150 - 29175  }
+  { ============>>> CRL ERRORS 29176 - 29200  }
+  {CRL signature verification failed }  {Cert is not in CRL - cert is not revoked }  {Cert is in CRL - cert is revoked }  {Cert revocation check failed  }  { ldap_open failed  }
+  { ldap_bind failed  }
+  { ldap_search failed  }
+  { ldap_result failed  }
+  { ldap_first_attribute failed  }
+  { ldap_get_values_len failed  }
+  { unsupported validation mechanism  }
+  { ldap_count_entries failed  }
+  { No entry found in OID  }
+  { Multiple entries in OID }
+  { Validation mechanism not set in OID }
+  { No CRL found using CRLDP mechanism  }
+  { No CRL found in the cache }
+  { CRL nextUpdate time is in the past  }
+  { ============>>>  ADD ERRORS HERE -- NOTE DECREASING numbers  }
+  { for nztCompareDN  }
+  { unable to create a cert chain
+                   * with the existing TPs for the 
+                   * cert to be installed. 
+                    }
+  { No matching cert_req was 
+                   * found the corresponding to
+                   * the privatekey which
+                   * matches the cert to be
+                   * installed  }
+  { we are attempting to
+                    * install a cert again into
+                    * a persona which already 
+                    * has it installed.
+                     }
+  { could not find a matching 
+                     * persona-private(privatekey) in
+                     * the Persona, for the given
+                     * cert(public key). 
+                      }
+  { certificate validity date expired  }
+  { Couldn't determine # of bytes needed  }
+  { Magic number found in header does not match expected  }
+  { Header length passed in not sufficient for message header  }
+  { Crypto engine failed to initialize  }
+  { Crypto engine key initialization failed  }
+  { Count not encode key object  }
+  { Could not decode key into object  }
+  { Crypto engine failed to get key info  }
+  { Couldn't seed random number generator  }
+  { Couldn't finish algorithm  }
+  { Couldn't apply algorithm to data  }
+  { Couldn't init CE for algorithm  }
+  { Have no idea what algorithm you want  }
+  { Cannot grow output buffer block  }
+  { Key not large enough for data  }
+  { Unknown key type.  }
+  { Wallet resource locator not specified to PL/SQL function  }
+  { Unknown crypto engine function  }
+  { Unknown TDU format  }
+  { Object must be open  }
+  { Bad WRL type  }
+  { Bad state specified for the crypto engine  }
+  { After 29249, use error numbers in block 43000 - 43499  }
+  { PKCS #11 library not found  }
+  { can't find token with given label }
+  { passphrase is incorrect/expired  }
+  { C_GetFunctionList returned error  }
+  { C_Initialize returned error  }
+  { No tokens present  }
+  { C_GetSlotList returned error  }
+  { C_GetTokenInfo returned error  }
+  { Symbol not found in PKCS11 lib  }
+  { Token login failed  }
+  { Change providers error  }
+  { Error trying to find private key on token  }
+  { Key pair gen error  }
+  { Wallet already contains
+                                                        pkcs11 info  }
+  { No cert found on token  }
+  {No user cert found on token }
+  {No cert found on token with given certificate label. }
+  {Multiple certs found on token with given certificate label. }
+  {Cert with given cert is not a user cert because no corresponding pvt key found on token  }
+  { RSA ERRORS 43050 - 43059  }
+  { C_BindService returned error  }
+  { B_CreateKeyObject returned error  }
+  { C_GetCertFields returned error  }
+  { C_CreatePKCS10Object returned error  }
+  { C_SetPKCS10Fields returned error  }
+  { C_SignCertRequest returned error  }
+  { C_GetPKCS10DER returned error  }
+  { C_InitializeCertC returned error  }
+  { C_InsertPrivateKey returned error  }
+  { RSA error. See trace output  }
+  { slts ERRORS 43060 - 43069  }
+  { sltsini() returned error  }
+  { sltskyc() returned error  }
+  { sltster() returned error  }
+  { sltskys() returned error  }
+  { bad sso header length  }
+  { wallet not empty  }
+  { Last available error  }
+  { MAXIMUM ERROR NUMBER IS 43499  }
+  {
+     * DO NOT JUST INSERT NEW ERRORS IN ANY OLD PLACE.  New errors should be
+     * added such the current error retains their integer values. Duplicate
+     * values will cause compiler errors.
+      }
+
+  type
+
+     Pnzerror = ^nzerror;
+     nzerror = (NZERROR_OK := 0,NZERROR_GENERIC := 28750,
+       NZERROR_NO_MEMORY := 28751,NZERROR_DATA_SOURCE_INIT_FAILED := 28752,
+       NZERROR_DATA_SOURCE_TERM_FAILED := 28753,
+       NZERROR_OBJECT_STORE_FAILED := 28754,NZERROR_OBJECT_GET_FAILED := 28755,
+       NZERROR_MEMORY_ALLOC_FAILED := 28756,NZERROR_MEMORY_ALLOC_0_BYTES := 28757,
+       NZERROR_MEMORY_FREE_FAILED := 28758,NZERROR_FILE_OPEN_FAILED := 28759,
+       NZERROR_LIST_CREATION_FAILED := 28760,
+       NZERROR_NO_ELEMENT := 28761,NZERROR_ELEMENT_ADD_FAILED := 28762,
+       NZERROR_PARAMETER_BAD_TYPE := 28763,NZERROR_PARAMETER_RETRIEVAL := 28764,
+       NZERROR_NO_LIST := 28765,NZERROR_TERMINATE_FAIL := 28766,
+       NZERROR_BAD_VERSION_NUMBER := 28767,NZERROR_BAD_MAGIC_NUMBER := 28768,
+       NZERROR_METHOD_NOT_FOUND := 28769,NZERROR_ALREADY_INITIALIZED := 28770,
+       NZERROR_NOT_INITIALIZED := 28771,NZERROR_BAD_FILE_ID := 28772,
+       NZERROR_WRITE_MAGIC_VERSION := 28773,NZERROR_FILE_WRITE_FAILED := 28774,
+       NZERROR_FILE_CLOSE_FAILED := 28775,NZERROR_OUTPUT_BUFFER_TOO_SMALL := 28776,
+       NZERROR_BINDING_CREATION_FAILED := 28777,
+       NZERROR_PARAMETER_MALFORMED := 28778,NZERROR_PARAMETER_NO_METHOD := 28779,
+       NZERROR_BAD_PARAMETER_METHOD := 28780,
+       NZERROR_PARAMETER_NO_DATA := 28781,NZERROR_NOT_ALLOCATED := 28782,
+       NZERROR_INVALID_PARAMETER := 28783,NZERROR_FILE_NAME_TRANSLATION := 28784,
+       NZERROR_NO_SUCH_PARAMETER := 28785,NZERROR_DECRYPT_FAILED := 28786,
+       NZERROR_ENCRYPT_FAILED := 28787,NZERROR_INVALID_INPUT := 28788,
+       NZERROR_NAME_TYPE_NOT_FOUND := 28789,NZERROR_NLS_STRING_OPEN_FAILED := 28790,
+       NZERROR_CERTIFICATE_VERIFY := 28791,NZERROR_OCI_PLSQL_FAILED := 28792,
+       NZERROR_OCI_BIND_FAILED := 28793,NZERROR_ATTRIBUTE_INIT := 28794,
+       NZERROR_ATTRIBUTE_FINISH_FAILED := 28795,
+       NZERROR_UNSUPPORTED_METHOD := 28796,NZERROR_INVALID_KEY_DATA_TYPE := 28797,
+       NZEROR_BIND_SUBKEY_COUNT := 28798,NZERROR_AUTH_SHARED_MEMORY := 28799,
+       NZERROR_RIO_OPEN := 28800,NZERROR_RIO_OBJECT_TYPE := 28801,
+       NZERROR_RIO_MODE := 28802,NZERROR_RIO_IO := 28803,
+       NZERROR_RIO_CLOSE := 28804,NZERROR_RIO_RETRIEVE := 28805,
+       NZERROR_RIO_STORE := 28806,NZERROR_RIO_UPDATE := 28807,
+       NZERROR_RIO_INFO := 28808,NZERROR_RIO_DELETE := 28809,
+       NZERROR_KD_CREATE := 28810,NZERROR_RIO_ACCESS_DESCRIPTOR := 28811,
+       NZERROR_RIO_RECORD := 28812,NZERROR_RIO_RECORD_TYPE := 28813,
+       NZERROR_PLSQL_ORACLE_TO_REAL := 28814,
+       NZERROR_PLSQL_REAL_TO_ORACLE := 28815,
+       NZERROR_TK_PLSQL_NO_PASSWORD := 28816,
+       NZERROR_TK_PLSQL_GENERIC := 28817,NZERROR_TK_PLSQL_NO_CONTEXT := 28818,
+       NZERROR_TK_PLSQL_NO_DIST_NAME := 28819,
+       NZERROR_TK_PLSQL_NO_STATE := 28820,NZERROR_TK_PLSQL_NO_INPUT := 28821,
+       NZERROR_TK_PLSQL_NO_SEED := 28822,NZERROR_TK_PLSQL_NO_BYTES := 28823,
+       NZERROR_TK_INVALID_STATE := 28824,NZERROR_TK_PLSQL_NO_ENG_FUNC := 28825,
+       NZERROR_TK_INV_ENG_FUNC := 28826,NZERROR_TK_INV_CIPHR_TYPE := 28827,
+       NZERROR_TK_INV_IDENT_TYPE := 28828,NZERROR_TK_PLSQL_NO_CIPHER_TYPE := 28829,
+       NZERROR_TK_PLSQL_NO_IDENT_TYPE := 28830,
+       NZERROR_TK_PLSQL_NO_DATA_FMT := 28831,
+       NZERROR_TK_INV_DATA_FMT := 28832,NZERROR_TK_PLSQL_INSUFF_INFO := 28833,
+       NZERROR_TK_PLSQL_BUF_TOO_SMALL := 28834,
+       NZERROR_TK_PLSQL_INV_IDENT_DESC := 28835,
+       NZERROR_TK_PLSQL_WALLET_NOTOPEN := 28836,
+       NZERROR_TK_PLSQL_NO_WALLET := 28837,NZERROR_TK_PLSQL_NO_IDENTITY := 28838,
+       NZERROR_TK_PLSQL_NO_PERSONA := 28839,NZERROR_TK_PLSQL_WALLET_OPEN := 28840,
+       NZERROR_UNSUPPORTED := 28841,NZERROR_FILE_BAD_PERMISSION := 28842,
+       NZERROR_FILE_OSD_ERROR := 28843,NZERROR_NO_WALLET := 28844,
+       NZERROR_NO_CERTIFICATE_ALERT := 28845,
+       NZERROR_NO_PRIVATE_KEY := 28846,NZERROR_NO_CLEAR_PRIVATE_KEY_FILE := 28847,
+       NZERROR_NO_ENCRYPTED_PRIVATE_KEY_FILE := 28848,
+       NZERROR_NO_TRUSTPOINTS := 28849,NZERROR_NO_CLEAR_TRUSTPOINT_FILE := 28850,
+       NZERROR_NO_ENCRYPTED_TRUSTPOINT_FILE := 28851,
+       NZERROR_BAD_PASSWORD := 28852,NZERROR_INITIALIZATION_FAILED := 28853,
+       NZERROR_SSLMemoryErr := 28854,NZERROR_SSLUnsupportedErr := 28855,
+       NZERROR_SSLOverflowErr := 28856,NZERROR_SSLUnknownErr := 28857,
+       NZERROR_SSLProtocolErr := 28858,NZERROR_SSLNegotiationErr := 28859,
+       NZERROR_SSLFatalAlert := 28860,NZERROR_SSLWouldBlockErr := 28861,
+       NZERROR_SSLIOErr := 28862,NZERROR_SSLSessionNotFoundErr := 28863,
+       NZERROR_SSLConnectionClosedGraceful := 28864,
+       NZERROR_SSLConnectionClosedError := 28865,
+       NZERROR_ASNBadEncodingErr := 28866,NZERROR_ASNIntegerTooBigErr := 28867,
+       NZERROR_X509CertChainInvalidErr := 28868,
+       NZERROR_X509CertExpiredErr := 28869,NZERROR_X509NamesNotEqualErr := 28870,
+       NZERROR_X509CertChainIncompleteErr := 28871,
+       NZERROR_X509DataNotFoundErr := 28872,NZERROR_SSLBadParameterErr := 28873,
+       NZERROR_SSLIOClosedOverrideGoodbyeKiss := 28874,
+       NZERROR_X509MozillaSGCErr := 28875,NZERROR_X509IESGCErr := 28876,
+       NZERROR_ImproperServerCredentials := 28877,
+       NZERROR_ImproperClientCredentials := 28878,
+       NZERROR_NoProtocolSideSet := 28879,NZERROR_setPersonaFailed := 28880,
+       NZERROR_setCertFailed := 28881,NZERROR_setVKeyFailed := 28882,
+       NZERROR_setTPFailed := 28883,NZERROR_BadCipherSuite := 28884,
+       NZERROR_NoKeyPairForKeyUsage := 28885,
+       NZERROR_EntrustLoginFailed := 28890,NZERROR_EntrustGetInfoFailed := 28891,
+       NZERROR_EntrustLoadCertificateFailed := 28892,
+       NZERROR_EntrustGetNameFailed := 28893,
+       NZERROR_CertNotInstalled := 29000,NZERROR_ServerDNMisMatched := 29002,
+       NZERROR_ServerDNMisConfigured := 29003,
+       NZERROR_CIC_ERR_SSL_ALERT_CB_FAILURE := 29004,
+       NZERROR_CIC_ERR_SSL_BAD_CERTIFICATE := 29005,
+       NZERROR_CIC_ERR_SSL_BAD_CERTIFICATE_REQUEST := 29006,
+       NZERROR_CIC_ERR_SSL_BAD_CLEAR_KEY_LEN := 29007,
+       NZERROR_CIC_ERR_SSL_BAD_DHPARAM_KEY_LENGTH := 29008,
+       NZERROR_CIC_ERR_SSL_BAD_ENCRYPTED_KEY_LEN := 29009,
+       NZERROR_CIC_ERR_SSL_BAD_EXPORT_KEY_LENGTH := 29010,
+       NZERROR_CIC_ERR_SSL_BAD_FINISHED_MESSAGE := 29011,
+       NZERROR_CIC_ERR_SSL_BAD_KEY_ARG_LEN := 29012,
+       NZERROR_CIC_ERR_SSL_BAD_MAC := 29013,NZERROR_CIC_ERR_SSL_BAD_MAX_FRAGMENT_LENGTH_EXTENSION := 29014,
+       NZERROR_CIC_ERR_SSL_BAD_MESSAGE_LENGTH := 29015,
+       NZERROR_CIC_ERR_SSL_BAD_PKCS1_PADDING := 29016,
+       NZERROR_CIC_ERR_SSL_BAD_PREMASTER_SECRET_LENGTH := 29017,
+       NZERROR_CIC_ERR_SSL_BAD_PREMASTER_SECRET_VERSION := 29018,
+       NZERROR_CIC_ERR_SSL_BAD_PROTOCOL_VERSION := 29019,
+       NZERROR_CIC_ERR_SSL_BAD_RECORD_LENGTH := 29020,
+       NZERROR_CIC_ERR_SSL_BAD_SECRET_KEY_LEN := 29021,
+       NZERROR_CIC_ERR_SSL_BAD_SIDE := 29022,
+       NZERROR_CIC_ERR_SSL_BUFFERS_NOT_EMPTY := 29023,
+       NZERROR_CIC_ERR_SSL_CERTIFICATE_VALIDATE_FAILED := 29024,
+       NZERROR_CIC_ERR_SSL_CERT_CHECK_CALLBACK := 29025,
+       NZERROR_CIC_ERR_SSL_DECRYPT_FAILED := 29026,
+       NZERROR_CIC_ERR_SSL_ENTROPY_COLLECTION := 29027,
+       NZERROR_CIC_ERR_SSL_FAIL_SERVER_VERIFY := 29028,
+       NZERROR_CIC_ERR_SSL_HANDSHAKE_ALREADY_COMPLETED := 29029,
+       NZERROR_CIC_ERR_SSL_HANDSHAKE_REQUESTED := 29030,
+       NZERROR_CIC_ERR_SSL_HANDSHAKE_REQUIRED := 29031,
+       NZERROR_CIC_ERR_SSL_INCOMPLETE_IDENTITY := 29032,
+       NZERROR_CIC_ERR_SSL_INVALID_PFX := 29033,
+       NZERROR_CIC_ERR_SSL_NEEDS_CIPHER_OR_CLIENTAUTH := 29034,
+       NZERROR_CIC_ERR_SSL_NEEDS_PRNG := 29035,
+       NZERROR_CIC_ERR_SSL_NOT_SUPPORTED := 29036,
+       NZERROR_CIC_ERR_SSL_NO_CERTIFICATE := 29037,
+       NZERROR_CIC_ERR_SSL_NO_MATCHING_CERTIFICATES := 29038,
+       NZERROR_CIC_ERR_SSL_NO_MATCHING_CIPHER_SUITES := 29039,
+       NZERROR_CIC_ERR_SSL_NO_SUPPORTED_CIPHER_SUITES := 29040,
+       NZERROR_CIC_ERR_SSL_NULL_CB := 29041,NZERROR_CIC_ERR_SSL_READ_BUFFER_NOT_EMPTY := 29042,
+       NZERROR_CIC_ERR_SSL_READ_REQUIRED := 29043,
+       NZERROR_CIC_ERR_SSL_RENEGOTIATION_ALREADY_REQUESTED := 29044,
+       NZERROR_CIC_ERR_SSL_RENEGOTIATION_REFUSED := 29045,
+       NZERROR_CIC_ERR_SSL_RESUMABLE_SESSION := 29046,
+       NZERROR_CIC_ERR_SSL_TLS_EXTENSION_MISMATCH := 29047,
+       NZERROR_CIC_ERR_SSL_UNEXPECTED_MSG := 29048,
+       NZERROR_CIC_ERR_SSL_UNKNOWN_RECORD := 29049,
+       NZERROR_CIC_ERR_SSL_UNSUPPORTED_CLIENT_AUTH_MODE := 29050,
+       NZERROR_CIC_ERR_SSL_UNSUPPORTED_PUBKEY_TYPE := 29051,
+       NZERROR_CIC_ERR_SSL_WRITE_BUFFER_NOT_EMPTY := 29052,
+       NZERROR_CIC_ERR_PKCS12_MISSING_ALG := 29053,
+       NZERROR_CIC_ERR_PKCS_AUTH_FAILED := 29054,
+       NZERROR_CIC_ERR_PKCS_BAD_CONTENT_TYPE := 29055,
+       NZERROR_CIC_ERR_PKCS_BAD_INPUT := 29056,
+       NZERROR_CIC_ERR_PKCS_BAD_PADDING := 29057,
+       NZERROR_CIC_ERR_PKCS_BAD_SN := 29058,NZERROR_CIC_ERR_PKCS_BAD_SN_LENGTH := 29059,
+       NZERROR_CIC_ERR_PKCS_BAD_VERSION := 29060,
+       NZERROR_CIC_ERR_PKCS_BASE := 29061,NZERROR_CIC_ERR_PKCS_FIELD_NOT_PRESENT := 29062,
+       NZERROR_CIC_ERR_PKCS_NEED_CERTVAL := 29063,
+       NZERROR_CIC_ERR_PKCS_NEED_PASSWORD := 29064,
+       NZERROR_CIC_ERR_PKCS_NEED_PKC := 29065,
+       NZERROR_CIC_ERR_PKCS_NEED_PRV_KEY := 29066,
+       NZERROR_CIC_ERR_PKCS_NEED_TRUSTED := 29067,
+       NZERROR_CIC_ERR_PKCS_UNSUPPORTED_CERT_FORMAT := 29068,
+       NZERROR_CIC_ERR_PKCS_UNSUP_PRVKEY_TYPE := 29069,
+       NZERROR_CIC_ERR_CODING_BAD_PEM := 29070,
+       NZERROR_CIC_ERR_CODING_BASE := 29071,NZERROR_CIC_ERR_DER_BAD_ENCODING := 29072,
+       NZERROR_CIC_ERR_DER_BAD_ENCODING_LENGTH := 29073,
+       NZERROR_CIC_ERR_DER_BASE := 29074,NZERROR_CIC_ERR_DER_ELEMENT_TOO_LONG := 29075,
+       NZERROR_CIC_ERR_DER_INDEFINITE_LENGTH := 29076,
+       NZERROR_CIC_ERR_DER_NO_MORE_ELEMENTS := 29077,
+       NZERROR_CIC_ERR_DER_OBJECT_TOO_LONG := 29078,
+       NZERROR_CIC_ERR_DER_TAG_SIZE := 29079,
+       NZERROR_CIC_ERR_DER_TIME_OUT_OF_RANGE := 29080,
+       NZERROR_CIC_ERR_DER_UNUSED_BITS_IN_BIT_STR := 29081,
+       NZERROR_CIC_ERR_GENERAL_BASE := 29082,
+       NZERROR_CIC_ERR_HASH_BASE := 29083,NZERROR_CIC_ERR_ILLEGAL_PARAM := 29084,
+       NZERROR_CIC_ERR_MEM_NOT_OURS := 29085,
+       NZERROR_CIC_ERR_MEM_OVERRUN := 29086,NZERROR_CIC_ERR_MEM_UNDERRUN := 29087,
+       NZERROR_CIC_ERR_MEM_WAS_FREED := 29088,
+       NZERROR_CIC_ERR_NOT_FOUND := 29090,NZERROR_CIC_ERR_NO_PTR := 29091,
+       NZERROR_CIC_ERR_TIMEOUT := 29092,NZERROR_CIC_ERR_UNIT_MASK := 29093,
+       NZERROR_CIC_ERR_BAD_CTX := 29094,NZERROR_CIC_ERR_BAD_INDEX := 29095,
+       NZERROR_CIC_ERR_BAD_LENGTH := 29096,NZERROR_CIC_ERR_CODING_BAD_ENCODING := 29097,
+       NZERROR_CIC_ERR_SSL_NO_CLIENT_AUTH_MODES := 29098,
+       NZERROR_LOCKEYID_CREATE_FAILED := 29100,
+       NZERROR_P12_ADD_PVTKEY_FAILED := 29101,
+       NZERROR_P12_ADD_CERT_FAILED := 29102,NZERROR_P12_WLT_CREATE_FAILED := 29103,
+       NZERROR_P12_ADD_CERTREQ_FAILED := 29104,
+       NZERROR_P12_WLT_EXP_FAILED := 29105,NZERROR_P12_WLT_IMP_FAILED := 29106,
+       NZERROR_P12_CREATE_FAILED := 29107,NZERROR_P12_DEST_FAILED := 29107,
+       NZERROR_P12_RAND_ERROR := 29108,NZERROR_P12_PVTKEY_CRT_FAILED := 29109,
+       NZERROR_P12_INVALID_BAG := 29110,NZERROR_P12_INVALID_INDEX := 29111,
+       NZERROR_P12_GET_CERT_FAILED := 29112,NZERROR_P12_GET_PVTKEY_FAILED := 29113,
+       NZERROR_P12_IMP_PVTKEY_FAILED := 29114,
+       NZERROR_P12_EXP_PVTKEY_FAILED := 29115,
+       NZERROR_P12_GET_ATTRIB_FAILED := 29116,
+       NZERROR_P12_ADD_ATTRIB_FAILED := 29117,
+       NZERROR_P12_CRT_ATTRIB_FAILED := 29118,
+       NZERROR_P12_IMP_CERT_FAILED := 29119,NZERROR_P12_EXP_CERT_FAILED := 29120,
+       NZERROR_P12_ADD_SECRET_FAILED := 29121,
+       NZERROR_P12_ADD_PKCS11INFO_FAILED := 29122,
+       NZERROR_P12_GET_PKCS11INFO_FAILED := 29123,
+       NZERROR_P12_MULTIPLE_PKCS11_LIBNAME := 29124,
+       NZERROR_P12_MULTIPLE_PKCS11_TOKENLABEL := 29125,
+       NZERROR_P12_MULTIPLE_PKCS11_TOKENPASSPHRASE := 29126,
+       NZERROR_P12_UNKNOWN_PKCS11INFO := 29127,
+       NZERROR_P12_PKCS11_LIBNAME_NOT_SET := 29128,
+       NZERROR_P12_PKCS11_TOKENLABEL_NOT_SET := 29129,
+       NZERROR_P12_PKCS11_TOKENPASSPHRASE_NOT_SET := 29130,
+       NZERROR_P12_MULTIPLE_PKCS11_CERTLABEL := 29131,
+       NZERROR_CIC_ERR_RANDOM := 29135,NZERROR_CIC_ERR_SMALL_BUFFER := 29136,
+       NZERROR_CIC_ERR_SSL_BAD_CONTEXT := 29137,
+       NZERROR_MUTEX_INITIALIZE_FAILED := 29138,
+       NZERROR_MUTEX_DESTROY_FAILED := 29139,
+       NZERROR_BS_CERTOBJ_CREAT_FAILED := 29140,
+       NZERROR_BS_DER_IMP_FAILED := 29141,NZERROR_DES_SELF_TEST_FAILED := 29150,
+       NZERROR_3DES_SELF_TEST_FAILED := 29151,
+       NZERROR_SHA_SELF_TEST_FAILED := 29152,
+       NZERROR_RSA_SELF_TEST_FAILED := 29153,
+       NZERROR_DRNG_SELF_TEST_FAILED := 29154,
+       NZERROR_CKEYPAIR_SELF_TEST_FAILED := 29155,
+       NZERROR_CRNG_SELF_TEST_FAILED := 29156,
+       NZERROR_FIPS_PATHNAME_ERROR := 29157,NZERROR_FIPS_LIB_OPEN_FAILED := 29158,
+       NZERROR_FIPS_LIB_READ_ERROR := 29159,NZERROR_FIPS_LIB_DIFFERS := 29160,
+       NZERROR_DAC_SELF_TEST_FAILED := 29161,
+       NZERROR_NONFIPS_CIPHERSUITE := 29162,NZERROR_VENDOR_NOT_SUPPORTED_FIPS_MODE := 29163,
+       NZERROR_EXTERNAL_PKCS12_NOT_SUPPORTED_FIPS_MODE := 29164,
+       NZERROR_AES_SELF_TEST_FAILED := 29165,
+       NZERROR_CRL_SIG_VERIFY_FAILED := 29176,
+       NZERROR_CERT_NOT_IN_CRL := 29177,NZERROR_CERT_IN_CRL := 29178,
+       NZERROR_CERT_IN_CRL_CHECK_FAILED := 29179,
+       NZERROR_INVALID_CERT_STATUS_PROTOCOL := 29180,
+       NZERROR_LDAP_OPEN_FAILED := 29181,NZERROR_LDAP_BIND_FAILED := 29182,
+       NZERROR_LDAP_SEARCH_FAILED := 29183,NZERROR_LDAP_RESULT_FAILED := 29184,
+       NZERROR_LDAP_FIRSTATTR_FAILED := 29185,
+       NZERROR_LDAP_GETVALUESLEN_FAILED := 29186,
+       NZERROR_LDAP_UNSUPPORTED_VALMEC := 29187,
+       NZERROR_LDAP_COUNT_ENTRIES_FAILED := 29188,
+       NZERROR_LDAP_NO_ENTRY_FOUND := 29189,NZERROR_LDAP_MULTIPLE_ENTRIES_FOUND := 29190,
+       NZERROR_OID_INFO_NOT_SET := 29191,NZERROR_LDAP_VALMEC_NOT_SET := 29192,
+       NZERROR_CRLDP_NO_CRL_FOUND := 29193,NZERROR_CRL_NOT_IN_CACHE := 29194,
+       NZERROR_CRL_EXPIRED := 29195,NZERROR_DN_MATCH := 29222,
+       NZERROR_CERT_CHAIN_CREATION := 29223,NZERROR_NO_MATCHING_CERT_REQ := 29224,
+       NZERROR_CERT_ALREADY_INSTALLED := 29225,
+       NZERROR_NO_MATCHING_PRIVATE_KEY := 29226,
+       NZERROR_VALIDITY_EXPIRED := 29227,NZERROR_TK_BYTES_NEEDED := 29228,
+       NZERROR_TK_BAD_MAGIC_NUMBER := 29229,NZERROR_TK_BAD_HEADER_LENGTH := 29230,
+       NZERROR_TK_CE_INIT := 29231,NZERROR_TK_CE_KEYINIT := 29232,
+       NZERROR_TK_CE_ENCODE_KEY := 29233,NZERROR_TK_CE_DECODE_KEY := 29234,
+       NZERROR_TK_CE_GEYKEYINFO := 29235,NZERROR_TK_SEED_RANDOM := 29236,
+       NZERROR_TK_CE_ALGFINISH := 29237,NZERROR_TK_CE_ALGAPPLY := 29238,
+       NZERROR_TK_CE_ALGINIT := 29239,NZERROR_TK_ALGORITHM := 29240,
+       NZERROR_TK_CANNOT_GROW := 29241,NZERROR_TK_KEYSIZE := 29242,
+       NZERROR_TK_KEYTYPE := 29243,NZERROR_TK_PLSQL_NO_WRL := 29244,
+       NZERROR_TK_CE_FUNC := 29245,NZERROR_TK_TDU_FORMAT := 29246,
+       NZERROR_TK_NOTOPEN := 29247,NZERROR_TK_WRLTYPE := 29248,
+       NZERROR_TK_CE_STATE := 29249,NZERROR_PKCS11_LIBRARY_NOT_FOUND := 43000,
+       NZERROR_PKCS11_TOKEN_NOT_FOUND := 43001,
+       NZERROR_PKCS11_BAD_PASSPHRASE := 43002,
+       NZERROR_PKCS11_GET_FUNC_LIST := 43003,
+       NZERROR_PKCS11_INITIALIZE := 43004,NZERROR_PKCS11_NO_TOKENS_PRESENT := 43005,
+       NZERROR_PKCS11_GET_SLOT_LIST := 43006,
+       NZERROR_PKCS11_GET_TOKEN_INFO := 43008,
+       NZERROR_PKCS11_SYMBOL_NOT_FOUND := 43009,
+       NZERROR_PKCS11_TOKEN_LOGIN_FAILED := 43011,
+       NZERROR_PKCS11_CHANGE_PROVIDERS_ERROR := 43013,
+       NZERROR_PKCS11_GET_PRIVATE_KEY_ERROR := 43014,
+       NZERROR_PKCS11_CREATE_KEYPAIR_ERROR := 43015,
+       NZERROR_PKCS11_WALLET_CONTAINS_P11_INFO := 43016,
+       NZERROR_PKCS11_NO_CERT_ON_TOKEN := 43017,
+       NZERROR_PKCS11_NO_USER_CERT_ON_TOKEN := 43018,
+       NZERROR_PKCS11_NO_CERT_ON_TOKEN_WITH_GIVEN_LABEL := 43019,
+       NZERROR_PKCS11_MULTIPLE_CERTS_ON_TOKEN_WITH_GIVEN_LABEL := 43020,
+       NZERROR_PKCS11_CERT_WITH_LABEL_NOT_USER_CERT := 43021,
+       NZERROR_BIND_SERVICE_ERROR := 43050,NZERROR_CREATE_KEY_OBJ_ERROR := 43051,
+       NZERROR_GET_CERT_FIELDS := 43052,NZERROR_CREATE_PKCS10_OBJECT := 43053,
+       NZERROR_SET_PKCS10_FIELDS := 43054,NZERROR_SIGN_CERT_REQUEST := 43055,
+       NZERROR_GET_PKCS10_DER := 43056,NZERROR_INITIALIZE_CERTC := 43057,
+       NZERROR_INSERT_PRIVATE_KEY := 43058,NZERROR_RSA_ERROR := 43059,
+       NZERROR_SLTSCTX_INIT_FAILED := 43060,NZERROR_SLTSKYC_FAILED := 43061,
+       NZERROR_SLTSCTX_TERM_FAILED := 43062,NZERROR_SLTSKYS_FAILED := 43063,
+       NZERROR_INVALID_HEADER_LENGTH := 43070,
+       NZERROR_WALLET_CONTAINS_USER_CREDENTIALS := 43071,
+       NZERROR_LAST_ERROR := 43499,NZERROR_THIS_MUST_BE_LAST
+       );
+  {
+   * Macro to convert SSL errors to Oracle errors. As SSL errors are negative
+   * and Oracle numbers are positive, the following needs to be done.
+   * 1. The base error number, which is the highest, is added to the
+   *    SSL error to get the index into the number range.
+   * 2. The result is added to the base Oracle number to get the Oracle error.
+    }
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+//  function NZERROR_SSL_TO_ORACLE(ssl_error_ : longint) : longint;
+
+{implementation
+
+  function NZERROR_SSL_TO_ORACLE(ssl_error_ : longint) : longint;
+    var
+       if_local1 : longint;
+    (* result types are not known *)
+    begin
+       if ssl_error_=SSLNoErr then
+         if_local1:=NZERROR_OK
+       else
+         if_local1:=nzerror((ssl_error_-SSLMemoryErr)+(uword(NZERROR_SSLMemoryErr)));
+       NZERROR_SSL_TO_ORACLE:=if_local1;
+    end;
+
+
+end.}

+ 2707 - 0
packages/base/oracle/nzt.inc

@@ -0,0 +1,2707 @@
+
+{
+  Automatically converted by H2Pas 1.0.0 from nzt.h
+  The following command line parameters were used:
+    -p
+    -D
+    -l
+    jojo.so
+    nzt.h
+}
+
+{$PACKRECORDS C}
+
+type
+  Pnzctx         = pointer;
+  PPub1          = pointer;
+  PPnzttIdentity = pointer;
+  PPnzttPersona  = pointer;
+  PPtext         = pointer;
+  Pnzstrc        = pointer;
+
+  { DISABLE check_long_lines  }
+  { Copyright (c) 1996, 2004, Oracle. All rights reserved.   }
+  { Copyright (c) 1996, 2004, Oracle. All rights reserved.   }
+  {
+   * $Header: nzt.h 10-aug-2004.11:55:06 rchahal Exp $ 
+    }
+  { 
+   * NAME
+   *    nzt.h
+   * 
+   * DESCRIPTION
+   *    Toolkit public declarations.
+   *    
+   * PUBLIC FUNCTIONS
+   *    nztwOpenWallet           - Open a wallet based on a WRL and pwd.
+   *    nztwCloseWallet          - Close a wallet.
+   * +  nztwCreateWallet         - Create a new wallet.
+   * +  nztwDestroyWallet        - Destroy an existing wallet.
+   *    nztwRetrievePersonaCopy  - Retieve a copy of a particular persona.
+   * +  nzteStorePersona         - Store a persona in the wallet.
+   *    nzteOpenPersona          - Open a persona.
+   *    nzteClosePersona         - Close a persona.
+   * +  nzteRemovePersona        - Remove a persona from a wallet.
+   * +  nzteCreatePersona        - Create a persona.
+   *    nzteDestroyPersona       - Destroy a persona.
+   *    nztiStoreTrustedIdentity - Store an identity with associated trust.
+   *    nzteRetrieveTrustedIdentCopy - Retrieves a trusted identity from persona
+   * +  nzteSetProtection        - Modify the protection set in a persona.
+   * +  nzteGetProtection        - Get the protection set in a persona
+   *    nztePriKey               - Get the Private Key (X509 Only)
+   *    nzteMyCert               - Get the Certificate (X509 only)
+   *    nzteX509CreatePersona    - Create a persona given an X509 Certificate.
+   * +  nztiRemoveIdentity       - Remove an identity from a persona.
+   *    nztiCreateIdentity       - Create an identity.
+   *    nztiDuplicateIdentity    - Create a complete copy of an identity.
+   *    nztiAbortIdentity        - Discard an unstored identity.
+   *    nztidGetIdentityDesc     - Gets Identity Description from Identity.
+   *    nztidFreeIdentityDesc    - Frees memory for Identity Desc object.
+   *    nztSign                  - Generate an attached signature.
+   * +  nztxSignExpansion        - Determine size of signature.
+   *    nztVerify                - Verify an attached signature.               
+   *    nztValidate              - Validate an identity.                       
+   *    nztsd_SignDetached       - Generate a detached signature.
+   * +  nztxsd_SignDetachedExpansion - Determine size of detached signature.
+   *    nztved_VerifyDetached    - Verify a detached signature.                 
+   * +  nztEncrypt               - Symmetric key encryption.   
+   * +  nztxEncryptExpansion     - Determine the tdu length for encryption.
+   * +  nztDecrypt               - Symmetric key decryption.                   
+   * +  nztEnvelope              - Sign then encrypt data for recipient(s).    
+   * +  nztDeEnvelope            - Reverse nztEnvelope.                        
+   * +  nztKeyedHash             - Generate keyed hash.                        
+   * +  nztxKeyedHashExpansion   - Determine size of TDU for keyed hash.
+   *    nztHash                  - Generate hash.   
+   * +  nztxHashExpansion        - Determine the size of the TDU for a hash.
+   *    nztSeedRandom            - See the random number generator.
+   *    nztrb_RandomBytes        - Generate a series of random bytes.          
+   *    nztrn_RandomNumber       - Generate a random number.                   
+   *    nztbbInitBlock           - Initialize a buffer block.                  
+   *    nztbbReuseBlock          - Reuse a buffer block.           
+   *    nztbbSizeBlock           - Find the size of the buffer block.
+   *    nztbbGrowBlock           - Grow initialized buffer block by 'inc' bytes.
+   *    nztbbPurgeBlock          - Purge the memory used within a buffer block.
+   *    nztbbSetBlock            - Set block to known state.
+   *    nztkec_PKEncrypt         - Encrypt data then encrypt key for recipient.
+   *    nztkdc_PKDecrypt         - Decrypt PKEncrypt'ed data.                  
+   *    nztific_FreeIdentityContent - Free the contents of an identity.
+   *    nztifdn                  - Create an identity from a distinguished name
+   *    nztcts_CipherSpecToStr   - Converts the Cipher Spec Code To String
+   *    nztiae_IsAuthEnabled     - Checks to see if Authentication is Enabled
+   *                               in the current Cipher Spec.
+   *    nztiae_IsEncrEnabled     - Checks to see if Encryption is Enabled
+   *                               in the current Cipher Spec.
+   *    nztiae_IsHashEnabled     - Checks to see if Hashing is Enabled
+   *                               in the current Cipher Spec.
+   *    nztwGetCertInfo          - Get peer certificate info
+   *
+   * NOTE: the '+' indicates that these functions are UNSUPPORTED at this time.
+   * 
+   * NOTES
+   *    
+   * MODIFIED
+   *    rchahal    07/27/04 - add keyusage 
+   *    srtata     11/10/03 - fix nztSetAppDefaultLocation header 
+   *    rchahal    10/15/03 - bug 2513821 
+   *    rchahal    11/11/02 - pkcs11 support
+   *    akoyfman   07/05/02 - adding secret store to persona
+   *    supriya    10/11/01 - Fix for bug # 2015732
+   *    ajacobs    04/04/01 - make NZT_REGISTRY_WRL always available
+   *    ajacobs    03/06/01 - olint fix
+   *    ajacobs    03/02/01 - Add GetCertInfo
+   *    supriya    02/23/01 - Move nzttKPUsage from nzt0.h
+   *    rchahal    01/26/01 - olint fixes
+   *    supriya    12/07/00 - Change fn name
+   *    supriya    12/01/00 - Certificate API's needed for iAS
+   *    supriya    06/19/00 - Adding definitions for MCS and ENTR
+   *    lkethana   05/31/00 - multiple cert support
+   *    skanjila   06/25/99 - Remove nztcts_CipherSpecToStr() to NZOS.
+   *    skanjila   06/23/99 - Change API of nztcts_CipherSpecToStr.
+   *    lkethana   06/18/99 - rem nztIPrivateAlloc, etc
+   *    lkethana   06/10/99 - changing size_t to ub4
+   *    lkethana   06/02/99 - add api for getting auth/encry/hash capability of c
+   *    arswamin   12/28/98 - add NZT_MAX_MD5.
+   *    arswamin   12/21/98 - change signature of compareDN
+   *    qdinh      12/21/98 - change size_t to ub4.
+   *    inetwork   11/22/98 - Removing NZDEPRECATED definition
+   *    amthakur   09/14/98 - deprecating and updating the c-structures.
+   *    arswamin   09/24/98 - adding NZTTWRL_NULL for SSO support.
+   *    amthakur   07/30/98 - changing the prototype of nztGetCertChain.
+   *    qdinh      05/01/98 - add NZTTIDENTTYPE_INVALID_TYPE
+   *    qdinh      04/17/98 - add NZTTWRL_ORACLE.
+   *    ascott     10/08/97 - implement nztiStoreTrustedIdentity
+   *    ascott     10/07/97 - add nztiGetIdentityDesc
+   *    ascott     09/28/97 - clarify prototype comments and error codes
+   *    ascott     09/05/97 - update identity: create, destroy, duplicate
+   *    ascott     08/21/97 - add GetCert and GetPriKey
+   *    ascott     08/07/97 - add other WRL settings
+   *    asriniva   03/25/97 - Add ANSI prototypes
+   *    rwessman   03/19/97 - Added prototypes for nztific_FreeIdentityContent()
+   *    asriniva   03/11/97 - Fix olint errors
+   *    sdange     02/28/97 - Removed inclusion of nz0decl.h
+   *    sdange     02/18/97 - Moved nzt specific declarations from nz0decl.h
+   *    asriniva   01/21/97 - Remove prototypes.
+   *    asriniva   10/31/96 - Include oratypes.h
+   *    asriniva   10/15/96 - Declare buffer block helper functions
+   *    asriniva   10/08/96 - First pass at wallet open/close
+   *    asriniva   10/04/96 - Add random number seed function
+   *    asriniva   10/03/96 - Reorder parameters in nztbbSetBlock
+   *    asriniva   10/03/96 - Keep editing.
+   *    asriniva   10/03/96 - Continued edits.
+   *    asriniva   10/02/96 - Continue editing.
+   *    asriniva   09/26/96 -
+    }
+  { ENABLE check_long_lines  }
+  { ORATYPES  }
+{$include nzerror.inc}         // NZ error type
+  { NZERROR_ORACLE  }
+
+  const
+     NZT_MAX_SHA1 = 20;     
+     NZT_MAX_MD5 = 16;     
+  {************************************* }
+  { PUBLIC CONSTANTS, MACROS, AND TYPES  }
+  {************************************* }
+  {
+   * Wallet Resource Locator Type Strings
+   *
+   * WRL TYPE        PARAMETERS      BEHAVIOR
+   * ========        ==========      =====================================
+   * default:          <none>        Uses directory defined by the parameter
+   *                                 SNZD_DEFAULT_FILE_DIRECTORY which in 
+   *                                 unix is "$HOME/oracle/oss"
+   * 
+   * file:            file path      Find the Oracle wallet in this directory.
+   *                                 example: file:<dir-path>
+   * 
+   * sqlnet:           <none>        In this case, the directory path will be 
+   *                                 retrieved from the sqlnet.ora file under
+   *                                 the oss.source.my_wallet parameter.
+   *
+   * mcs:              <none>        Microsoft WRL.
+   *
+   * entr:             dir path      Entrust WRL. eg: ENTR:<dir-path>   
+   * 
+    }
+  { Note that there is no NZT_NULL_WRL.  Instead look in snzd.h for DEFAULT_WRP
+   * which is used in our new defaulting mechanism.  The NZT_DEFAULT_WRL
+   * should be deprecated.
+    }
+
+  const
+         NZT_DEFAULT_WRL:Ptext = 'default:';
+         NZT_SQLNET_WRL:Ptext ='sqlnet:';
+         NZT_FILE_WRL:Ptext='file:';
+         NZT_ENTR_WRL:Ptext='entr:';
+         NZT_MCS_WRL:Ptext='mcs:';
+         NZT_ORACLE_WRL:Ptext='oracle:';
+         NZT_REGISTRY_WRL:Ptext='reg:';
+
+  { Default, use SNZD_DEFAULT_FILE_DIRECTORY  }
+  { Use oss.source.my_wallet in sqlnet.ora file  }
+  { Find the oracle wallet in this directory  }
+  { Find the entrust profile in this directory  }
+  { WRL for Microsoft  }
+  { Get the wallet from OSS db  }
+  { New SSO defaulting mechanism  }
+  { Find the wallet in Windows Registry  }
+
+  type
+     nzttwrl = (NZTTWRL_DEFAULT := 1,NZTTWRL_SQLNET,
+       NZTTWRL_FILE,NZTTWRL_ENTR,NZTTWRL_MCS,
+       NZTTWRL_ORACLE,NZTTWRL_NULL,NZTTWRL_REGISTRY
+       );
+
+
+     Pnzttwrl = ^nzttwrl;
+{$ifndef NZ0DECL_ORACLE}
+  {
+      * With the elimination of nz0decl.h from public, we need this
+      * redundant typedef.
+       }
+
+{$endif}
+  { NZ0DECL_ORACLE  }
+  { Moved from nz0decl.h  }
+
+  type
+    PnzttIdentityPrivate = pointer;
+    PnzttPersonaPrivate = pointer;
+    PnzttWalletPrivate = pointer;
+    PnzttWalletObj = pointer;        // For wallet object
+    PnzssEntry = pointer;            // For secretstore
+    Pnzpkcs11_Info = pointer;
+
+  {
+   * Crypto Engine State
+   *
+   * Once the crypto engine (CE) has been initialized for a particular
+   * cipher, it is either at the initial state, or it is continuing to
+   * use the cipher.  NZTCES_END is used to change the state back to
+   * initialized and flush any remaining output.  NZTTCES_RESET can be
+   * used to change the state back to initialized and throw away any
+   * remaining output.
+    }
+  { Continue processing input  }
+  { End processing input  }
+  { Reset processing and skip generating output  }
+     nzttces = (NZTTCES_CONTINUE := 1,NZTTCES_END,NZTTCES_RESET
+       );
+
+
+     Pnzttces = ^nzttces;
+  {
+   * Crypto Engine Functions
+   *
+   * List of crypto engine categories; used to index into protection
+   * vector.
+    }
+  { Signature, detached from content  }
+  { Signature combined with content  }
+  { Signature and encryption with content  }
+  { Encryption for one or more recipients  }
+  { Symmetric encryption  }
+  { Keyed hash/checkusm  }
+  { Hash/checsum  }
+  { Random byte generation  }
+  { Used for array size  }
+     nzttcef = (NZTTCEF_DETACHEDSIGNATURE := 1,NZTTCEF_SIGNATURE,
+       NZTTCEF_ENVELOPING,NZTTCEF_PKENCRYPTION,
+       NZTTCEF_ENCRYPTION,NZTTCEF_KEYEDHASH,
+       NZTTCEF_HASH,NZTTCEF_RANDOM,NZTTCEF_LAST
+       );
+
+
+     Pnzttcef = ^nzttcef;
+  {
+   * State of the persona.
+    }
+  { is not in any state(senseless???)  }
+  { cert-request  }
+  { certificate  }
+  { certificate  }
+  { renewal-requested  }
+     nzttState = (NZTTSTATE_EMPTY := 0,NZTTSTATE_REQUESTED,
+       NZTTSTATE_READY,NZTTSTATE_INVALID,NZTTSTATE_RENEWAL
+       );
+
+
+     PnzttState = ^nzttState;
+  {
+   * Cert-version types
+   * 
+   * This is used to quickly look-up the cert-type
+    }
+  { X.509v1  }
+  { X.509v3  }
+{$ifdef NZDEPRECATED}
+  { Symmetric  }
+{$endif}
+  { For Initialization  }
+
+  type
+     nzttVersion = (NZTTVERSION_X509v1 := 1,NZTTVERSION_X509v3,
+       NZTTVERSION_SYMMETRIC,NZTTVERSION_INVALID_TYPE
+       );
+
+
+     PnzttVersion = ^nzttVersion;
+  {
+   * Cipher Types
+   *
+   * List of all cryptographic algorithms, some of which may not be
+   * available.
+    }
+  { RSA public key  }
+  { DES  }
+  { RC4  }
+  { DES encrypted MD5 with salt (PBE)  }
+  { RC2 encrypted MD5 with salt (PBE)  }
+  { MD5  }
+  { SHA  }
+     nzttCipherType = (NZTTCIPHERTYPE_RSA := 1,NZTTCIPHERTYPE_DES,
+       NZTTCIPHERTYPE_RC4,NZTTCIPHERTYPE_MD5DES,
+       NZTTCIPHERTYPE_MD5RC2,NZTTCIPHERTYPE_MD5,
+       NZTTCIPHERTYPE_SHA);
+
+
+     PnzttCipherType = ^nzttCipherType;
+  {
+   * TDU Formats
+   *
+   * List of possible toolkit data unit (TDU) formats.  Depending on the
+   * function and cipher used some may be not be available.
+    }
+  { PKCS7 format  }
+  { RSA padded format  }
+  { Oracle v1 format  }
+  { Used for array size  }
+     nztttdufmt = (NZTTTDUFMT_PKCS7 := 1,NZTTTDUFMT_RSAPAD,
+       NZTTTDUFMT_ORACLEv1,NZTTTDUFMT_LAST
+       );
+
+
+     Pnztttdufmt = ^nztttdufmt;
+  {
+   * Validate State
+   *
+   * Possible validation states an identity can be in.
+    }
+  { Needs to be validated  }
+  { Validated  }
+  { Failed to validate  }
+     nzttValState = (NZTTVALSTATE_NONE := 1,NZTTVALSTATE_GOOD,
+       NZTTVALSTATE_REVOKED);
+
+
+     PnzttValState = ^nzttValState;
+  {
+   * Policy Fields <----NEW (09/14/98)
+   *
+   * Policies enforced
+    }
+  { number of retries for decryption = 1  }
+  { number of retries for decryption = 2  }
+  { number of retries for decryption = 3  }
+     nzttPolicy = (NZTTPOLICY_NONE := 0,NZTTPOLICY_RETRY_1,
+       NZTTPOLICY_RETRY_2,NZTTPOLICY_RETRY_3
+       );
+
+
+     PnzttPolicy = ^nzttPolicy;
+  {
+   * Persona Usage <----NEW (09/14/98)
+   *
+   * what a persona will be used for?
+    }
+{ $ifdef NZDEPRECATED_MULTIPLECERTS}
+  { persona for SSL usage  }
+
+  type
+     nzttUsage = (NZTTUSAGE_NONE := 0,NZTTUSAGE_SSL);
+
+
+     PnzttUsage = ^nzttUsage;
+//     nzttUsage = nzttUsage;
+{ $endif}
+  {
+   * Personas and identities have unique id's that are represented with
+   * 128 bits.
+    }
+
+  type
+
+     PnzttID = ^nzttID;
+     nzttID = ub1;
+  {
+   * Identity Types
+   *
+   * List of all Identity types..
+    }
+     nzttIdentType = (NZTTIDENTITYTYPE_INVALID_TYPE := 0,
+       NZTTIDENTITYTYPE_CERTIFICTAE,NZTTIDENTITYTYPE_CERT_REQ,
+       NZTTIDENTITYTYPE_RENEW_CERT_REQ,NZTTIDENTITYTYPE_CLEAR_ETP,
+       NZTTIDENTITYTYPE_CLEAR_UTP,NZTTIDENTITYTYPE_CLEAR_PTP
+       );
+
+
+     PnzttIdentType = ^nzttIdentType;
+
+     PnzttKPUsage = ^nzttKPUsage;
+     nzttKPUsage = ub4;
+  { IF new types are added nztiMUS should be changed  }
+
+  const
+     NZTTKPUSAGE_NONE = 0;
+  { SSL Server  }
+     NZTTKPUSAGE_SSL = 1;
+     NZTTKPUSAGE_SMIME_ENCR = 2;
+     NZTTKPUSAGE_SMIME_SIGN = 4;
+     NZTTKPUSAGE_CODE_SIGN = 8;
+     NZTTKPUSAGE_CERT_SIGN = 16;
+  { SSL Client  }
+     NZTTKPUSAGE_SSL_CLIENT = 32;
+     NZTTKPUSAGE_INVALID_USE = $ffff;
+  {
+   * Timestamp as 32 bit quantity in UTC.
+    }
+
+  type
+
+     PnzttTStamp = ^nzttTStamp;
+     nzttTStamp = ub1;
+  {
+   * Buffer Block
+   *
+   * A function that needs to fill (and possibly grow) an output buffer
+   * uses an output parameter block to describe each buffer.
+   *
+   * The flags_nzttBufferBlock member tells the function whether the
+   * buffer can be grown or not.  If flags_nzttBufferBlock is 0, then
+   * the buffer will be realloc'ed automatically.  
+   *
+   * The buflen_nzttBufferBLock member is set to the length of the
+   * buffer before the function is called and will be the length of the
+   * buffer when the function is finished.  If buflen_nzttBufferBlock is
+   * 0, then the initial pointer stored in pobj_nzttBufferBlock is
+   * ignored.
+   *
+   * The objlen_nzttBufferBlock member is set to the length of the
+   * object stored in the buffer when the function is finished.  If the
+   * initial buffer had a non-0 length, then it is possible that the
+   * object length is shorter than the buffer length.
+   *
+   * The pobj_nzttBufferBlock member is a pointer to the output object.
+    }
+  { # define NZT_NO_AUTO_REALLOC     0x1  }
+  { Flags  }
+  { Total length of buffer  }
+  { Length of used buffer part  }
+  { Pointer to buffer  }
+     PnzttBufferBlock = ^nzttBufferBlock;
+     nzttBufferBlock = record
+          flags_nzttBufferBlock : uword;
+          buflen_nzttBufferBlock : ub4;
+          usedlen_nzttBufferBlock : ub4;
+          buffer_nzttBufferBlock : Pub1;
+       end;
+
+  {
+   * Wallet.
+    }
+  { user's LDAP Name  }
+  { len of user's LDAP Name  }
+  { secured-policy of the wallet  }
+  { open-policy of the wallet  }
+  { List of personas in wallet  }
+  { Private wallet information  }
+{$ifdef NZDEPRECATED}
+  { Number of personas  }
+{$endif}
+
+  type
+     PnzttPersona = ^nzttPersona;
+     PnzttWallet = ^nzttWallet;
+     PnzttIdentity = ^nzttIdentity;
+     nzttWallet = record
+          ldapName_nzttWallet : Pub1;
+          ldapNamelen_nzttWallet : ub4;
+          securePolicy_nzttWallet : nzttPolicy;
+          openPolicy_nzttWallet : nzttPolicy;
+          persona_nzttWallet : PnzttPersona;
+          private_nzttWallet : PnzttWalletPrivate;
+          npersona_nzttWallet : ub4;
+       end;
+
+  {
+   * The wallet contains, one or more personas.  A persona always
+   * contains its private key and its identity.  It may also contain
+   * other 3rd party identites.  All identities qualified with trust
+   * where the qualifier can indicate anything from untrusted to trusted
+   * for specific operations.
+    }
+  {
+   * Persona
+   *
+   * Structure containing information about a persona.
+    }
+  { user-friendly persona name   }
+  { persona-name length  }
+  { Opaque part of persona  }
+  { My cert-requests  }
+  { My certificates  }
+  { List of trusted identities  }
+  { List of secrets  }
+  { PKCS11 token info  }
+  { Next persona  }
+{$ifdef NZDEPRECATED_MULTIPLECERTS}
+  { As Persona has multiple certs for different
+       usages, Persona Usage does not mean anything. Similarly
+       each key pair has its own state and Persona state itself
+       does not mean anything. - lk 5/31/00
+     }
+  { persona usage; SSL/SET/..  }
+  { persona state-requested/ready  }
+  { Num of trusted identities  }
+{$endif}
+
+     nzttPersona = record
+          genericName_nzttPersona : Pub1;
+          genericNamelen_nzttPersona : ub4;
+          private_nzttPersona : PnzttPersonaPrivate;
+          mycertreqs_nzttPersona : PnzttIdentity;
+          mycerts_nzttPersona : PnzttIdentity;
+          mytps_nzttPersona : PnzttIdentity;
+          mystore_nzttPersona : PnzssEntry;
+          mypkcs11Info_nzttPersona : Pnzpkcs11_Info;
+          next_nzttPersona : PnzttPersona;
+          usage_nzttPersona : nzttUsage;
+          state_nzttPersona : nzttState;
+          ntps_nzttPersona : ub4;
+       end;
+
+  {
+   * Identity
+   *
+   * Structure containing information about an identity.
+   *
+   * NOTE
+   *  -- the next_trustpoint field only applies to trusted identities and
+   *     has no meaning (i.e. is NULL) for self identities.
+    }
+  { Alias  }
+  { Length of alias  }
+  { Comment   }
+  { Length of comment  }
+  { Opaque part of identity  }
+  { next identity in list  }
+     nzttIdentity = record
+          dn_nzttIdentity : Ptext;
+          dnlen_nzttIdentity : ub4;
+          comment_nzttIdentity : Ptext;
+          commentlen_nzttIdentity : ub4;
+          private_nzttIdentity : PnzttIdentityPrivate;
+          next_nzttIdentity : PnzttIdentity;
+       end;
+
+     PnzttB64Cert = ^nzttB64Cert;
+     nzttB64Cert = record
+          b64Cert_nzttB64Cert : Pub1;
+          b64Certlen_nzttB64Cert : ub4;
+          next_nzttB64Cert : PnzttB64Cert;
+       end;
+
+  { Hash cipher  }
+  { Symmetric cipher  }
+  { Length of key to use  }
+     PnzttPKCS7ProtInfo = ^nzttPKCS7ProtInfo;
+     nzttPKCS7ProtInfo = record
+          mictype_nzttPKCS7ProtInfo : nzttCipherType;
+          symmtype_nzttPKCS7ProtInfo : nzttCipherType;
+          keylen_nzttPKCS7ProtInfo : ub4;
+       end;
+
+  {
+   * Protection Information.
+   *
+   * Information specific to a type of protection.
+    }
+     PnzttProtInfo = ^nzttProtInfo;
+     nzttProtInfo = record
+         case longint of
+            0 : ( pkcs7_nzttProtInfo : nzttPKCS7ProtInfo );
+         end;
+
+
+  {
+   * A description of a persona so that the toolkit can create one.  A
+   * persona can be symmetric or asymmetric and both contain an
+   * identity.  The identity for an asymmetric persona will be the
+   * certificate and the identity for the symmetric persona will be
+   * descriptive information about the persona.  In either case, an
+   * identity will have been created before the persona is created.
+   *
+   * A persona can be stored separately from the wallet that references
+   * it.  By default, a persona is stored with the wallet (it inherits
+   * with WRL used to open the wallet).  If a WRL is specified, then it
+   * is used to store the actuall persona and the wallet will have a
+   * reference to it.
+    }
+  { Length of private info (key) }
+  { Private information  }
+  { Length of PRL  }
+  { PRL for storage  }
+  { Length of alias  }
+  { Alias  }
+  { Length of longer description }
+  { Longer persona description  }
+     PnzttPersonaDesc = ^nzttPersonaDesc;
+     nzttPersonaDesc = record
+          privlen_nzttPersonaDesc : ub4;
+          priv_nzttPersonaDesc : Pub1;
+          prllen_nzttPersonaDesc : ub4;
+          prl_nzttPersonaDesc : Ptext;
+          aliaslen_nzttPersonaDesc : ub4;
+          alias_nzttPersonaDesc : Ptext;
+          longlen_nzttPersonaDesc : ub4;
+          long_nzttPersonaDesc : Ptext;
+       end;
+
+  {
+   * A description of an identity so that the toolkit can create one.
+   * Since an identity can be symmetric or asymmetric, the asymmetric
+   * identity information will not be used when a symmetric identity is
+   * created.  This means the publen_nzttIdentityDesc and
+   * pub_nzttIdentityDesc members will not be used when creating a
+   * symmetric identity.
+    }
+  { Length of identity  }
+  { Type specific identity  }
+  { Length of alias  }
+  { Alias  }
+  { Length of longer description  }
+  { Longer description  }
+  { Length of trust qualifier  }
+  { Trust qualifier  }
+     PnzttIdentityDesc = ^nzttIdentityDesc;
+     nzttIdentityDesc = record
+          publen_nzttIdentityDesc : ub4;
+          pub_nzttIdentityDesc : Pub1;
+          dnlen_nzttIdentityDesc : ub4;
+          dn_nzttIdentityDesc : Ptext;
+          longlen_nzttIdentityDesc : ub4;
+          long_nzttIdentityDesc : Ptext;
+          quallen_nzttIdentityDesc : ub4;
+          trustqual_nzttIdentityDesc : Ptext;
+       end;
+
+  {****************************** }
+  { PUBLIC FUNCTION DECLARATIONS  }
+  {****************************** }
+  {---------------------- nztwOpenWallet ---------------------- }
+  {
+   * NAME
+   *    nztwOpenWallet - Open a wallet based on a wallet Resource Locator (WRL).
+   * 
+   * PARAMETERS
+   *    osscntxt IN     OSS context. 
+   *    wrllen   IN     Length of WRL.
+   *    wrl      IN     WRL.
+   *    pwdlen   IN     Length of password.
+   *    pwd      IN     Password.
+   *    wallet   IN/OUT Initialized wallet structure.   
+   * 
+   * NOTES
+   *    The syntax for a WRL is <Wallet Type>:<Wallet Type Parameters>.
+   *
+   *    Wallet Type       Wallet Type Parameters.
+   *    -----------       ----------------------
+   *    File              Pathname (e.g. "file:/home/asriniva")
+   *    Oracle            Connect string (e.g. "oracle:scott/tiger@oss")
+   *
+   *    There are also defaults.  If the WRL is NZT_DEFAULT_WRL, then
+   *    the platform specific WRL default is used.  If only the wallet
+   *    type is specified, then the WRL type specific default is used
+   *    (e.g. "oracle:")
+   *
+   *    There is an implication with Oracle that should be stated: An
+   *    Oracle based wallet can be implemented in a user's private space
+   *    or in world readable space.
+   *
+   *    When the wallet is opened, the password is verified by hashing
+   *    it and comparing against the password hash stored with the
+   *    wallet.  The list of personas (and their associated identities)
+   *    is built and stored into the wallet structure.
+   *    
+   * RETURNS
+   *    NZERROR_OK           Success.
+   *    NZERROR_RIO_OPEN     RIO could not open wallet (see network trace file).
+   *    NZERROR_TK_PASSWORD  Password verification failed.
+   *    NZERROR_TK_WRLTYPE   WRL type is not known.
+   *    NZERROR_TK_WRLPARM   WRL parm does not match type.
+    }
+{$IFNDEF LinkDynamically}
+  function nztwOpenWallet(_para1:Pnzctx; _para2:ub4; _para3:Ptext; _para4:ub4; _para5:Ptext;
+             _para6:PnzttWallet):nzerror;cdecl;external ocilib name 'nztwOpenWallet';
+{$ELSE}
+var nztwOpenWallet : function (_para1:Pnzctx; _para2:ub4; _para3:Ptext; _para4:ub4; _para5:Ptext;
+             _para6:PnzttWallet):nzerror;cdecl;
+{$ENDIF}
+
+
+  {---------------------- nztwCloseWallet ---------------------- }
+  {
+   * NAME
+   *    nztwCloseWallet - Close a wallet
+   * 
+   * PARAMETERS
+   *    osscntxt IN     OSS context.
+   *    wallet   IN/OUT Wallet.
+   * 
+   * NOTES
+   *    Closing a wallet also closes all personas associated with that
+   *    wallet.  It does not cause a persona to automatically be saved
+   *    if it has changed.  The implication is that a persona can be
+   *    modified by an application but if it is not explicitly saved it
+   *    reverts back to what was in the wallet.
+   *
+   * RETURNS
+   *    NZERROR_OK           Success.
+   *    NZERROR_RIO_CLOSE    RIO could not close wallet (see network trace file).
+    }
+{$IFNDEF LinkDynamically}
+  function nztwCloseWallet(_para1:Pnzctx; _para2:PnzttWallet):nzerror;cdecl;external ocilib name 'nztwCloseWallet';
+{$ELSE}
+  nztwCloseWallet : function (_para1:Pnzctx; _para2:PnzttWallet):nzerror;cdecl;
+{$ENDIF}
+  {--------------------nztwGetCertInfo---------------------------- }
+  {***NOTE: This function is a temporary hack.*** }
+  {***DO NOT CALL.  It will soon disappear.*** }
+  {_ nzctx *nz_context,
+                              nzosContext *nzosCtx,
+                              nzttWallet *walletRef,
+                              void *peerCert _ }(* error 
+                            void *peerCert _*/);
+ in declarator_list *)
+  {------------------------ nztwConstructWallet ----------------------- }
+  {
+   * 
+   * nzerror nztwConstructWallet( nzctx *oss_context,    
+   *              nzttPolicy openPolicy,
+   *              nzttPolicy securePolicy,
+   *              ub1 *ldapName,
+   *              ub4 ldapNamelen,
+   *              nzstrc *wrl,
+   *              nzttPersona *personas,
+   *              nzttWallet **wallet );
+    }
+  {---------------------- nztwRetrievePersonaCopy ---------------------- }
+  {
+   * NAME
+   *    nztwRetrievePersonaCopy - Retrieves a persona based from wallet
+   * 
+   * PARAMETERS
+   *    osscntxt IN     OSS context. 
+   *    wallet   IN     Wallet.
+   *    index    IN     Which wallet index to remove (first persona is zero).
+   *    persona  OUT    Persona found.
+   * 
+   * NOTES
+   *    Retrieves a persona from the wallet based on the index number passed
+   *    in.  This persona is a COPY of the one stored in the wallet, therefore
+   *    it is perfectly fine for the wallet to be closed after this call is 
+   *    made.
+   *
+   *    The caller is responsible for disposing of the persona when completed.
+   *
+   * RETURNS
+   *    NZERROR_OK           Success.
+    }
+
+{$IFNDEF LinkDynamically}
+  function nztwRetrievePersonaCopy(_para1:Pnzctx; _para2:PnzttWallet; _para3:ub4; _para4:PPnzttPersona):nzerror;cdecl;external ocilib name 'nztwRetrievePersonaCopy';
+{$ELSE}
+  nztwRetrievePersonaCopy : function (_para1:Pnzctx; _para2:PnzttWallet; _para3:ub4; _para4:PPnzttPersona):nzerror;cdecl;
+{$ENDIF}
+
+  {---------------------- nztwRetrievePersonaCopyByName ---------------------- }
+  {
+   * NAME
+   *    nztwRetrievePersonaCopyByName - Retrieves a persona based on its name.
+   *
+   * PARAMETERS
+   *    osscntxt IN     OSS context.
+   *    wallet   IN     Wallet.
+   *    name    IN     Name of the persona 
+   *    persona  OUT    Persona found.
+   *
+   * NOTES
+   *    Retrieves a persona from the wallet based on the name of the persona. 
+   *    This persona is a COPY of the one stored in the wallet, therefore
+   *    it is perfectly fine for the wallet to be closed after this call is
+   *    made.
+   *
+   *    The caller is responsible for disposing of the persona when completed.
+   *
+   * RETURNS
+   *    NZERROR_OK           Success.
+    }
+
+{$IFNDEF LinkDynamically}
+  function nztwRetrievePersonaCopyByName(_para1:Pnzctx; _para2:PnzttWallet; _para3:Pchar; _para4:PPnzttPersona):nzerror;cdecl;external ocilib name 'nztwRetrievePersonaCopyByName';
+{$ELSE}
+  nztwRetrievePersonaCopyByName : function (_para1:Pnzctx; _para2:PnzttWallet; _para3:Pchar; _para4:PPnzttPersona):nzerror;cdecl;
+{$ENDIF}
+
+  {---------------------- nzteOpenPersona ---------------------- }
+  {
+   * NAME
+   *    nzteOpenPersona - Open a persona.
+   * 
+   * PARAMETERS
+   *    osscntxt IN     OSS context. 
+   *    persona  IN/OUT Persona.
+   * 
+   * NOTES
+   *    
+   * RETURNS
+   *    NZERROR_OK           Success.
+   *    NZERROR_TK_PASSWORD  Password failed to decrypt persona.
+   *    NZERROR_TK_BADPRL    Persona resource locator did not work.
+   *    NZERROR_RIO_OPEN     Could not open persona (see network trace file).
+    }
+
+{$IFNDEF LinkDynamically}
+  function nzteOpenPersona(_para1:Pnzctx; _para2:PnzttPersona):nzerror;cdecl;external ocilib name 'nzteOpenPersona';
+{$ELSE}
+  nzteOpenPersona : function (_para1:Pnzctx; _para2:PnzttPersona):nzerror;cdecl;
+{$ENDIF}
+
+  {--------------------- nzteClosePersona --------------------- }
+  {
+   * NAME
+   *    nzteClosePersona - Close a persona.
+   * 
+   * PARAMETERS
+   *    osscntxt IN     OSS context.
+   *    persona  IN/OUT Persona.
+   * 
+   * NOTES
+   *    Closing a persona does not store the persona, it simply releases
+   *    the memory associated with the crypto engine.
+   *    
+   * RETURNS
+   *    NZERROR_OK        Success.
+    }
+
+{$IFNDEF LinkDynamically}
+  function nzteClosePersona(_para1:Pnzctx; _para2:PnzttPersona):nzerror;cdecl;external ocilib name 'nzteClosePersona';
+{$ELSE}
+  nzteClosePersona : function (_para1:Pnzctx; _para2:PnzttPersona):nzerror;cdecl;
+{$ENDIF}
+
+  {--------------------- nzteDestroyPersona --------------------- }
+  {
+   * NAME
+   *    nzteDestroyPersona - Destroy a persona.
+   * 
+   * PARAMETERS
+   *    osscntxt IN        OSS context.
+   *    persona  IN/OUT    Persona.
+   * 
+   * NOTES
+   *    The persona is destroyd in the open state, but it will
+   *    not be associated with a wallet.
+   *    
+   *    The persona parameter is doubly indirect so that at the
+   *    conclusion of the function, the pointer can be set to NULL.
+   *
+   *
+   * RETURNS
+   *    NZERROR_OK        Success.
+   *    NZERROR_TK_TYPE   Unsupported itype/ctype combination.
+   *    NZERROR_TK_PARMS  Error in persona description.
+    }
+
+{$IFNDEF LinkDynamically}
+  function nzteDestroyPersona(_para1:Pnzctx; _para2:PPnzttPersona):nzerror;cdecl;external ocilib name 'nzteDestroyPersona';
+{$ELSE}
+  nzteDestroyPersona : function (_para1:Pnzctx; _para2:PPnzttPersona):nzerror;cdecl;
+{$ENDIF}
+
+  {---------------------- nzteRetrieveTrustedIdentCopy ---------------------- }
+  {
+   * NAME
+   *    nzteRetrieveTrustedIdentCopy - Retrieves a trusted identity from persona
+   * 
+   * PARAMETERS
+   *    osscntxt IN     OSS context. 
+   *    persona  IN     Persona.
+   *    index    IN     Which wallet index to remove (first element is zero).
+   *    identity OUT    Trusted Identity from this persona.
+   * 
+   * NOTES
+   *    Retrieves a trusted identity from the persona based on the index 
+   *    number passed in.  This identity is a COPY of the one stored in 
+   *    the persona, therefore it is perfectly fine to close the persona
+   *    after this call is made.
+   *
+   *    The caller is responsible for freeing the memory of this object 
+   *    by calling nztiAbortIdentity it is no longer needed
+   *
+   * RETURNS
+   *    NZERROR_OK           Success.
+    }
+
+{$IFNDEF LinkDynamically}
+  function nzteRetrieveTrustedIdentCopy(_para1:Pnzctx; _para2:PnzttPersona; _para3:ub4; _para4:PPnzttIdentity):nzerror;cdecl;external ocilib name 'nzteRetrieveTrustedIdentCopy';
+{$ELSE}
+  nzteRetrieveTrustedIdentCopy : function (_para1:Pnzctx; _para2:PnzttPersona; _para3:ub4; _para4:PPnzttIdentity):nzerror;cdecl;
+{$ENDIF}
+
+  {--------------------- nztePriKey --------------------- }
+  {
+   * NAME
+   *    nztePriKey - Get the decrypted Private Key for the Persona
+   * 
+   * PARAMETERS
+   *    osscntxt IN     OSS context.
+   *    persona  IN     Persona.
+   *    vkey     OUT    Private Key [B_KEY_OBJ]
+   *    vkey_len OUT    Private Key Length
+   * 
+   * NOTES
+   *    This funiction will only work for X.509 based persona which contain
+   *    a private key.  
+   *    A copy of the private key is returned to the caller so that they do not 
+   *    have to worry about the key changeing "underneath them".
+   *    Memory will be allocated for the vkey and therefore, the CALLER
+   *    will be responsible for freeing this memory.
+   *
+   * RETURNS
+   *    NZERROR_OK           Success.
+   *    NZERROR_NO_MEMORY    ossctx is null.
+   *    NZERROR_TK_BADPRL    Persona resource locator did not work.
+    }
+
+{$IFNDEF LinkDynamically}
+  function nztePriKey(_para1:Pnzctx; _para2:PnzttPersona; _para3:PPub1; _para4:Pub4):nzerror;cdecl;external ocilib name 'nztePriKey';
+{$ELSE}
+  nztePriKey : function (_para1:Pnzctx; _para2:PnzttPersona; _para3:PPub1; _para4:Pub4):nzerror;cdecl;
+{$ENDIF}
+
+  {--------------------- nzteMyCert --------------------- }
+  {
+   * NAME
+   *    nzteMyCert - Get the X.509 Certificate for a persona
+   * 
+   * PARAMETERS
+   *    osscntxt IN     OSS context.
+   *    persona  IN     Persona.
+   *    cert     OUT    X.509 Certificate [BER encoded]
+   *    cert_len OUT    Certificate length
+   * 
+   * NOTES
+   *    This funiction will only work for X.509 based persona which contain
+   *    a certificate for the self identity. 
+   *    A copy of the certificate is returned to the caller so that they do not 
+   *    have to worry about the certificate changeing "underneath them".
+   *    Memory will be allocated for the cert and therefore, the CALLER
+   *    will be responsible for freeing this memory.
+   *
+   * RETURNS
+   *    NZERROR_OK           Success.
+   *    NZERROR_NO_MEMORY    ossctx is null.
+    }
+
+{$IFNDEF LinkDynamically}
+  function nzteMyCert(_para1:Pnzctx; _para2:PnzttPersona; _para3:PPub1; _para4:Pub4):nzerror;cdecl;external ocilib name 'nzteMyCert';
+{$ELSE}
+  nzteMyCert : function (_para1:Pnzctx; _para2:PnzttPersona; _para3:PPub1; _para4:Pub4):nzerror;cdecl;
+{$ENDIF}
+
+  {--------------------- nzteX509CreatePersona --------------------- }
+  {
+   * NAME
+   *    nzteX509CreatePersona - Given a BER X.509 cert, create a persona
+   * 
+   * PARAMETERS
+   *    osscntxt IN     OSS context.
+   *    cert     IN     X.509 Certificate [BER encoded]
+   *    cert_len IN     Certificate length
+   *    persona  OUT    Persona.
+   * 
+   * NOTES
+   *    Memory will be allocated for the persona and therefore, the CALLER
+   *    will be responsible for freeing this memory.
+   *
+   * RETURNS
+   *    NZERROR_OK           Success.
+   *    NZERROR_NO_MEMORY    ossctx is null.
+    }
+
+{$IFNDEF LinkDynamically}
+  function nzteX509CreatePersona(_para1:Pnzctx; _para2:Pub1; _para3:ub4; _para4:PPnzttPersona):nzerror;cdecl;external ocilib name 'nzteX509CreatePersona';
+{$ELSE}
+  nzteX509CreatePersona : function (_para1:Pnzctx; _para2:Pub1; _para3:ub4; _para4:PPnzttPersona):nzerror;cdecl;
+{$ENDIF}
+
+  {-------------------- nztiCreateIdentity -------------------- }
+  {
+   * NAME
+   *    nztiCreateIdentity - Create an identity.
+   * 
+   * PARAMETERS
+   *    osscntxt IN     OSS context.
+   *    itype    IN     Identity type.
+   *    desc     IN     Description of identity.
+   *    identity IN/OUT Identity.
+   * 
+   * NOTES
+   *    Memory is only allocated for the identity structure.  The elements in
+   *    the description struct are not copied.  Rather their pointers are copied
+   *    into the identity structure.  Therefore, the caller should not free
+   *    the elements referenced by the desc.  These elements will be freed
+   *    when the nztiDestroyIdentity is called.
+   *    
+   * RETURNS
+   *    NZERROR_OK        Success.
+   *    NZERROR_PARMS     Error in description.
+    }
+
+{$IFNDEF LinkDynamically}
+  function nztiCreateIdentity(_para1:Pnzctx; _para2:nzttVersion; _para3:PnzttIdentityDesc; _para4:PPnzttIdentity):nzerror;cdecl;external ocilib name 'nztiCreateIdentity';
+{$ELSE}
+  nztiCreateIdentity : function (_para1:Pnzctx; _para2:nzttVersion; _para3:PnzttIdentityDesc; _para4:PPnzttIdentity):nzerror;cdecl;
+{$ENDIF}
+
+{$ifdef NZ_OLD_TOOLS}
+  {-------------------- nztiDuplicateIdentity -------------------- }
+  {
+   * NAME
+   *    nztiDuplicateIdentity - Duplicate an identity.
+   * 
+   * PARAMETERS
+   *    osscntxt     IN     OSS context.
+   *    identity     IN     Target Identity.
+   *    new_identity IN     New Identity.
+   * 
+   * NOTES
+   *    Memory for the identity is allocated inside the function, and all
+   *    internal identity elements as well.
+   *    
+   * RETURNS
+   *    NZERROR_OK        Success.
+   *    NZERROR_TK_NOTFOUND  Identity not found.
+   *    NZERROR_PARMS     Error in description.
+    }
+
+{$IFNDEF LinkDynamically}
+  function nztiDuplicateIdentity(_para1:Pnzctx; _para2:PnzttIdentity; _para3:PPnzttIdentity):nzerror;cdecl;external ocilib name 'nztiDuplicateIdentity';
+{$ELSE}
+  nztiDuplicateIdentity : function (_para1:Pnzctx; _para2:PnzttIdentity; _para3:PPnzttIdentity):nzerror;cdecl;
+{$ENDIF}
+
+{$endif}
+  { NZ_OLD_TOOLS  }
+  {--------------------- nztiAbortIdentity --------------------- }
+  {
+   * NAME
+   *    nztiAbortIdentity - Abort an unassociated identity.
+   * 
+   * PARAMETERS
+   *    osscntxt IN     OSS context.
+   *    identity IN/OUT Identity.
+   * 
+   * NOTES
+   *    It is an error to try to abort an identity that can be
+   *    referenced through a persona.
+   *    
+   *    The identity pointer is set to NULL at the conclusion.
+   * 
+   * RETURNS
+   *    NZERROR_OK           Success.
+   *    NZERROR_CANTABORT    Identity is associated with persona.
+    }
+
+{$IFNDEF LinkDynamically}
+  function nztiAbortIdentity(_para1:Pnzctx; _para2:PPnzttIdentity):nzerror;cdecl;external ocilib name 'nztiAbortIdentity';
+{$ELSE}
+  nztiAbortIdentity : function (_para1:Pnzctx; _para2:PPnzttIdentity):nzerror;cdecl;
+{$ENDIF}
+
+{$ifdef NZ_OLD_TOOLS}
+  {----------------- nztidGetIdentityDesc ----------------- }
+  {
+   * NAME
+   *    nztidGetIdentityDesc - Gets an Identity Description from the identity
+   * 
+   * PARAMETERS
+   *    osscntxt    IN     Success.
+   *    identity    IN     Identity.
+   *    description IN/OUT Identity Description.
+   * 
+   * NOTES
+   *    Memory is allocated for the Identity Description. It
+   *    is the callers responsibility to free this memory by calling 
+   *    nztiFreeIdentityDesc.
+   *
+   * RETURNS
+   *    NZERROR_OK     Success.
+    }
+
+{$IFNDEF LinkDynamically}
+  function nztidGetIdentityDesc(_para1:Pnzctx; _para2:PnzttIdentity; _para3:PPnzttIdentityDesc):nzerror;cdecl;external ocilib name 'nztidGetIdentityDesc';
+{$ELSE}
+  nztidGetIdentityDesc : function (_para1:Pnzctx; _para2:PnzttIdentity; _para3:PPnzttIdentityDesc):nzerror;cdecl;
+{$ENDIF}
+
+  {----------------- nztidFreeIdentityDesc ----------------- }
+  {
+   * NAME
+   *    nztidFreeIdentityDesc - Frees memory for Identity Desc object.
+   * 
+   * PARAMETERS
+   *    osscntxt    IN     oss context.
+   *    description IN/OUT Identity Description.
+   * 
+   * NOTES
+   *    Memory is freed for all Identity description elements.  Pointer is 
+   *    then set to null.
+   *
+   * RETURNS
+   *    NZERROR_OK     Success.
+    }
+
+{$IFNDEF LinkDynamically}
+  function nztidFreeIdentityDesc(_para1:Pnzctx; _para2:PPnzttIdentityDesc):nzerror;cdecl;external ocilib name 'nztidFreeIdentityDesc';
+{$ELSE}
+  nztidFreeIdentityDesc : fucntion (_para1:Pnzctx; _para2:PPnzttIdentityDesc):nzerror;cdecl;
+{$ENDIF}
+
+{$endif}
+  { NZ_OLD_TOOLS  }
+  {---------------- nztific_FreeIdentityContent ---------------- }
+  {
+   * NAME
+   *     nztific_FreeIdentityContent - free the contents of an identity.
+   * 
+   * PARAMETERS
+   *    osscntxt         IN     OSS context.
+   *    identity         IN/OUT freed identity
+   * 
+   * NOTES
+   *    Free a created identity.
+   *
+   * RETURNS
+   *    NZERROR_OK     Success.
+    }
+  {
+   * Free the identity content.
+    }
+
+{$IFNDEF LinkDynamically}
+  function nztific_FreeIdentityContent(ossctx:Pnzctx; identity:PnzttIdentity):nzerror;cdecl;external ocilib name 'nztific_FreeIdentityContent';
+{$ELSE}
+  nztific_FreeIdentityContent : function (ossctx:Pnzctx; identity:PnzttIdentity):nzerror;cdecl;
+{$ENDIF}
+
+  {-------------------------- nztSign -------------------------- }
+  {
+   * NAME
+   *    nztSign - Create an attached signature.
+   * 
+   * PARAMETERS
+   *    osscntxt IN     OSS context.
+   *    persona  IN     Open persona acting as signer.
+   *    state    IN     State of signature.
+   *    inlen    IN     Length of this input part.
+   *    in       IN     This input part.
+   *    tdubuf   IN/OUT TDU buffer.
+   * 
+   * NOTES
+   *    
+   * RETURNS
+   *    NZERROR_OK           Success.
+   *    NZERROR_TK_CANTGROW  Needed to grow output buffer but could not.
+   *    NZERROR_TK_NOTOPEN   Persona is not open.
+   *    NZERROR_TK_NOTSUPP   Function not supported with persona.
+    }
+
+{$IFNDEF LinkDynamically}
+  function nztSign(_para1:Pnzctx; _para2:PnzttPersona; _para3:nzttces; _para4:ub4; _para5:Pub1;
+             _para6:PnzttBufferBlock):nzerror;cdecl;external ocilib name 'nztSign';
+{$ELSE}
+  nztSign : function(_para1:Pnzctx; _para2:PnzttPersona; _para3:nzttces; _para4:ub4; _para5:Pub1;
+             _para6:PnzttBufferBlock):nzerror;cdecl;
+{$ENDIF}
+
+  {------------------------- nztVerify ------------------------- }
+  {
+   * NAME
+   *    nztVerify - Verify an attached signature.
+   * 
+   * PARAMETERS
+   *    osscntxt IN     OSS context.
+   *    persona  IN     Persona.
+   *    state    IN     State of verification.
+   *    intdulen IN     TDU length.
+   *    intdu    IN     TDU.
+   *    out      IN/OUT Extracted message.
+   *    verified OUT    TRUE if signature verified.
+   *    validatedOUT    TRUE if signing identity validated.
+   *    identity OUT Identity of signing party.
+   * 
+   * NOTES
+   *    
+   * RETURNS
+   *    NZERROR_OK           Success.
+   *    NZERROR_TK_CANTGROW  Needed to grow outptu buffer but could not.
+   *    NZERROR_TK_NOTOPEN   Persona is not open.
+   *    NZERROR_TK_NOTSUPP   Function not supported with persona.
+    }
+
+{$IFNDEF LinkDynamically}
+  function nztVerify(_para1:Pnzctx; _para2:PnzttPersona; _para3:nzttces; _para4:ub4; _para5:Pub1;
+             _para6:PnzttBufferBlock; _para7:Pboolean; _para8:Pboolean; _para9:PPnzttIdentity):nzerror;cdecl;external ocilib name 'nztVerify';
+{$ELSE}
+  nztVerify : function (_para1:Pnzctx; _para2:PnzttPersona; _para3:nzttces; _para4:ub4; _para5:Pub1;
+             _para6:PnzttBufferBlock; _para7:Pboolean; _para8:Pboolean; _para9:PPnzttIdentity):nzerror;cdecl;
+{$ENDIF}
+
+  {------------------------ nztValidate ------------------------ }
+  {
+   * NAME
+   *    nztValidate - Validate an identity.
+   * 
+   * PARAMETERS
+   *    osscntxt IN  OSS context.
+   *    persona  IN  Persona.
+   *    identity IN  Identity.
+   *    validatedOUT TRUE if identity was validated.  
+   * 
+   * NOTES
+   *    
+   * RETURNS
+   *    NZERROR_OK           Success.
+   *    NZERROR_TK_NOTOPEN   Persona is not open.
+   *    NZERROR_TK_NOTSUPP   Function not supported with persona.
+    }
+
+{$IFNDEF LinkDynamically}
+  function nztValidate(_para1:Pnzctx; _para2:PnzttPersona; _para3:PnzttIdentity; _para4:Pboolean):nzerror;cdecl;external ocilib name 'nztValidate';
+{$ELSE}
+  nztValidate : function (_para1:Pnzctx; _para2:PnzttPersona; _para3:PnzttIdentity; _para4:Pboolean):nzerror;cdecl;
+{$ENDIF}
+
+  {-------------------- nztsd_SignDetached -------------------- }
+  {
+   * NAME
+   *    nztsd_SignDetached - Generate a detached signature.
+   * 
+   * PARAMETERS
+   *    osscntxt IN     OSS context.
+   *    persona  IN     Persona.
+   *    state    IN     State of signature.
+   *    inlen    IN     Length of this input part.
+   *    in       IN     This input part.
+   *    tdubuf   IN/OUT TDU buffer.
+   * 
+   * NOTES
+   *    
+   * RETURNS
+   *    NZERROR_OK           Success.
+   *    NZERROR_TK_CANTGROW  Needed to grow output buffer but could not.
+   *    NZERROR_TK_NOTOPEN   Persona is not open.
+   *    NZERROR_TK_NOTSUPP   Function not supported with persona.
+    }
+
+{$IFNDEF LinkDynamically}
+  function nztsd_SignDetached(_para1:Pnzctx; _para2:PnzttPersona; _para3:nzttces; _para4:ub4; _para5:Pub1;
+             _para6:PnzttBufferBlock):nzerror;cdecl;external ocilib name 'nztsd_SignDetached';
+{$ELSE}
+  nztsd_SignDetached : function (_para1:Pnzctx; _para2:PnzttPersona; _para3:nzttces; _para4:ub4; _para5:Pub1;
+             _para6:PnzttBufferBlock):nzerror;cdecl;
+{$ENDIF}
+
+  {------------------- nztved_VerifyDetached ------------------- }
+  {
+   * NAME
+   *    nztved_VerifyDetached - Verify a detached signature.
+   * 
+   * PARAMETERS
+   *    osscntxt IN     OSS context.
+   *    persona  IN     Persona.
+   *    state    IN     State of verification.
+   *    inlen    IN     Length of data.
+   *    in       IN     Data.
+   *    intdulen IN     Input TDU length.
+   *    tdu      IN     Input TDU.
+   *    verified OUT    TRUE if signature verified.
+   *    validatedOUT    TRUE if signing identity validated.
+   *    identity OUT Identity of signing party.
+   * 
+   * NOTES
+   *    
+   * RETURNS
+   *    NZERROR_OK           Success.
+   *    NZERROR_TK_NOTOPEN   Persona is not open.
+   *    NZERROR_TK_NOTSUPP   Function not supported with persona.
+    }
+
+{$IFNDEF LinkDynamically}
+  function nztved_VerifyDetached(_para1:Pnzctx; _para2:PnzttPersona; _para3:nzttces; _para4:ub4; _para5:Pub1;
+             _para6:ub4; _para7:Pub1; _para8:Pboolean; _para9:Pboolean; _para10:PPnzttIdentity):nzerror;cdecl;external ocilib name 'nztved_VerifyDetached';
+{$ELSE}
+  nztved_VerifyDetached : function (_para1:Pnzctx; _para2:PnzttPersona; _para3:nzttces; _para4:ub4; _para5:Pub1;
+             _para6:ub4; _para7:Pub1; _para8:Pboolean; _para9:Pboolean; _para10:PPnzttIdentity):nzerror;cdecl;
+{$ENDIF}
+
+  {--------------------- nztkec_PKEncrypt --------------------- }
+  {
+   * NAME
+   *    nztkec_PKEncrypt - Encrypt data symmetrically, encrypt key asymmetrically
+   * 
+   * PARAMETERS
+   *    osscntxt    IN     OSS context.
+   *    persona     IN     Persona.
+   *    nrecipients IN     Number of recipients for this encryption.
+   *    recipients  IN     List of recipients.
+   *    state       IN     State of encryption.
+   *    inlen       IN     Length of this input part.
+   *    in          IN     This input part.
+   *    tdubuf      IN/OUT TDU buffer.
+   * 
+   * NOTES
+   *    There is a limitation of 1 recipient (nrecipients = 1) at this
+   *    time.
+   *    
+   * RETURNS
+   *    NZERROR_OK           Success.
+   *    NZERROR_TK_CANTGROW  Needed to grow output buffer but could not.
+   *    NZERROR_TK_NOTOPEN   Persona is not open.
+   *    NZERROR_TK_NOTSUPP   Function not supported with persona.
+    }
+
+{$IFNDEF LinkDynamically}
+  function nztkec_PKEncrypt(_para1:Pnzctx; _para2:PnzttPersona; _para3:ub4; _para4:PnzttIdentity; _para5:nzttces;
+             _para6:ub4; _para7:Pub1; _para8:PnzttBufferBlock):nzerror;cdecl;external ocilib name 'nztkec_PKEncrypt';
+{$ELSE}
+  nztkec_PKEncrypt : function (_para1:Pnzctx; _para2:PnzttPersona; _para3:ub4; _para4:PnzttIdentity; _para5:nzttces;
+             _para6:ub4; _para7:Pub1; _para8:PnzttBufferBlock):nzerror;cdecl;
+{$ENDIF}
+
+  {---------------- nztxkec_PKEncryptExpansion ---------------- }
+  {
+   * NAME
+   *    nztxkec_PKEncryptExpansion - Determine the buffer needed for PKEncrypt
+   * 
+   * PARAMETERS
+   *    osscntxt    IN     OSS context. 
+   *    persona     IN     Persona.
+   *    nrecipients IN     Number of recipients.
+   *    inlen       IN     Length of input.
+   *    tdulen      out    Length of buffer need.
+   * 
+   * NOTES
+   *    
+   * RETURNS
+   *    NZERROR_OK           Success.
+   *    NZERROR_TK_NOTOPEN   Persona is not open.
+   *    NZERROR_TK_NOTSUPP   Function not supported with persona.
+    }
+
+{$IFNDEF LinkDynamically}
+  function nztxkec_PKEncryptExpansion(_para1:Pnzctx; _para2:PnzttPersona; _para3:ub4; _para4:ub4; _para5:Pub4):nzerror;cdecl;external ocilib name 'nztxkec_PKEncryptExpansion';
+{$ELSE}
+  nztxkec_PKEncryptExpansion : function (_para1:Pnzctx; _para2:PnzttPersona; _para3:ub4; _para4:ub4; _para5:Pub4):nzerror;cdecl;
+{$ENDIF}
+
+  {--------------------- nztkdc_PKDecrypt --------------------- }
+  {
+   * NAME
+   *    nztkdc_PKDecrypt - Decrypt a PKEncrypted message.
+   * 
+   * PARAMETERS
+   *    osscntxt    IN     OSS context.
+   *    persona     IN     Persona.
+   *    state       IN     State of encryption.
+   *    inlen       IN     Length of this input part.
+   *    in          IN     This input part.
+   *    tdubuf      IN/OUT TDU buffer.
+   * 
+   * NOTES
+   *    
+   * RETURNS
+   *    NZERROR_OK           Success.
+   *    NZERROR_TK_CANTGROW  Needed to grow output buffer but could not.
+   *    NZERROR_TK_NOTOPEN   Persona is not open.
+   *    NZERROR_TK_NOTSUPP   Function not supported with persona.
+    }
+
+{$IFNDEF LinkDynamically}
+  function nztkdc_PKDecrypt(_para1:Pnzctx; _para2:PnzttPersona; _para3:nzttces; _para4:ub4; _para5:Pub1;
+             _para6:PnzttBufferBlock):nzerror;cdecl;external ocilib name 'nztkdc_PKDecrypt';
+{$ELSE}
+  nztkdc_PKDecrypt : function (_para1:Pnzctx; _para2:PnzttPersona; _para3:nzttces; _para4:ub4; _para5:Pub1;
+             _para6:PnzttBufferBlock):nzerror;cdecl;
+{$ENDIF}
+
+  {-------------------------- nztHash -------------------------- }
+  {
+   * NAME
+   *    nztHash - Generate a hash.
+   * 
+   * PARAMETERS
+   *    osscntxt IN     OSS context.
+   *    persona  IN     Persona.
+   *    state    IN     State of hash.
+   *    inlen    IN     Length of this input.
+   *    in       IN     This input.
+   *    tdu      IN/OUT Output tdu.
+   * 
+   * NOTES
+   *    
+   * RETURNS
+   *    NZERROR_OK           Success.
+   *    NZERROR_TK_CANTGROW  Needed to grow TDU buffer but could not.
+   *    NZERROR_TK_NOTOPEN   Persona is not open.
+   *    NZERROR_TK_NOTSUPP   Function not supported with persona.
+    }
+
+{$IFNDEF LinkDynamically}
+  function nztHash(_para1:Pnzctx; _para2:PnzttPersona; _para3:nzttces; _para4:ub4; _para5:Pub1;
+             _para6:PnzttBufferBlock):nzerror;cdecl;external ocilib name 'nztHash';
+{$ELSE}
+  nztHash : function (_para1:Pnzctx; _para2:PnzttPersona; _para3:nzttces; _para4:ub4; _para5:Pub1;
+             _para6:PnzttBufferBlock):nzerror;cdecl;
+{$ENDIF}
+
+  {----------------------- nztSeedRandom ----------------------- }
+  {
+   * NAME
+   *    nztSeedRandom - Seed the random function
+   * 
+   * PARAMETERS
+   *    osscntxt IN  OSS context.
+   *    persona  IN  Persona.
+   *    seedlen  IN  Length of seed.
+   *    seed     IN  Seed.
+   * 
+   * NOTES
+   *    
+   * RETURNS
+   *    NZERROR_OK           Success.
+   *    NZERROR_TK_NOTOPEN   Persona is not open.
+   *    NZERROR_TK_NOTSUPP   Function not supported with persona.
+    }
+
+{$IFNDEF LinkDynamically}
+  function nztSeedRandom(_para1:Pnzctx; _para2:PnzttPersona; _para3:ub4; _para4:Pub1):nzerror;cdecl;external ocilib name 'nztSeedRandom';
+{$ELSE}
+  nztSeedRandom : function (_para1:Pnzctx; _para2:PnzttPersona; _para3:ub4; _para4:Pub1):nzerror;cdecl;
+{$ENDIF}
+
+  {--------------------- nztrb_RandomBytes --------------------- }
+  {
+   * NAME
+   *    nztrb_RandomBytes - Generate a buffer random bytes.
+   * 
+   * PARAMETERS
+   *    osscntxt IN     OSS context.
+   *    persona  IN     Persona.
+   *    nbytes   IN     Number of bytes desired.
+   *    out      IN/OUT Buffer block for bytes.
+   * 
+   * NOTES
+   *    
+   * RETURNS
+   *    NZERROR_OK           Success.
+   *    NZERROR_TK_CANTGROW  Needed to grow TDU buffer but could not.
+   *    NZERROR_TK_NOTOPEN   Persona is not open.
+   *    NZERROR_TK_NOTSUPP   Function not supported with persona.
+    }
+
+{$IFNDEF LinkDynamically}
+  function nztrb_RandomBytes(_para1:Pnzctx; _para2:PnzttPersona; _para3:ub4; _para4:PnzttBufferBlock):nzerror;cdecl;external ocilib name 'nztrb_RandomBytes';
+{$ELSE}
+  nztrb_RandomBytes : function (_para1:Pnzctx; _para2:PnzttPersona; _para3:ub4; _para4:PnzttBufferBlock):nzerror;cdecl;
+{$ENDIF}
+
+  {-------------------- nztrn_RandomNumber -------------------- }
+  {
+   * NAME
+   *    nztrn_RandomNumber - Generate a random number
+   * 
+   * PARAMETERS
+   *    osscntxt IN     OSS context.
+   *    persona  IN     Persona.
+   *    num      OUT    Number.
+   * 
+   * NOTES
+   *    
+   * RETURNS
+   *    NZERROR_OK           Success.
+   *    NZERROR_TK_NOTOPEN   Persona is not open.
+   *    NZERROR_TK_NOTSUPP   Function not supported with persona.
+    }
+
+{$IFNDEF LinkDynamically}
+  function nztrn_RandomNumber(_para1:Pnzctx; _para2:PnzttPersona; _para3:Puword):nzerror;cdecl;external ocilib name 'nztrn_RandomNumber';
+{$ELSE}
+  nztrn_RandomNumber : function (_para1:Pnzctx; _para2:PnzttPersona; _para3:Puword):nzerror;cdecl;
+{$ENDIF}
+
+  {---------------------- nztbbInitBlock ---------------------- }
+  {
+   * NAME
+   *    nztbbInitBlock - Initialize a buffer block.
+   * 
+   * PARAMETERS
+   *    osscntxt IN     OSS context.
+   *    block    IN/OUT Buffer block.
+   * 
+   * NOTES
+   *    The buffer block is initialized to be empty (all members are set
+   *    to 0/NULL).  Such a block will be allocated memory as needed.
+   *    
+   * RETURNS
+   *    NZERROR_OK        Success.
+    }
+
+{$IFNDEF LinkDynamically}
+  function nztbbInitBlock(_para1:Pnzctx; _para2:PnzttBufferBlock):nzerror;cdecl;external ocilib name 'nztbbInitBlock';
+{$ELSE}
+  nztbbInitBlock : function (_para1:Pnzctx; _para2:PnzttBufferBlock):nzerror;cdecl;
+{$ENDIF}
+
+  {---------------------- nztbbReuseBlock ---------------------- }
+  {
+   * NAME
+   *    nztbbReuseBlock - Reuse an already initialized and possibly used block.
+   * 
+   * PARAMETERS
+   *    osscntxt IN     OSS context.
+   *    block    IN/OUT Buffer block.
+   * 
+   * NOTES
+   *    This function simply sets the used length member of the buffer
+   *    block to 0.  If the block already has memory allocated to it,
+   *    this will cause it to be reused.
+   *    
+   * RETURNS
+   *    NZERROR_OK        Success.
+    }
+
+{$IFNDEF LinkDynamically}
+  function nztbbReuseBlock(_para1:Pnzctx; _para2:PnzttBufferBlock):nzerror;cdecl;external ocilib name 'nztbbReuseBlock';
+{$ELSE}
+  nztbbReuseBlock : function (_para1:Pnzctx; _para2:PnzttBufferBlock):nzerror;cdecl;
+{$ENDIF}
+
+  {---------------------- nztbbSizeBlock ---------------------- }
+  {
+   * NAME
+   *    nztbbSizeBlock - Size an initialized block to a particular size.
+   * 
+   * PARAMETERS
+   *    osscntxt IN     OSS context.
+   *    len      IN     Minimum number of unused bytes desired.
+   *    block    IN/OUT Buffer block.
+   *
+   * NOTES
+   *    
+   * RETURNS
+   *    NZERROR_OK        Success.
+    }
+
+{$IFNDEF LinkDynamically}
+  function nztbbSizeBlock(_para1:Pnzctx; _para2:ub4; _para3:PnzttBufferBlock):nzerror;cdecl;external ocilib name 'nztbbSizeBlock';
+{$ELSE}
+  nztbbSizeBlock : function (_para1:Pnzctx; _para2:ub4; _para3:PnzttBufferBlock):nzerror;cdecl;
+{$ENDIF}
+
+  {----------------------- nztbbGrowBlock ----------------------- }
+  {
+   * NAME
+   *    nzbbGrowBlock - Increase the size of the buffer block.
+   * 
+   * PARAMETERS
+   *    osscntxt IN     OSS context.
+   *    inc      IN     Number of bytes to increase.
+   *    block    IN/OUT Buffer block.
+   *
+   * NOTES
+   *    
+   * RETURNS
+   *    NZERROR_OK        Success.
+    }
+
+{$IFNDEF LinkDynamically}
+  function nztbbGrowBlock(_para1:Pnzctx; _para2:ub4; _para3:PnzttBufferBlock):nzerror;cdecl;external ocilib name 'nztbbGrowBlock';
+{$ELSE}
+  nztbbGrowBlock : function (_para1:Pnzctx; _para2:ub4; _para3:PnzttBufferBlock):nzerror;cdecl;
+{$ENDIF}
+
+  {---------------------- nztbbPurgeBlock ---------------------- }
+  {
+   * NAME
+   *    nztbbPurgeBlock - Purge a buffer block of its memory.
+   * 
+   * PARAMETERS
+   *    osscntxt IN     OSS context.
+   *    block    IN/OUT Buffer block.
+   * 
+   * NOTES
+   *    The memory used by the buffer block as the buffer is released.
+   *    The buffer block itself is not affected.
+   *    
+   * RETURNS
+   *    NZERROR_OK        Success.
+    }
+
+{$IFNDEF LinkDynamically}
+  function nztbbPurgeBlock(_para1:Pnzctx; _para2:PnzttBufferBlock):nzerror;cdecl;external ocilib name 'nztbbPurgeBlock';
+{$ELSE}
+  nztbbPurgeBlock : function (_para1:Pnzctx; _para2:PnzttBufferBlock):nzerror;cdecl;
+{$ENDIF}
+
+  {----------------------- nztbbSetBlock ----------------------- }
+  {
+   * NAME
+   *    nztbbSetBlock - Set a buffer block to a known state.
+   * 
+   * PARAMETERS
+   *    osscntxt IN     OSS context.
+   *    flags    IN     Flags to set.
+   *    buflen   IN     Length of buffer.
+   *    usedlen  IN     Used length.
+   *    buffer   IN     Buffer.
+   *    block    IN/OUT Buffer block
+   * 
+   * NOTES
+   *    If buflen > 0, objlen == 0, and obj == NULL, then buflen bytes
+   *    of memory is allocated and a pointer is stored in the buffer
+   *    block.
+   *
+   *    The buffer parameter remains unchanged.
+   *    
+   * RETURNS
+   *    NZERROR_OK        Success.
+    }
+
+{$IFNDEF LinkDynamically}
+  function nztbbSetBlock(_para1:Pnzctx; _para2:uword; _para3:ub4; _para4:ub4; _para5:Pub1;
+             _para6:PnzttBufferBlock):nzerror;cdecl;external ocilib name 'nztbbSetBlock';
+{$ELSE}
+  nztbbSetBlock : function (_para1:Pnzctx; _para2:uword; _para3:ub4; _para4:ub4; _para5:Pub1;
+             _para6:PnzttBufferBlock):nzerror;cdecl;
+{$ENDIF}
+
+  {--------------------- nztiGetSecInfo --------------------- }
+  {
+   * NAME
+   *    nztiGetSecInfo - Get some security information for SSL
+   * 
+   * PARAMETERS
+   *    Name   IN/OUT   Description
+   *       osscntxt IN        OSS context.
+   *       persona  IN      persona
+   *       dname    OUT       distinguished name of the certificate
+   *       dnamelen OUT       length of the distinguished name 
+   *       issuername OUT     issuer name of the certificate
+   *       certhash OUT      SHA1 hash of the certificate
+   *   certhashlenOUT   length of the hash
+   * NOTES
+   *    This function allocate memories for issuername, certhash, and dname.
+   *   To deallocate memory for those params, you should call nztdbuf_DestroyBuf.
+   * RETURNS
+   *    
+    }
+
+{$IFNDEF LinkDynamically}
+  function nztiGetSecInfo(_para1:Pnzctx; _para2:PnzttPersona; _para3:PPtext; _para4:Pub4; _para5:PPtext;
+             _para6:Pub4; _para7:PPub1; _para8:Pub4):nzerror;cdecl;external ocilib name 'nztiGetSecInfo';
+{$ELSE}
+  nztiGetSecInfo : function (_para1:Pnzctx; _para2:PnzttPersona; _para3:PPtext; _para4:Pub4; _para5:PPtext;
+             _para6:Pub4; _para7:PPub1; _para8:Pub4):nzerror;cdecl;
+{$ENDIF}
+
+  {---------------------- nztiGetDName ---------------------- }
+  {
+   * NAME
+   *    nztiGetDName - Get the distinguished name for the given identity
+   * 
+   * PARAMETERS
+   *    Name   IN/OUT   Description
+   *       osscntxt IN        OSS context.
+   *   identity IN      identity need to get dname from
+   *   dn   OUT      distinguished name
+   *   dnlen   OUT      length of the dname
+   *
+   * NOTES
+   *    
+   * RETURNS
+   *    
+    }
+
+{$IFNDEF LinkDynamically}
+  function nztiGetDName(_para1:Pnzctx; _para2:PnzttIdentity; _para3:PPtext; _para4:Pub4):nzerror;cdecl;external ocilib name 'nztiGetDName';
+{$ELSE}
+  nztiGetDName : function (_para1:Pnzctx; _para2:PnzttIdentity; _para3:PPtext; _para4:Pub4):nzerror;cdecl;
+{$ENDIF}
+
+  {------------------- nztiGetIssuerName ------------------- }
+  {
+   * NAME
+   *    nztiGetIssuerName -  Get IssuerName for the given identity 
+   * 
+   * PARAMETERS
+   *    Name   IN/OUT   Description
+   *       osscntxt IN        OSS context.
+   *   identity IN      identity need to get issuername from
+   *   issuername OUT          issuer's name
+   *   issuernamelen OUT   length of the issuer's name
+   * 
+   * NOTES
+   *    
+   * RETURNS
+   *    
+    }
+
+{$IFNDEF LinkDynamically}
+  function nztiGetIssuerName(_para1:Pnzctx; _para2:PnzttIdentity; _para3:PPtext; _para4:Pub4):nzerror;cdecl;external ocilib name 'nztiGetIssuerName';
+{$ELSE}
+  nztiGetIssuerName : function (_para1:Pnzctx; _para2:PnzttIdentity; _para3:PPtext; _para4:Pub4):nzerror;cdecl;
+{$ENDIF}
+
+  {-------------------- nztgch_GetCertHash -------------------- }
+  {
+   * NAME
+   *    nztgch_GetCertHash -  Get SHA1 hash for the certificate of the identity 
+   * 
+   * PARAMETERS
+   *    Name   IN/OUT   Description
+   *       osscntxt IN        OSS context.
+   *   identity IN      identity need to get issuername from
+   *   certHash OUT          certHash buffer 
+   *   hashLen OUT      length of the certHash 
+   * 
+   * NOTES
+   *    Need to call nztdbuf_DestroyBuf to deallocate memory for certHash.   
+   * RETURNS
+   *    
+    }
+
+{$IFNDEF LinkDynamically}
+  function nztgch_GetCertHash(_para1:Pnzctx; _para2:PnzttIdentity; _para3:PPub1; _para4:Pub4):nzerror;cdecl;external ocilib name 'nztgch_GetCertHash';
+{$ELSE}
+  nztgch_GetCertHash : function (_para1:Pnzctx; _para2:PnzttIdentity; _para3:PPub1; _para4:Pub4):nzerror;cdecl;
+{$ENDIF}
+
+  {-------------------- nztdbuf_DestroyBuf -------------------- }
+  {
+   * NAME
+   *    nztdbuf_DestroyBuf - Deallocation funtions for ub1 and text buffer 
+   * 
+   * PARAMETERS
+   *    Name   IN/OUT   Description
+   *       osscntxt IN        OSS context.
+   *   buf      IN      Allocated buffer to be destroyed.
+   * 
+   * NOTES
+   *    
+   * RETURNS
+   *    
+    }
+
+{$IFNDEF LinkDynamically}
+  function nztdbuf_DestroyBuf(_para1:Pnzctx; _para2:PPdvoid):nzerror;cdecl;external ocilib name 'nztdbuf_DestroyBuf';
+{$ELSE}
+  nztdbuf_DestroyBuf : function (_para1:Pnzctx; _para2:PPdvoid):nzerror;cdecl;
+{$ENDIF}
+
+  {----------------------- nztGetCertChain ----------------------- }
+  {
+   * NAME
+   *    nztGetCertChain - 
+   * 
+   * PARAMETERS
+   *    Name   IN/OUT   Description
+   *       osscntxt IN        OSS context.
+   * 
+   * NOTES
+   *    
+   * RETURNS
+   *    
+    }
+
+{$IFNDEF LinkDynamically}
+  function nztGetCertChain(_para1:Pnzctx; _para2:PnzttWallet):nzerror;cdecl;external ocilib name 'nztGetCertChain';
+{$ELSE}
+  nztGetCertChain : function (_para1:Pnzctx; _para2:PnzttWallet):nzerror;cdecl;
+{$ENDIF}
+
+  {----------------------- nztCompareDN ----------------------- }
+  {
+   * NAME
+   *    nztCompareDN - 
+   * 
+   * PARAMETERS
+   *    Name   IN/OUT   Description
+   *       osscntxt IN        OSS context.
+   *   dn1   IN      distinguished name 1
+   *   dn2     IN      distinguished name 2
+   * 
+   * NOTES
+   *    
+   * RETURNS
+   *    NZERROR_OK       succeeded
+   *   others         failed
+   *    
+    }
+
+{$IFNDEF LinkDynamically}
+  function nztCompareDN(_para1:Pnzctx; _para2:Pub1; _para3:ub4; _para4:Pub1; _para5:ub4;
+             _para6:Pboolean):nzerror;cdecl;external ocilib name 'nztCompareDN';
+{$ELSE}
+  nztCompareDN : function (_para1:Pnzctx; _para2:Pub1; _para3:ub4; _para4:Pub1; _para5:ub4;
+             _para6:Pboolean):nzerror;cdecl;
+{$ENDIF}
+
+{$ifdef NZ_OLD_TOOLS}
+  {--------------------- nztIdentityAlloc --------------------- }
+  {
+   * NAME
+   *    nztIdentityAlloc - Allocate memory for nzttIdentity context
+   * 
+   * PARAMETERS
+   *    Name   IN/OUT   Description
+   *       osscntxt IN        OSS context.
+   *   identity OUT      nzttIdentity context
+   * 
+   * NOTES
+   *    
+   * RETURNS
+   *    NZERROR_OK       succeeded
+   *   others         failed
+   *    
+    }
+
+{$IFNDEF LinkDynamically}
+  function nztIdentityAlloc(_para1:Pnzctx; _para2:PPnzttIdentity):nzerror;cdecl;external ocilib name 'nztIdentityAlloc';
+{$ELSE}
+  nztIdentityAlloc : function (_para1:Pnzctx; _para2:PPnzttIdentity):nzerror;cdecl;
+{$ENDIF}
+
+  {--------------------- nztIPrivateAlloc --------------------- }
+  {
+   * NAME
+   *    nztIPrivateAlloc - Allocate memory for nzttIdentityPrivate
+   * 
+   * PARAMETERS
+   *    Name   IN/OUT   Description
+   * 
+   *       osscntxt IN        OSS context.
+   *   ipriv   OUT      identityPrivate structure
+   * NOTES
+   *    
+   * RETURNS
+   *    NZERROR_OK       succeeded
+   *   others         failed
+   *    
+    }
+
+{$IFNDEF LinkDynamically}
+  function nztIPrivateAlloc(_para1:Pnzctx; _para2:PPnzttIdentityPrivate):nzerror;cdecl;external ocilib name 'nztIPrivateAlloc';
+{$ELSE}
+  nztIPrivateAlloc : function (_para1:Pnzctx; _para2:PPnzttIdentityPrivate):nzerror;cdecl;
+{$ENDIF}
+
+  {---------------------- nztIDupContent ---------------------- }
+  {
+   * NAME
+   *    nztIDupContent - 
+   * 
+   * PARAMETERS
+   *    Name   IN/OUT   Description
+   *       osscntxt IN        OSS context.
+   *    targetIdentityOUT   target identity
+   *   sourceIdentity IN   source identity
+   * NOTES
+   *    
+   * RETURNS
+   *    NZERROR_OK       succeeded
+   *   others         failed
+   *    
+    }
+
+{$IFNDEF LinkDynamically}
+  function nztIDupContent(_para1:Pnzctx; _para2:PnzttIdentity; _para3:PnzttIdentity):nzerror;cdecl;external ocilib name 'nztIDupContent';
+{$ELSE}
+  nztIDupContent : function (_para1:Pnzctx; _para2:PnzttIdentity; _para3:PnzttIdentity):nzerror;cdecl;
+{$ENDIF}
+
+  {---------------------- nztIPDuplicate ---------------------- }
+  {
+   * NAME
+   *    nztIPDuplicate - 
+   * 
+   * PARAMETERS
+   *    Name   IN/OUT   Description
+   *       osscntxt IN        OSS context.
+   *   target_ipriv OUT   target identityPrivate
+   *   source_ipriv IN   source identityPrivate
+   * 
+   * NOTES
+   *    
+   * RETURNS
+   *    NZERROR_OK       succeeded
+   *   others         failed
+   *    
+    }
+
+{$IFNDEF LinkDynamically}
+  function nztIPDuplicate(_para1:Pnzctx; _para2:PPnzttIdentityPrivate; _para3:PnzttIdentityPrivate):nzerror;cdecl;external ocilib name 'nztIPDuplicate';
+{$ELSE}
+  nztIPDuplicate : function (_para1:Pnzctx; _para2:PPnzttIdentityPrivate; _para3:PnzttIdentityPrivate):nzerror;cdecl;
+{$ENDIF}
+
+  {--------------------- nztiDupIdentList --------------------- }
+  {
+   * NAME
+   *    nztiDupIdentList - 
+   * 
+   * PARAMETERS
+   *    Name   IN/OUT   Description
+   *       osscntxt IN        OSS context.
+   *   source_identities IN   source identity list
+   *   numIdent OUT      number of identity in the list
+   *   ppidentity OUT   Target of identity   
+   *   
+   * NOTES
+   *    
+   * RETURNS
+   *    NZERROR_OK       succeeded
+   *   others         failed
+   *    
+    }
+
+{$IFNDEF LinkDynamically}
+  function nztiDupIdentList(_para1:Pnzctx; _para2:PnzttIdentity; _para3:Pub4; _para4:PPnzttIdentity):nzerror;cdecl;external ocilib name 'nztiDupIdentList';
+{$ELSE}
+  nztiDupIdentList : function (_para1:Pnzctx; _para2:PnzttIdentity; _para3:Pub4; _para4:PPnzttIdentity):nzerror;cdecl;
+{$ENDIF}
+
+  {--------------------- nztFreeIdentList --------------------- }
+  {
+   * NAME
+   *    nztFreeIdentList - Free memory for a list of Identities
+   * 
+   * PARAMETERS
+   *    Name   IN/OUT   Description
+   *       osscntxt IN        OSS context.
+   *   identity IN      identity context
+   *
+   * NOTES
+   *    
+   * RETURNS
+   *    NZERROR_OK       succeeded
+   *   others         failed
+   *    
+    }
+
+{$IFNDEF LinkDynamically}
+  function nztFreeIdentList(_para1:Pnzctx; _para2:PPnzttIdentity):nzerror;cdecl;external ocilib name 'nztFreeIdentList';
+{$ELSE}
+  nztFreeIdentList : function (_para1:Pnzctx; _para2:PPnzttIdentity):nzerror;cdecl;
+{$ENDIF}
+
+{$endif}
+  { NZ_OLD_TOOLS  }
+  {--------------------- nztCheckVaLidity --------------------- }
+  {
+   * NAME
+   *    nztCheckVaLidity -  Check the validity of certificate
+   * 
+   * PARAMETERS
+   *    Name   IN/OUT   Description
+   *       osscntxt IN        OSS context.
+   *   start_time      Start time of the certificate
+   *   end_time      End time of the certificate
+   * 
+   * NOTES
+   *    
+   * RETURNS
+   *    NZERROR_OK       succeeded
+   *   others         failed
+   *    
+    }
+
+{$IFNDEF LinkDynamically}
+  function nztCheckValidity(_para1:Pnzctx; _para2:ub4; _para3:ub4):nzerror;cdecl;external ocilib name 'nztCheckValidity';
+{$ELSE}
+  nztCheckValidity : function (_para1:Pnzctx; _para2:ub4; _para3:ub4):nzerror;cdecl;
+{$ENDIF}
+
+  {--------------------- nztwCreateWallet --------------------- }
+  {
+   * NAME
+   *    nztwCreateWallet - Create a new wallet.
+   * 
+   * PARAMETERS
+   *    osscntxt IN     OSS context.
+   *    wrllen   IN     Length of wallet resource locator.
+   *    wrl      IN     WRL.
+   *    pwdlen   IN     Length of password (see notes below).
+   *    pwd      IN     Password.
+   *    wallet   IN/OUT Wallet. 
+   * 
+   * NOTES
+   *    It is an error to try to create a wallet that already exists.
+   *    The previously existing wallet must be destroyed first.
+   *
+   *    The wallet itself is not encrypted.  Rather, all the personas in
+   *    the wallet are encrypted under the same password.  A hash of the
+   *    password is stored in the wallet.
+   *
+   *    Upon success, an empty open wallet is stored in the wallet
+   *    parameter.
+   *    
+   * RETURNS
+   *    NZERROR_OK                 Sucess.
+   *    NZERROR_TK_WALLET_EXISTS   Wallet already exists.
+   *    NZERROR_RIO_OPEN           RIO could not create wallet (see trace file).
+    }
+
+{$IFNDEF LinkDynamically}
+  function nztwCreateWallet(_para1:Pnzctx; _para2:ub4; _para3:Ptext; _para4:ub4; _para5:Ptext;
+             _para6:PnzttWallet):nzerror;cdecl;external ocilib name 'nztwCreateWallet';
+{$ELSE}
+  nztwCreateWallet : function (_para1:Pnzctx; _para2:ub4; _para3:Ptext; _para4:ub4; _para5:Ptext;
+             _para6:PnzttWallet):nzerror;cdecl;
+{$ENDIF}
+
+  {--------------------- nztwDestroyWallet --------------------- }
+  {
+   * NAME
+   *    nztwDestroyWallet - Destroy an existing wallet.
+   * 
+   * PARAMETERS
+   *    osscntxt IN     OSS context.
+   *    wrllen   IN     Length of wallet resource locator.
+   *    wrl      IN     WRL.
+   *    pwdlen   IN     Length of password.
+   *    pwd      IN     Password.
+   * NOTES
+   *    
+   * RETURNS
+   *    NZERROR_OK           Success.
+   *    NZERROR_TK_PASSWORD  Password verification failed.
+   *    NZERROR_RIO_OPEN     RIO could not open wallet (see trace file).
+   *    NZERROR_RIO_DELETE   Delete failed (see trace file).
+    }
+
+{$IFNDEF LinkDynamically}
+  function nztwDestroyWallet(_para1:Pnzctx; _para2:ub4; _para3:Ptext; _para4:ub4; _para5:Ptext):nzerror;cdecl;external ocilib name 'nztwDestroyWallet';
+{$ELSE}
+  nztwDestroyWallet : function (_para1:Pnzctx; _para2:ub4; _para3:Ptext; _para4:ub4; _para5:Ptext):nzerror;cdecl;
+{$ENDIF}
+
+  {--------------------- nzteStorePersona --------------------- }
+  {
+   * NAME
+   *    nzteStorePersona - Store an open persona in a wallet.
+   * 
+   * PARAMETERS
+   *    osscntxt IN     OSS context. 
+   *    persona  IN/OUT Persona.
+   *    wallet   IN/OUT Wallet.
+   * 
+   * NOTES
+   *    If the open persona is not associated with any wallet (it was
+   *    created via the nzteClosePersona function), then storing the
+   *    persona creates that association.  The wallet will also have an
+   *    updated persona list that reflects this association.
+   *
+   *    If the open persona was associated with wallet 'A' (it was
+   *    opened via the nztwOpenWallet function), and is stored back into
+   *    wallet 'A', then then the old persona is overwritten by the new
+   *    persona if the password can be verified.  Recall that all
+   *    personas have a unique identity id.  If that id changes then
+   *    storing the persona will put a new persona in the wallet.
+   *
+   *    If the open persona was associated with wallet 'A' and is stored
+   *    into wallet 'B', and if wallet 'B' does not contain a persona
+   *    with that unique identity id, then the persona will be copied
+   *    into wallet 'B', wallet 'B''s persona list will be updated, and
+   *    the persona structure will be updated to be associated with
+   *    wallet 'B'.  If wallet 'B' already contained the persona, it
+   *    would be overwritten by the new persona.
+   *
+   *    The persona parameter is doubly indirect so that at the
+   *    conclusion of the function call, the pointer can be directed to
+   *    the persona in the wallet.
+   *
+   * RETURNS
+   *    NZERROR_OK           Success.
+   *    NZERROR_TK_PASSWORD  Password verification failed.
+   *    NZERROR_RIO_STORE    Store failed (see network trace file).
+    }
+
+{$IFNDEF LinkDynamically}
+  function nzteStorePersona(_para1:Pnzctx; _para2:PPnzttPersona; _para3:PnzttWallet):nzerror;cdecl;external ocilib name 'nzteStorePersona';
+{$ELSE}
+  nzteStorePersona : function (_para1:Pnzctx; _para2:PPnzttPersona; _para3:PnzttWallet):nzerror;cdecl;
+{$ENDIF}
+
+  {--------------------- nzteRemovePersona --------------------- }
+  {
+   * NAME
+   *    nzteRemovePersona - Remove a persona from the wallet.
+   * 
+   * PARAMETERS
+   *    osscntxt IN     OSS context.
+   *    persona  IN/OUT Persona.
+   * 
+   * NOTES
+   *    The password is verified before trying to remove the persona.
+   *    
+   *    If the persona is open, it is closed.  The persona is removed
+   *    from the wallet list and the persona pointer is set to NULL.
+   *    
+   *    A double indirect pointer to the persona is required so that the
+   *    persona pointer can be set to NULL upon completion.
+   *
+   * RETURNS
+   *    NZERROR_OK           Success.
+   *    NZERROR_TK_PASSWORD  Password verification failed.
+   *    NZERROR_RIO_DELETE   Delete failed.
+    }
+
+{$IFNDEF LinkDynamically}
+  function nzteRemovePersona(_para1:Pnzctx; _para2:PPnzttPersona):nzerror;cdecl;external ocilib name 'nzteRemovePersona';
+{$ELSE}
+  nzteRemovePersona : function (_para1:Pnzctx; _para2:PPnzttPersona):nzerror;cdecl;
+{$ENDIF}
+
+  {--------------------- nzteCreatePersona --------------------- }
+  {
+   * NAME
+   *    nzteCreatePersona - Create a persona.
+   * 
+   * PARAMETERS
+   *    osscntxt IN     OSS context.
+   *    itype    IN     Identity type.
+   *    ctype    IN     Cipher type.
+   *    desc     IN     Persona description.
+   *    persona  OUT    Persona.
+   * 
+   * NOTES
+   *    The resulting persona is created in the open state, but it will
+   *    not be associated with a wallet.
+   *    
+   *    The memory for the persona is allocated by the function.
+   *
+   * RETURNS
+   *    NZERROR_OK        Success.
+   *    NZERROR_TK_TYPE   Unsupported itype/ctype combination.
+   *    NZERROR_TK_PARMS  Error in persona description.
+    }
+
+{$IFNDEF LinkDynamically}
+  function nzteCreatePersona(_para1:Pnzctx; _para2:nzttVersion; _para3:nzttCipherType; _para4:PnzttPersonaDesc; _para5:PPnzttPersona):nzerror;cdecl;external ocilib name 'nzteCreatePersona';
+{$ELSE}
+  nzteCreatePersona : function (_para1:Pnzctx; _para2:nzttVersion; _para3:nzttCipherType; _para4:PnzttPersonaDesc; _para5:PPnzttPersona):nzerror;cdecl;
+{$ENDIF}
+
+  {----------------- nztiStoreTrustedIdentity ----------------- }
+  {
+   * NAME
+   *    nztiStoreTrustedIdentity - Store an identity into a persona.
+   * 
+   * PARAMETERS
+   *    osscntxt IN     Success.
+   *    identity IN/OUT Trusted Identity.
+   *    persona  IN/OUT Persona.    
+   * 
+   * NOTES
+   *    The identity is not saved with the persona in the wallet until
+   *    the persona is stored.
+   *    
+   *    The identity parameter is double indirect so that it can point
+   *    into the persona at the conclusion of the call.
+   *
+   * RETURNS
+   *    NZERROR_OK     Success.
+    }
+
+{$IFNDEF LinkDynamically}
+  function nztiStoreTrustedIdentity(_para1:Pnzctx; _para2:PPnzttIdentity; _para3:PnzttPersona):nzerror;cdecl;external ocilib name 'nztiStoreTrustedIdentity';
+{$ELSE}
+  nztiStoreTrustedIdentity : function (_para1:Pnzctx; _para2:PPnzttIdentity; _para3:PnzttPersona):nzerror;cdecl;
+{$ENDIF}
+
+  {--------------------- nzteSetProtection --------------------- }
+  {
+   * NAME
+   *    nzteSetProtection - Set the protection type for a CE function.
+   * 
+   * PARAMETERS
+   *    osscntxt IN     OSS context.
+   *    persona  IN/OUT Persona.
+   *    func     IN     CE function.
+   *    tdufmt   IN     TDU Format.
+   *    protinfo IN     Protection information specific to this format.
+   * 
+   * NOTES
+   *    
+   * RETURNS
+   *    NZERROR_OK              Success.
+   *    NZERROR_TK_PROTECTION   Unsupported protection.
+   *    NZERROR_TK_PARMS        Error in protection info.
+    }
+
+{$IFNDEF LinkDynamically}
+  function nzteSetProtection(_para1:Pnzctx; _para2:PnzttPersona; _para3:nzttcef; _para4:nztttdufmt; _para5:PnzttProtInfo):nzerror;cdecl;external ocilib name 'nzteSetProtection';
+{$ELSE}
+  nzteSetProtection : function (_para1:Pnzctx; _para2:PnzttPersona; _para3:nzttcef; _para4:nztttdufmt; _para5:PnzttProtInfo):nzerror;cdecl;
+{$ENDIF}
+
+  {--------------------- nzteGetProtection --------------------- }
+  {
+   * NAME
+   *    nzteGetProtection - Get the protection type for a CE function.
+   * 
+   * PARAMETERS
+   *    osscntxt IN     OSS context.
+   *    persona  IN     Persona.
+   *    func     IN     CE function.
+   *    tdufmt   OUT    TDU format.
+   *    protinfo OUT    Protection information.
+   * 
+   * NOTES
+   *    
+   * RETURNS
+   *    NZERROR_OK        Success.
+    }
+
+{$IFNDEF LinkDynamically}
+  function nzteGetProtection(_para1:Pnzctx; _para2:PnzttPersona; _para3:nzttcef; _para4:Pnztttdufmt; _para5:PnzttProtInfo):nzerror;cdecl;external ocilib name 'nzteGetProtection';
+{$ELSE}
+  nzteGetProtection : function (_para1:Pnzctx; _para2:PnzttPersona; _para3:nzttcef; _para4:Pnztttdufmt; _para5:PnzttProtInfo):nzerror;cdecl;
+{$ENDIF}
+
+  {-------------------- nztiRemoveIdentity -------------------- }
+  {
+   * NAME
+   *    nztiRemoveIdentity - Remove an identity from an open persona.
+   * 
+   * PARAMETERS
+   *    osscntxt IN     OSS context. 
+   *    identity IN/OUT     Identity.
+   * 
+   * NOTES
+   *    If the persona is not stored, this identity will still be in the
+   *    persona stored in the wallet.
+   *    
+   *    The identity parameter is doubly indirect so that at the
+   *    conclusion of the function, the pointer can be set to NULL.
+   *
+   * RETURNS
+   *    NZERROR_OK           Success.
+   *    NZERROR_TK_NOTFOUND  Identity not found.
+   *    NZERROR_TK_NOTOPEN   Persona is not open.
+    }
+
+{$IFNDEF LinkDynamically}
+  function nztiRemoveIdentity(_para1:Pnzctx; _para2:PPnzttIdentity):nzerror;cdecl;external ocilib name 'nztiRemoveIdentity';
+{$ELSE}
+  nztiRemoveIdentity : function (_para1:Pnzctx; _para2:PPnzttIdentity):nzerror;cdecl;
+{$ENDIF}
+
+  {----------------- nztifdn ----------------- }
+  {
+   * NAME
+   *    nztifdn - create an Identity From a Distinguished Name
+   * 
+   * PARAMETERS
+   *    osscntxt           IN  OSS context.
+   *    length             IN  Length of the distinguished name
+   *    distinguished_name IN  distinguished name string
+   *    ppidentity         OUT created identity
+   * 
+   * NOTES
+   *    Given a distinguished name, return the identity that corresponds to it.
+   *
+   * RETURNS
+   *    NZERROR_OK     Success.
+    }
+
+{$IFNDEF LinkDynamically}
+  function nztifdn(ossctx:Pnzctx; length:ub4; distinguished_name:Ptext; ppidentity:PPnzttIdentity):nzerror;cdecl;external ocilib name 'nztifdn';
+{$ELSE}
+  nztifdn : function (ossctx:Pnzctx; length:ub4; distinguished_name:Ptext; ppidentity:PPnzttIdentity):nzerror;cdecl;
+{$ENDIF}
+
+  {--------------------- nztxSignExpansion --------------------- }
+  {
+   * NAME
+   *    nztxSignExpansion - Determine the size of the attached signature buffer.
+   * 
+   * PARAMETERS
+   *    osscntxt IN  OSS context.
+   *    persona  IN  Persona.
+   *    inlen    IN  Length of input.
+   *    tdulen   OUT Buffer needed for signature.
+   *
+   * NOTES
+   *    
+   * RETURNS
+   *    NZERROR_OK           Success.
+   *    NZERROR_TK_NOTOPEN   Persona is not open.
+   *    NZERROR_TK_NOTSUPP   Function not supported with persona.
+    }
+
+{$IFNDEF LinkDynamically}
+  function nztxSignExpansion(_para1:Pnzctx; _para2:PnzttPersona; _para3:ub4; _para4:Pub4):nzerror;cdecl;external ocilib name 'nztxSignExpansion';
+{$ELSE}
+  nztxSignExpansion : function (_para1:Pnzctx; _para2:PnzttPersona; _para3:ub4; _para4:Pub4):nzerror;cdecl;
+{$ENDIF}
+
+  {--------------- nztxsd_SignDetachedExpansion --------------- }
+  {
+   * NAME
+   *    nztxsd_SignDetachedExpansion - Determine the size of buffer needed.
+   * 
+   * PARAMETERS
+   *    osscntxt IN  OSS context.
+   *    persona  IN  Persona.
+   *    inlen    IN  Length of input.
+   *    tdulen   OUT Buffer needed for signature.
+   * 
+   * NOTES
+   *    
+   * RETURNS
+   *    NZERROR_OK           Success.
+   *    NZERROR_TK_NOTOPEN   Persona is not open.
+   *    NZERROR_TK_NOTSUPP   Function not supported with persona.
+    }
+
+{$IFNDEF LinkDynamically}
+  function nztxsd_SignDetachedExpansion(_para1:Pnzctx; _para2:PnzttPersona; _para3:ub4; _para4:Pub4):nzerror;cdecl;external ocilib name 'nztxsd_SignDetachedExpansion';
+{$ELSE}
+  nztxsd_SignDetachedExpansion : function (_para1:Pnzctx; _para2:PnzttPersona; _para3:ub4; _para4:Pub4):nzerror;cdecl;
+{$ENDIF}
+
+  {------------------------ nztEncrypt ------------------------ }
+  {
+   * NAME
+   *    nztEncrypt - Symmetrically encrypt
+   * 
+   * PARAMETERS
+   *    osscntxt    IN     OSS context.
+   *    persona     IN     Persona.
+   *    inlen       IN     Length of this input part.
+   *    in          IN     This input part.
+   *    tdubuf      IN/OUT TDU buffer.
+   * 
+   * NOTES
+   *    
+   * RETURNS
+   *    NZERROR_OK           Success.
+   *    NZERROR_TK_CANTGROW  Needed to grow TDU buffer but could not.
+   *    NZERROR_TK_NOTOPEN   Persona is not open.
+   *    NZERROR_TK_NOTSUPP   Function not supported with persona.
+    }
+
+{$IFNDEF LinkDynamically}
+  function nztEncrypt(_para1:Pnzctx; _para2:PnzttPersona; _para3:nzttces; _para4:ub4; _para5:Pub1;
+             _para6:PnzttBufferBlock):nzerror;cdecl;external ocilib name 'nztEncrypt';
+{$ELSE}
+  nztEncrypt : function (_para1:Pnzctx; _para2:PnzttPersona; _para3:nzttces; _para4:ub4; _para5:Pub1;
+             _para6:PnzttBufferBlock):nzerror;cdecl;
+{$ENDIF}
+
+  {------------------- nztxEncryptExpansion ------------------- }
+  {
+   * NAME
+   *    nztxEncryptExpansion - Determine the size of the TDU to encrypt.
+   * 
+   * PARAMETERS
+   *    osscntxt    IN  OSS context.
+   *    persona     IN  Persona.
+   *    inlen       IN  Length of this input part.
+   *    tdulen      OUT Length of TDU.
+   * 
+   * NOTES
+   *    
+   * RETURNS
+   *    NZERROR_OK           Success.
+   *    NZERROR_TK_NOTOPEN   Persona is not open.
+   *    NZERROR_TK_NOTSUPP   Function not supported with persona.
+    }
+
+{$IFNDEF LinkDynamically}
+  function nztxEncryptExpansion(_para1:Pnzctx; _para2:PnzttPersona; _para3:ub4; _para4:Pub4):nzerror;cdecl;external ocilib name 'nztxEncryptExpansion';
+{$ELSE}
+  nztxEncryptExpansion : function (_para1:Pnzctx; _para2:PnzttPersona; _para3:ub4; _para4:Pub4):nzerror;cdecl;
+{$ENDIF}
+
+  {------------------------ nztDecrypt ------------------------ }
+  {
+   * NAME
+   *    nztDecrypt - Decrypt an Encrypted message.
+   * 
+   * PARAMETERS
+   *    osscntxt IN     OSS context.
+   *    persona  IN     Persona.
+   *    state    IN     State of decryption.
+   *    inlen    IN     Length of this input part.
+   *    in       IN     This input part.
+   *    out      IN/OUT Cleartext message.
+   * 
+   * NOTES
+   *    
+   * RETURNS
+   *    NZERROR_OK           Success.
+   *    NZERROR_TK_CANTGROW  Needed to grow TDU buffer but could not.
+   *    NZERROR_TK_NOTOPEN   Persona is not open.
+   *    NZERROR_TK_NOTSUPP   Function not supported with persona.
+    }
+
+{$IFNDEF LinkDynamically}
+  function nztDecrypt(_para1:Pnzctx; _para2:PnzttPersona; _para3:nzttces; _para4:ub4; _para5:Pub1;
+             _para6:PnzttBufferBlock):nzerror;cdecl;external ocilib name 'nztDecrypt';
+{$ELSE}
+  nztDecrypt : function (_para1:Pnzctx; _para2:PnzttPersona; _para3:nzttces; _para4:ub4; _para5:Pub1;
+             _para6:PnzttBufferBlock):nzerror;cdecl;
+{$ENDIF}
+
+  {------------------------ nztEnvelope ------------------------ }
+  {
+   * NAME
+   *    nztEnvelope - Sign and PKEncrypt a message.
+   * 
+   * PARAMETERS
+   *    osscntxt    IN     OSS context.
+   *    persona     IN     Persona.
+   *    nrecipients IN     Number of recipients for this encryption.
+   *    recipients  IN     List of recipients.
+   *    state       IN     State of encryption.
+   *    inlen       IN     Length of this input part.
+   *    in          IN     This input part.
+   *    tdubuf      IN/OUT TDU buffer.
+   *
+   * NOTES
+   *    
+   * RETURNS
+   *    NZERROR_OK           Success.
+   *    NZERROR_TK_CANTGROW  Needed to grow output buffer but could not.
+   *    NZERROR_TK_NOTOPEN   Persona is not open.
+   *    NZERROR_TK_NOTSUPP   Function not supported with persona.
+    }
+
+{$IFNDEF LinkDynamically}
+  function nztEnvelope(_para1:Pnzctx; _para2:PnzttPersona; _para3:ub4; _para4:PnzttIdentity; _para5:nzttces;
+             _para6:ub4; _para7:Pub1; _para8:PnzttBufferBlock):nzerror;cdecl;external ocilib name 'nztEnvelope';
+{$ELSE}
+  nztEnvelope : function (_para1:Pnzctx; _para2:PnzttPersona; _para3:ub4; _para4:PnzttIdentity; _para5:nzttces;
+             _para6:ub4; _para7:Pub1; _para8:PnzttBufferBlock):nzerror;cdecl;
+{$ENDIF}
+
+  {----------------------- nztDeEnvelope ----------------------- }
+  {
+   * NAME
+   *    nztDeEnvelope - PKDecrypt and verify a message.
+   * 
+   * PARAMETERS
+   *    osscntxt    IN     OSS context.
+   *    persona     IN     Persona.
+   *    state       IN     State of encryption.
+   *    inlen       IN     Length of this input part.
+   *    in          IN     This input part.
+   *    out         OUT    Message from TDU.
+   *    verified    OUT    TRUE if verified.
+   *    validated   OUT    TRUE if validated.
+   *    sender      OUT    Identity of sender.
+   *
+   * NOTES
+   *    
+   * RETURNS
+   *    NZERROR_OK           Success.
+   *    NZERROR_TK_CANTGROW  Needed to grow TDU buffer but could not.
+   *    NZERROR_TK_NOTOPEN   Persona is not open.
+   *    NZERROR_TK_NOTSUPP   Function not supported with persona.
+    }
+
+{$IFNDEF LinkDynamically}
+  function nztDeEnvelope(_para1:Pnzctx; _para2:PnzttPersona; _para3:nzttces; _para4:ub4; _para5:Pub1;
+             _para6:PnzttBufferBlock; _para7:Pboolean; _para8:Pboolean; _para9:PPnzttIdentity):nzerror;cdecl;external ocilib name 'nztDeEnvelope';
+{$ELSE}
+  nztDeEnvelope : function (_para1:Pnzctx; _para2:PnzttPersona; _para3:nzttces; _para4:ub4; _para5:Pub1;
+             _para6:PnzttBufferBlock; _para7:Pboolean; _para8:Pboolean; _para9:PPnzttIdentity):nzerror;cdecl;
+{$ENDIF}
+
+  {----------------------- nztKeyedHash ----------------------- }
+  {
+   * NAME
+   *    nztKeyedHash - Generate a keyed hash.
+   * 
+   * PARAMETERS
+   *    osscntxt IN     OSS context.
+   *    persona  IN     Persona.
+   *    state    IN     State of hash.
+   *    inlen    IN     Length of this input.
+   *    in       IN     This input.
+   *    tdu      IN/OUT Output tdu.
+   * 
+   * NOTES
+   *    
+   * RETURNS
+   *    NZERROR_OK           Success.
+   *    NZERROR_TK_CANTGROW  Needed to grow TDU buffer but could not.
+   *    NZERROR_TK_NOTOPEN   Persona is not open.
+   *    NZERROR_TK_NOTSUPP   Function not supported with persona.
+    }
+
+{$IFNDEF LinkDynamically}
+  function nztKeyedHash(_para1:Pnzctx; _para2:PnzttPersona; _para3:nzttces; _para4:ub4; _para5:Pub1;
+             _para6:PnzttBufferBlock):nzerror;cdecl;external ocilib name 'nztKeyedHash';
+{$ELSE}
+  nztKeyedHash : function (_para1:Pnzctx; _para2:PnzttPersona; _para3:nzttces; _para4:ub4; _para5:Pub1;
+             _para6:PnzttBufferBlock):nzerror;cdecl;
+{$ENDIF}
+
+  {------------------ nztxKeyedHashExpansion ------------------ }
+  {
+   * NAME
+   *    nztxKeyedHashExpansion - Determine the space needed for a keyed hash.
+   * 
+   * PARAMETERS
+   *    osscntxt IN  OSS context.
+   *    persona  IN  Persona.
+   *    inlen    IN  Length of this input.
+   *    tdulen   OUT TDU length.
+   * 
+   * NOTES
+   *    
+   * RETURNS
+   *    NZERROR_OK           Success.
+   *    NZERROR_TK_NOTOPEN   Persona is not open.
+   *    NZERROR_TK_NOTSUPP   Function not supported with persona.
+    }
+
+{$IFNDEF LinkDynamically}
+  function nztxKeyedHashExpansion(_para1:Pnzctx; _para2:PnzttPersona; _para3:ub4; _para4:Pub4):nzerror;cdecl;external ocilib name 'nztxKeyedHashExpansion';
+{$ELSE}
+  nztxKeyedHashExpansion : function (_para1:Pnzctx; _para2:PnzttPersona; _para3:ub4; _para4:Pub4):nzerror;cdecl;
+{$ENDIF}
+
+  {--------------------- nztxHashExpansion --------------------- }
+  {
+   * NAME
+   *    nztxHashExpansion - Determine the size of the TDU for a hash.
+   * 
+   * PARAMETERS
+   *    osscntxt IN  OSS context.
+   *    persona  IN  Persona.
+   *    inlen    IN  Length of this input.
+   *    tdulen   OUT TDU length.
+   * 
+   * NOTES
+   *    
+   * RETURNS
+   *    NZERROR_OK           Success.
+   *    NZERROR_TK_NOTOPEN   Persona is not open.
+   *    NZERROR_TK_NOTSUPP   Function not supported with persona.
+    }
+
+{$IFNDEF LinkDynamically}
+  function nztxHashExpansion(_para1:Pnzctx; _para2:PnzttPersona; _para3:ub4; _para4:Pub4):nzerror;cdecl;external ocilib name 'nztxHashExpansion';
+{$ELSE}
+  nztxHashExpansion : function(_para1:Pnzctx; _para2:PnzttPersona; _para3:ub4; _para4:Pub4):nzerror;cdecl;
+{$ENDIF}
+
+  {---------------- nztiae_IsAuthEnabled ---------------- }
+  {
+   * NAME
+   *    nztiae_IsAuthEnabled -  Checks to see if Authentication is Enabled
+   *                               in the current Cipher Spec.
+   * 
+   * PARAMETERS
+   *    ctx   IN   Oracle SSL Context
+   *      ncipher IN    CipherSuite
+   *      authEnabled OUT Boolean for is Auth Enabled?
+   * 
+   * NOTES
+   *    
+   * RETURNS
+   *      NZERROR_OK on success.
+   *      NZERROR_TK_INV_CIPHR_TYPE if Cipher Spec is not Recognized.
+    }
+
+{$IFNDEF LinkDynamically}
+  function nztiae_IsAuthEnabled(_para1:Pnzctx; _para2:ub2; _para3:Pboolean):nzerror;cdecl;external ocilib name 'nztiae_IsAuthEnabled';
+{$ELSE}
+  nztiae_IsAuthEnabled : function (_para1:Pnzctx; _para2:ub2; _para3:Pboolean):nzerror;cdecl;
+{$ENDIF}
+
+  {---------------- nztiee_IsEncrEnabled ---------------- }
+  {
+   * NAME
+   *    nztiee_IsEncrEnabled -  Checks to see if Encryption is Enabled
+   *                               in the current Cipher Spec.
+   * 
+   * PARAMETERS
+   *    ctx   IN   Oracle SSL Context
+   *      ncipher IN    CipherSuite
+   *      EncrEnabled OUT Boolean for is Auth Enabled?
+   * 
+   * NOTES
+   *    
+   * RETURNS
+   *      NZERROR_OK on success.
+   *      NZERROR_TK_INV_CIPHR_TYPE if Cipher Spec is not Recognized.
+    }
+
+{$IFNDEF LinkDynamically}
+  function nztiee_IsEncrEnabled(_para1:Pnzctx; _para2:ub2; _para3:Pboolean):nzerror;cdecl;external ocilib name 'nztiee_IsEncrEnabled';
+{$ELSE}
+  nztiee_IsEncrEnabled : function (_para1:Pnzctx; _para2:ub2; _para3:Pboolean):nzerror;cdecl;
+{$ENDIF}
+
+  {---------------- nztihe_IsHashEnabled ---------------- }
+  {
+   * NAME
+   *    nztihe_IsHashEnabled -  Checks to see if HAshing is Enabled
+   *                               in the current Cipher Spec.
+   * 
+   * PARAMETERS
+   *    ctx   IN   Oracle SSL Context
+   *      ncipher IN    CipherSuite
+   *      hashEnabled OUT Boolean for is Auth Enabled?
+   * 
+   * NOTES
+   *    
+   * RETURNS
+   *      NZERROR_OK on success.
+   *      NZERROR_TK_INV_CIPHR_TYPE if Cipher Spec is not Recognized.
+    }
+
+{$IFNDEF LinkDynamically}
+  function nztihe_IsHashEnabled(_para1:Pnzctx; _para2:ub2; _para3:Pboolean):nzerror;cdecl;external ocilib name 'nztihe_IsHashEnabled';
+{$ELSE}
+  nztihe_IsHashEnabled : function (_para1:Pnzctx; _para2:ub2; _para3:Pboolean):nzerror;cdecl;
+{$ENDIF}
+
+  {
+   *
+    }
+{$IFNDEF LinkDynamically}
+
+  function nztGetIssuerName(_para1:Pnzctx; _para2:PnzttIdentity; _para3:PPub1; _para4:Pub4):nzerror;cdecl;external ocilib name 'nztGetIssuerName';
+
+
+  function nztGetSubjectName(_para1:Pnzctx; _para2:PnzttIdentity; _para3:PPub1; _para4:Pub4):nzerror;cdecl;external ocilib name 'nztGetSubjectName';
+
+
+  function nztGetBase64Cert(_para1:Pnzctx; _para2:PnzttIdentity; _para3:PPub1; _para4:Pub4):nzerror;cdecl;external ocilib name 'nztGetBase64Cert';
+
+  function nztGetSerialNumber(_para1:Pnzctx; _para2:PnzttIdentity; _para3:PPub1; _para4:Pub4):nzerror;cdecl;external ocilib name 'nztGetSerialNumber';
+
+  function nztGetValidDate(_para1:Pnzctx; _para2:PnzttIdentity; _para3:Pub4; _para4:Pub4):nzerror;cdecl;external ocilib name 'nztGetValidDate';
+
+  function nztGetVersion(_para1:Pnzctx; _para2:PnzttIdentity; _para3:Pnzstrc):nzerror;cdecl;external ocilib name 'nztGetVersion';
+
+  function nztGetPublicKey(_para1:Pnzctx; _para2:PnzttIdentity; _para3:PPub1; _para4:Pub4):nzerror;cdecl;external ocilib name 'nztGetPublicKey';
+
+  function nztGenericDestroy(_para1:Pnzctx; _para2:PPub1):nzerror;cdecl;external ocilib name 'nztGenericDestroy';
+
+  function nztSetAppDefaultLocation(_para1:Pnzctx; _para2:Ptext; _para3:size_t):nzerror;cdecl;external ocilib name 'nztSetAppDefaultLocation';
+
+  function nztSearchNZDefault(_para1:Pnzctx; _para2:Pboolean):nzerror;cdecl;external ocilib name 'nztSearchNZDefault';
+{$ELSE}
+  nztGetIssuerName : function (_para1:Pnzctx; _para2:PnzttIdentity; _para3:PPub1; _para4:Pub4):nzerror;cdecl;
+
+
+  nztGetSubjectName: function(_para1:Pnzctx; _para2:PnzttIdentity; _para3:PPub1; _para4:Pub4):nzerror;cdecl;
+
+
+  nztGetBase64Cert : function(_para1:Pnzctx; _para2:PnzttIdentity; _para3:PPub1; _para4:Pub4):nzerror;cdecl;
+
+  nztGetSerialNumber : function(_para1:Pnzctx; _para2:PnzttIdentity; _para3:PPub1; _para4:Pub4):nzerror;cdecl;
+
+  nztGetValidDate : function(_para1:Pnzctx; _para2:PnzttIdentity; _para3:Pub4; _para4:Pub4):nzerror;cdecl;
+
+  nztGetVersion : function(_para1:Pnzctx; _para2:PnzttIdentity; _para3:Pnzstrc):nzerror;cdecl;
+
+  nztGetPublicKey : function(_para1:Pnzctx; _para2:PnzttIdentity; _para3:PPub1; _para4:Pub4):nzerror;cdecl;
+
+  nztGenericDestroy : function(_para1:Pnzctx; _para2:PPub1):nzerror;cdecl;
+
+  nztSetAppDefaultLocation : function(_para1:Pnzctx; _para2:Ptext; _para3:size_t):nzerror;cdecl;
+
+  nztSearchNZDefault : function(_para1:Pnzctx; _para2:Pboolean):nzerror;cdecl;
+{$ENDIF}
+

+ 3914 - 0
packages/base/oracle/oci.inc

@@ -0,0 +1,3914 @@
+
+{$MODE objfpc}
+{$MACRO on}
+
+interface
+
+uses ctypes,
+{$IFDEF LinkDynamically}
+    Dynlibs, sysutils,
+{$ENDIF}
+    oratypes;
+
+{
+  Automatically converted by H2Pas 1.0.0 from oci.h
+  The following command line parameters were used:
+    -p
+    -D
+    -l
+    jojo.so
+    oci.h
+}
+
+{$IFDEF Unix}
+  {$DEFINE extdecl:=cdecl}
+  const
+    ocilib = 'libociei.so';
+{$ENDIF}
+{$IFDEF Win32}
+  {$DEFINE extdecl:=stdcall}
+  const
+    ocilib = 'libociei.dll';
+{$ENDIF}
+{$IFDEF Wince}
+  {$DEFINE extdecl:=stdcall}
+  const
+    ocilib = 'libociei.dll';
+{$ENDIF}
+
+{$PACKRECORDS C}
+
+
+  {
+   * $Header: oci.h 11-jan-2005.15:11:45 aahluwal Exp $
+    }
+  { Copyright (c) 1995, 2005, Oracle. All rights reserved.   }
+  { 
+     NAME 
+       oci.h - V8 Oracle Call Interface public definitions
+  
+     DESCRIPTION 
+       This file defines all the constants and structures required by a V8
+       OCI programmer.
+  
+     RELATED DOCUMENTS 
+       V8 OCI Functional Specification 
+       Oracle Call Interface Programmer's Guide Vol 1 and 2
+   
+     INSPECTION STATUS 
+       Inspection date: 
+       Inspection status: 
+       Estimated increasing cost defects per page: 
+       Rule sets: 
+   
+     ACCEPTANCE REVIEW STATUS 
+       Review date: 
+       Review status: 
+       Reviewers: 
+   
+     PUBLIC FUNCTION(S) 
+       None
+  
+     PRIVATE FUNCTION(S) 
+       None
+   
+     EXAMPLES 
+   
+     NOTES 
+  
+  
+     MODIFIED   (MM/DD/YY)
+     aahluwal    03/15/05 - [Bug 4235014]:add ASM, Preconnect events 
+     ssappara    08/12/04 - Bug3669429 add OCI_ATTR_DESC_SYNBAS
+     absaxena    03/24/05 - remove OCI_AQ_RESERVED_5 
+     mbastawa    03/01/05 - add OCI_EXEC_RESERVED_5 
+     msakayed    02/15/05 - Bug #3147299: Add OCI_ATTR_CURRENT_ERRCOL
+     aahluwal    01/11/05 - [Bug 3944589]: add OCI_AUTH_RESERVED_5 
+     nikeda      11/15/04 - Add OCIP_IIO 
+     rvissapr    11/10/04 - bug 3843644 - isencrypted 
+     hohung      11/22/04 - add OCI_BIND_RESERVED_3
+     cchui       10/25/04 - add OCI_ATTR_PROXY_CLIENT 
+     aahluwal    09/27/04 - add incarnation, reason, cardinality to event handle 
+     msakayed    09/14/04 - column encryption support (project id 5578) 
+     jacao       08/17/04 - Add OCI_ATTR_DB_CHARSET_ID 
+     mhho        08/29/04 - resolve conflicting mode declaration
+     sgollapu    05/28/04 - Add OCI_AUTH_RESERVED_3 
+     mbastawa    08/05/04 - add OCI_ATTR_RESERVED_21
+     ebatbout    07/27/04 - add OCI_ATTR_DIRPATH_RESERVED_9 and move all direct
+                            path attributes into a separate area in this file.
+     clei        06/29/04 - add OCI_ATTR_ENCC_SIZE
+     weiwang     05/06/04 - add OCIAQListenOpts and OCIAQLisMsgProps 
+     weiwang     04/30/04 - add OCI_AQ_RESERVED_5
+     nbhatt      04/27/04 - add new attribute 
+     ssvemuri    06/19/04 -  change notification descriptors and attributes
+     ksurlake    06/01/04 - grabtrans 'ksurlake_txn_skmishra_clone' 
+     ksurlake    05/13/04 - add subscriber handle attributes
+     mbastawa    06/01/04 - add 3 more OCI_FETCH_RESERVED modes
+     chliang     05/28/04 - add nchar literal replacement modes
+     nikeda      05/14/04 - [OLS on RAC] new authentication mode 
+     debanerj    05/17/04 - 13064: add fncodes for LOB array Read and Write
+     nikeda      05/20/04 - [OCI Events] Add incarnation, cardinality,reason 
+     nikeda      05/18/04 - [OCI Events] Add OCI_ATTR_SERVICENAME 
+     nikeda      05/17/04 - Add event handle 
+     nikeda      05/13/04 - [OCI Events] Rename HACBK->EVTCBK, HACTX->EVTCTX 
+     nikeda      05/10/04 - [OCI Events] code review changes 
+     nikeda      04/15/04 - [OCI Events] OCI_SESSRLS_DROPSESS_FORCE 
+     nikeda      04/12/04 - [OCI Events] Add OCI_ATTR_USER_MEMORY 
+     aahluwal    04/12/04 - add OCI_HNDLFR_RESERVED5 
+     vraja       04/28/04 - add options for redo sync on commit 
+     aahluwal    05/29/04 - [OCI Events]: add support for svc, svc member events 
+     nikeda      05/28/04 - grabtrans 'nikeda_oci_events_copy' 
+     nikeda      05/18/04 - [OCI Events] Add OCI_ATTR_SERVICENAME 
+     nikeda      05/17/04 - Add event handle 
+     nikeda      05/13/04 - [OCI Events] Rename HACBK->EVTCBK, HACTX->EVTCTX 
+     nikeda      05/10/04 - [OCI Events] code review changes 
+     nikeda      04/15/04 - [OCI Events] OCI_SESSRLS_DROPSESS_FORCE 
+     nikeda      04/12/04 - [OCI Events] Add OCI_ATTR_USER_MEMORY 
+     aahluwal    04/12/04 - add OCI_HNDLFR_RESERVED5 
+     jciminsk    04/28/04 - merge from RDBMS_MAIN_SOLARIS_040426 
+     jacao       03/06/04 - add OCI_ATTR_CURRENT_SCHEMA 
+     aahluwal    01/20/04 - remove OCI_KEEP_FETCH_STATE
+     aahluwal    03/25/04 - [OCI Events] add OCI_HTYPE_HAEVENT and related attrs 
+     nikeda      03/19/04 - [OCI Events] Add OCI_ATTR_HACBK and OCI_ATTR_HACTX 
+     dfrumkin    12/04/03 - Add database startup/shutdown
+     chliang     12/22/03 - grid/main merge: add OCI_ATTR_RESERVED_20 
+     jciminsk    12/12/03 - merge from RDBMS_MAIN_SOLARIS_031209 
+     sgollapu    09/19/03 - Add fetch modes 
+     sgollapu    07/30/03 - Add TSM attributes
+     sgollapu    06/26/03 - Add OCI_MUTEX_TRY
+     aime        06/23/03 - sync grid with main
+     sgollapu    06/07/03 - Add reserved attribute
+     sgollapu    06/05/03 - Add reserved auth flag
+     rpingte     05/22/03 - Add OCI_ATCH_RESERVED_5
+     sgollapu    05/06/03 - Add TSM attributes
+     sgollapu    04/10/03 - Session migration Flags/interfaces
+     dfrumkin    04/23/04 - add OCI_PREP2_RESERVED_1
+     rpingte     05/06/04 - add major and minor version information
+     bsinha      04/06/04 - add new OCI_TRANS flag
+     chliang     11/26/03 - add OCI_ATTR_RESERVED_19 
+     preilly     10/23/03 - Make OCI_ATTR_DIRPATH_METADATA_BUF private 
+     chliang     08/07/03 - add OCI_ATTR_SKIP_BUFFER
+     srseshad    03/12/03 - convert public oci api to ansi
+     weiwang     05/14/03 - remove iot creation for rule sets
+     rkoti       04/15/03 - [2746515] add fntcodes for Unlimited size LOB 6003
+     tcruanes    05/13/03 - add slave SQL OCI execution mode
+     rkoti       02/21/03 - [2761455] add OCI_FNCODE_AQENQARRAY,
+                            OCI_FNCODE_AQDEQARRAY and update OCI_FNCODE_MAXFCN
+     tkeefe      01/29/03 - bug-2773794: Add new interface for setting Kerb attrs
+     aahluwal    02/06/03 - add OCI_ATTR_TRANSFORMATION_NO
+     weiwang     12/05/02 - add OCI_ATTR_USER_PROPERTY
+     ataracha    01/03/03 - includeocixmldb.h
+     preilly     12/05/02 - Add wait attribute for locking when using dir path
+     tkeefe      01/03/03 - bug-2623771: Added OCI_ATTR_KERBEROS_KEY
+     lchidamb    12/13/02 - end-to-end tracing attributes
+     msakayed    10/28/02 - Bug #2643907: add OCI_ATTR_DIRPATH_SKIPINDEX_METHOD
+     rphillip    11/13/02 - Add OCIP_ATTR_DIRPATH_INDEX
+     sagrawal    10/13/02 - liniting
+     sagrawal    10/03/02 - PL/SQL Compiler warnings
+     jstenois    11/07/02 - remove ocixad.h
+     chliang     10/21/02 - add OCI_ATTR_RESERVED_16,17
+     hsbedi      10/30/02 - grabtrans 'jstenois_fix_xt_convert'
+     aahluwal    10/12/02 - add OCI_ATTR_AQ_NUM_E_ERRORS/OCI_ATTR_AQ_ERROR_INDEX
+     bdagevil    10/21/02 - add SQL analyze internal exec mode
+     csteinba    10/11/02 - add OCI_ATTR_RESERVED_16
+     chliang     10/12/02 - add bind row callback attributes
+     preilly     10/25/02 - Add new reserved parameters
+     tkeefe      10/31/02 - bug-2623771: Added OCI_ATTR_AUDIT_SESSION_ID
+     csteinba    10/04/02 - Add OCI_ATTR_RESERVED_15
+     mhho        10/11/02 - add new credential constant
+     thoang      09/25/02 - Add OCI_XMLTYPE_CREATE_CLOB
+     skaluska    10/07/02 - describe rules objects
+     csteinba    09/16/02 - Remove OCI_CACHE
+     gtarora     10/03/02 - OCI_ATTR_COL_SUBS => OCI_ATTR_OBJ_SUBS
+     msakayed    09/09/02 - Bug #2482469: add OCI_ATTR_DIRPATH_RESERVED_[3-6]
+     aahluwal    08/30/02 - adding dequeue across txn group
+     srseshad    04/24/02 - Add attribute OCI_ATTR_SPOOL_STMTCACHESIZE.
+     ebatbout    07/22/02 - Remove OCI_ATTR_RESERVED_11.
+     abande      01/17/02 - Bug 1788921; Add external attribute.
+     aahluwal    06/04/02 - bug 2360115
+     pbagal      05/24/02 - Incorporate review comments
+     pbagal      05/22/02 - Introduce instance type attribute.
+     whe         07/01/02 - add OCI_BIND_DEFINE_SOFT flags
+     gtarora     07/01/02 - Add OCI_ATTR_COL_SUBS
+     tkeefe      05/30/02 - Add support for new proxy authentication credentials
+     dgprice     12/18/01 - bug 2102779 add reserved force describe
+     schandir    11/19/01 - add/modify modes.
+     schandir    11/15/01 - add OCI_SPC_STMTCACHE.
+     schandir    12/06/01 - change mode value of OCI_SPOOL.
+     msakayed    11/02/01 - Bug #2094292: add OCI_ATTR_DIRPATH_INPUT
+     dsaha       11/09/01 - add OCI_DTYPE_RESERVED1
+     skabraha    11/05/01 - new method flag
+     skabraha    10/25/01 - another flag for XML
+     skabraha    10/11/01 - describe flags for subtypes
+     nbhatt      09/18/01 - new reserved AQ flags
+     celsbern    10/19/01 - merge LOG to MAIN
+     ksurlake    10/12/01 - add OCI_ATTR_RESERVED_13
+     ksurlake    08/13/01 - add OCI_ATTR_RESERVED_12
+     schandir    09/24/01 - Adding stmt caching
+     abande      09/04/01 - Adding session pooling
+     sagrawal    10/23/01 - add new bit for OCIPHandleFree
+     preilly     10/25/01 - Add support for specifying metadata on DirPathCtx
+     skabraha    09/24/01 - describe flags for XML type
+     schandir    09/24/01 - Adding stmt caching
+     abande      09/04/01 - Adding session pooling
+     stakeda     09/17/01 - add OCI_NLS_CHARSET_ID
+     whe         09/19/01 - add OCIXMLType create options
+     rpingte     09/11/01 - add OCI_MUTEX_ENV_ONLY and OCI_NO_MUTEX_STMT
+     cmlim       08/28/01 - mod datecache attrs to use same naming as dpapi attrs
+     wzhang      08/24/01 - Add new keywords for OCINlsNameMap.
+     rphillip    05/02/01 - Add date cache attributes
+     rphillip    08/22/01 - Add new stream version
+     ebatbout    04/13/01 - add definition, OCI_ATTR_RESERVED_11
+     chliang     04/12/01 - add shortnames for newer oci funcation
+     wzhang      04/11/01 - Add new OCI NLS constants.
+     cmlim       04/13/01 - remove attrs not used by dpapi (151 & 152 avail)
+     rkambo      03/23/01 - bugfix 1421793
+     cmlim       04/02/01 - remove OCI_ATTR_DIRPATH_NESTED_TBL, SUBST_OBJ_TBL
+                          - note: attribute #s 186 & 205 available
+     whe         03/28/01 - add OCI_AFC_PAD_ON/OFF mode
+     preilly     03/05/01 - Add stream versioning support to DirPath context
+     schandir    12/18/00 - remove attr CONN_INCR_DELAY.
+     schandir    12/12/00 - change mode from OCI_POOL to OCI_CPOOL.
+     cbarclay    01/12/01 - add atribute for OCIP_ATTR_TMZ
+     whe         01/07/01 - add attributes related to UTF16 env mode
+     slari       12/29/00 - add blank line
+     slari       12/28/00 - OCI_ATTR_RESERVED_10
+     whe         12/19/00 - add OCI_ENVCR_RESERVED3
+     rpang       11/29/00 - Added OCI_ATTR_ORA_DEBUG_JDWP attribute
+     cmlim       11/28/00 - support substitutable object tables in dpapi
+     akatti      10/09/00 - [198379]:add OCIRowidToChar
+     sgollapu    10/11/00 - Add OCI_PREP_RESERVED_1
+     sgollapu    08/27/00 - add attribute to get erroneous column
+     sgollapu    07/29/00 - Add snapshot attributes
+     kmohan      09/18/00 - add OCI_FNCODE_LOGON2
+     abrumm      10/08/00 - include ocixad.h
+     mbastawa    10/04/00 - add OCI_ATTR_ROWS_FETCHED
+     nbhatt      08/24/00 - add transformation attribute
+     dmwong      08/22/00 - OCI_ATTR_CID_VALUE -> OCI_ATTR_CLIENT_IDENTIFIER.
+     cmlim       08/30/00 - add OCI_ATTR_DIRPATH_SID
+     dsaha       08/18/00 - add OCI_ATTR_RESERVED_5
+     amangal     08/17/00 - Merge into 8.2 : 1194361
+     slari       08/03/00 - add OCI_ATTR_HANDLE_POSITION
+     dsaha       07/20/00 - 2rt exec
+     sgollapu    07/04/00 - Add virtual session flag
+     cmlim       07/07/00 - add OCI_ATTR_DIRPATH_OID, OCI_ATTR_DIRPATH_NESTED_TBL
+     etucker     07/28/00 - add OCIIntervalFromTZ
+     rwessman    06/26/00 - N-tier: added new credential attributes
+     whe         07/27/00 - add OCI_UTF16 mode
+     vjayaram    07/18/00 - add connection pooling changes
+     etucker     07/12/00 - add dls apis
+     cmlim       07/07/00 - add OCI_ATTR_DIRPATH_OID, OCI_ATTR_DIRPATH_NESTED_TBL
+     sgollapu    07/04/00 - Add virtual session flag
+     najain      05/01/00 - AQ Signature support
+     sgollapu    06/14/00 - Add reserved OCI mode
+     rkambo      06/08/00 - notification presentation support
+     sagrawal    06/04/00 - ref cursor to c
+     ksurlake    06/07/00 - define OCI_POOL
+     mbastawa    06/05/00 - added scrollable cursor attributes
+     weiwang     03/31/00 - add LDAP support
+     whe         05/30/00 - add OCI_ATTR_MAXCHAR_SIZE
+     whe         05/23/00 - validate OCI_NO_CACHE mode
+     dsaha       02/02/00 - Add no-cache attr in statement handle
+     whe         05/23/00 - add OCIP_ICACHE
+     allee       05/17/00 - describe support for JAVA implmented TYPE
+     preilly     05/30/00 - Continue adding support for objects in direct path lo
+     cmlim       05/16/00 - 8.2 dpapi support of ADTs
+     rxgovind    05/04/00 - OCIAnyDataSet changes
+     rkasamse    05/25/00 - add OCIAnyDataCtx
+     rmurthy     04/26/00 - describe support for inheritance
+     ksurlake    04/18/00 - Add credential type
+     whe         05/24/00 - add OCI_ATTR_CHAR_ attrs
+     rkambo      04/19/00 - subscription enhancement
+     rmurthy     04/26/00 - describe support for inheritance
+     delson      03/28/00 - add OCI_ATTR_RESERVED_2
+     abrumm      03/31/00 - external table support
+     rkasamse    03/13/00 - add declarations for OCIAnyData
+     najain      02/24/00 - support for dequeue as select
+     dsaha       03/10/00 - Add OCI_ALWAYS_BLOCKING
+     esoyleme    04/25/00 - separated transactions
+     sgollapu    12/23/99 - OCIServerAttach extensions
+     slari       08/23/99 - add OCI_DTYPE_UCB
+     slari       08/20/99 - add OCI_UCBTYPE_REPLACE
+     hsbedi      08/31/99 - Memory Stats .
+     sgollapu    08/02/99 - oci sql routing
+     slari       08/06/99 - rename values for OCI_SERVER_STATUS
+     slari       08/02/99 - add OCI_ATTR_SERVER_STATUS
+     tnbui       07/28/99 - Remove OCI_DTYPE_TIMESTAMP_ITZ                       
+     amangal     07/19/99 - Merge into 8.1.6 : bug 785797
+     tnbui       07/07/99 - Change ADJUSTMENT modes                              
+     dsaha       07/07/99 - OCI_SAHRED_EXT
+     dmwong      06/08/99 - add OCI_ATTR_APPCTX_*
+     vyanaman    06/23/99 -
+     vyanaman    06/21/99 - Add new OCI Datetime and Interval descriptors
+     esoyleme    06/29/99 - expose MTS performance enhancements                  
+     rshaikh     04/23/99 - add OCI_SQL_VERSION_*
+     tnbui       05/24/99 - Remove OCIAdjStr                                     
+     dsaha       05/21/99 - Add OCI_ADJUST_UNK
+     mluong      05/17/99 - fix merge
+     tnbui       04/05/99 - ADJUSTMENT values
+     abrumm      04/16/99 - dpapi: more attributes
+     dsaha       02/24/99 - Add OCI_SHOW_DML_WARNINGS
+     jiyang      12/07/98 - Add OCI_NLS_DUAL_CURRENCY
+     slari       12/07/98 - change OCI_NOMUTEX to OCI_NO_MUTEX
+     aroy        11/30/98 - change OCI_NOCALLBACK to OCI_NO_UCB
+     aroy        11/13/98 - add env modes to process modes
+     slari       09/08/98 - add OCI_FNCODE_SVC2HST and _SVCRH
+     aroy        09/04/98 - Add OCI_ATTR_MIGSESSION
+     skray       08/14/98 - server groups for session switching
+     mluong      08/11/98 - add back OCI_HTYPE_LAST.
+     aroy        05/25/98 - add process handle type                              
+     aroy        04/06/98 - add shared mode                                      
+     slari       07/13/98 -  merge forward to 8.1.4
+     slari       07/09/98 -  add OCI_BIND_RESERVED_2
+     slari       07/08/98 -  add OCI_EXACT_FETCH_RESERVED_1
+     dsaha       07/07/98 -  Add OCI_PARSE_ONLY
+     dsaha       06/29/98 -  Add OCI_PARSE_ONLY
+     slari       07/01/98 -  add OCI_BIND_RESERVED_2
+     sgollapu    06/25/98 -  Fix bug 683565
+     slari       06/17/98 -  remove OC_FETCH_RESERVED_2
+     slari       06/11/98 -  add OCI_FETCH_RESERVED_1 and 2
+     jhasenbe    05/27/98 -  Remove definitions for U-Calls (Unicode)
+     jiyang      05/18/98 - remove OCI_ATTR_CARTLANG
+     nbhatt      05/20/98 -  OCI_DEQ_REMOVE_NODATA
+     nbhatt      05/19/98 - correct AQ opcode
+     skmishra    05/06/98 - Add precision attribute to Attributes list
+     aroy        04/20/98 - merge forward 8.0.5 -> 8.1.3
+     schandra    05/01/98 - OCI sender id
+     sgollapu    02/19/98 - enhanced array DML
+     nbhatt      05/15/98 -  AQ listen call
+     sgollapu    04/27/98 - more attributes
+     skaluska    04/06/98 - Add OCI_PTYPE_SCHEMA, OCI_PTYPE_DATABASE
+     slari       04/28/98 - add OCI_ATTR_PDPRC
+     lchidamb    05/05/98 - change OCI_NAMESPACE_AQ to 1
+     nbhatt      04/27/98 - AQ Notification Descriptor
+     abrumm      06/24/98 - more direct path attributes
+     abrumm      05/27/98 - OCI direct path interface support
+     abrumm      05/08/98 - OCI direct path interface support
+     lchidamb    03/02/98 - client notification additions
+     kkarun      04/17/98 - Add more Interval functions
+     vyanaman    04/16/98 - Add get/set TZ
+     kkarun      04/14/98 - Add OCI Datetime shortnames
+     vyanaman    04/13/98 - Add OCI DateTime and Interval check error codes
+     kkarun      04/07/98 - Add OCI_DTYPE_DATETIME and OCI_DTYPE_INTERVAL
+     esoyleme    12/15/97 - support failover callback retry
+     esoyleme    04/22/98 - merge support for failover callback retry
+     mluong      04/16/98 - add OCI_FNCODE_LOBLOCATORASSIGN
+     rkasamse    04/17/98 - add short names for OCIPickler(Memory/Ctx) cart servi
+     slari       04/10/98 - add OCI_FNCODE_SVCCTXTOLDA
+     slari       04/09/98 - add OCI_FNCODE_RESET
+     slari       04/07/98 - add OCI_FNCODE_LOBFILEISOPEN
+     slari       04/06/98 - add OCI_FNCODE_LOBOPEN
+     slari       03/20/98 - change OCI_CBTYPE_xxx to OCI_UCBTYPE_xxx
+     slari       03/18/98 - add OCI_FNCODE_MAXFCN
+     slari       02/12/98 - add OCI_ENV_NO_USRCB
+     skabraha    04/09/98 - adding shortnames for OCIFile
+     rhwu        04/03/98 - Add short names for the OCIThread package
+     tanguyen    04/03/98 - add OCI_ATTR_xxxx for type inheritance
+     rkasamse    04/02/98 - add OCI_ATTR_UCI_REFRESH
+     nramakri    04/01/98 - Add short names for the OCIExtract package
+     ewaugh      03/31/98 - Add short names for the OCIFormat package.
+     jhasenbe    04/06/98 - Add definitions for U-Calls (Unicode)
+                            (OCI_TEXT, OCI_UTEXT, OCI_UTEXT4)
+     skmishra    03/03/98 - Add OCI_ATTR_PARSE_ERROR_OFFSET
+     rwessman    03/11/98 - Added OCI_CRED_PROXY for proxy authentication
+     abrumm      03/31/98 - OCI direct path interface support
+     nmallava    03/03/98 - add constants for temp lob apis
+     skotsovo    03/05/98 - resolve merge conflicts
+     skotsovo    02/24/98 - add OCI_DTYPE_LOC
+     skaluska    01/21/98 - Add OCI_ATTR_LTYPE
+     rkasamse    01/06/98 - add OCI_ATTR* for obj cache enhancements
+     dchatter    01/08/98 - more comments
+     skabraha    12/02/97 - moved oci1.h to the front of include files.
+     jiyang      12/18/97 - Add OCI_NLS_MAX_BUFSZ
+     rhwu        12/02/97 - move oci1.h up
+     ewaugh      12/15/97 - Add short names for the OCIFormat package.
+     rkasamse    12/02/97 - Add a constant for memory cartridge services -- OCI_M
+     nmallava    12/31/97 - open/close for internal lobs
+     khnguyen    11/27/97 - add OCI_ATTR_LFPRECISION, OCI_ATTR_FSPRECISION
+     rkasamse    11/03/97 - add types for pickler cartridge services
+     mluong      11/20/97 - changed ubig_ora to ub4 per skotsovo
+     ssamu       11/14/97 - add oci1.h
+     jiyang      11/13/97 - Add NLS service for cartridge
+     esoyleme    12/15/97 - support failover callback retry
+     jwijaya     10/21/97 - change OCILobOffset/Length from ubig_ora to ub4
+     cxcheng     07/28/97 - fix compile with SLSHORTNAME
+     schandra    06/25/97 - AQ OCI interface
+     sgollapu    07/25/97 - Add OCI_ATTR_DESC_PUBLIC
+     cxcheng     06/16/97 - add OCI_ATTR_TDO
+     skotsovo    06/05/97 - add fntcodes for lob buffering subsystem
+     esoyleme    05/13/97 - move failover callback prototype
+     skmishra    05/06/97 - stdc compiler fixes
+     skmishra    04/22/97 - Provide C++ compatibility
+     lchidamb    04/19/97 - add OCI_ATTR_SESSLANG
+     ramkrish    04/15/97 - Add OCI_LOB_BUFFER_(NO)FREE
+     sgollapu    04/18/97 - Add OCI_ATTR_TABLESPACE
+     skaluska    04/17/97 - Add OCI_ATTR_SUB_NAME
+     schandra    04/10/97 - Use long OCI names
+     aroy        03/27/97 - add OCI_DTYPE_FILE
+     sgollapu    03/26/97 - Add OCI_OTYPEs
+     skmishra    04/09/97 - Added constant OCI_ROWID_LEN
+     dchatter    03/21/97 - add attr OCI_ATTR_IN_V8_MODE
+     lchidamb    03/21/97 - add OCI_COMMIT_ON_SUCCESS execution mode
+     skmishra    03/20/97 - Added OCI_ATTR_LOBEMPTY
+     sgollapu    03/19/97 - Add OCI_ATTR_OVRLD_ID
+     aroy        03/17/97 - add postprocessing callback
+     sgollapu    03/15/97 - Add OCI_ATTR_PARAM
+     cxcheng     02/07/97 - change OCI_PTYPE codes for type method for consistenc
+     cxcheng     02/05/97 - add OCI_PTYPE_TYPE_RESULT
+     cxcheng     02/04/97 - rename OCI_PTYPE constants to be more consistent
+     cxcheng     02/03/97 - add OCI_ATTR, OCI_PTYPE contants for describe type
+     esoyleme    01/23/97 - merge neerja callback
+     sgollapu    12/30/96 - Remove OCI_DTYPE_SECURITY
+     asurpur     12/26/96 - CHanging OCI_NO_AUTH to OCI_AUTH
+     sgollapu    12/23/96 - Add more attrs to COL, ARG, and SEQ
+     sgollapu    12/12/96 - Add OCI_DESCRIBE_ONLY
+     slari       12/11/96 - change prototype of OCICallbackInBind
+     nbhatt      12/05/96 - "callback"
+     lchidamb    11/19/96 - handle subclassing
+     sgollapu    11/09/96 - OCI_PATTR_*
+     dchatter    11/04/96 - add attr OCI_ATTR_CHRCNT
+     mluong      11/01/96 - test
+     cxcheng     10/31/96 - add #defines for OCILobLength etc
+     dchatter    10/31/96 - add lob read write call back fp defs
+     dchatter    10/30/96 - more changes
+     rhari       10/30/96 - Include ociextp.h at the very end
+     lchidamb    10/22/96 - add fdo attribute for bind/server handle
+     dchatter    10/22/96 - change attr defn for prefetch parameters & lobs/file
+                            calls
+     slari       10/21/96 - add OCI_ENV_NO_MUTEX
+     rhari       10/25/96 - Include ociextp.h
+     rxgovind    10/25/96 - add OCI_LOBMAXSIZE, remove OCI_FILE_READWRITE
+     sgollapu    10/24/96 - Correct OCILogon and OCILogoff
+     sgollapu    10/24/96 - Correct to OCILogon and OCILogoff
+     sgollapu    10/21/96 - Add ocilon and ociloff
+     skaluska    10/31/96 - Add OCI_PTYPE values
+     sgollapu    10/17/96 - correct OCI_ATTR_SVCCTX to OCI_ATTR_SERVER
+     rwessman    10/16/96 - Added security functions and fixed olint errors.
+     sthakur     10/14/96 - add more COR attributes
+     cxcheng     10/14/96 - re-enable LOB functions
+     sgollapu    10/10/96 - Add ocibdp and ocibdn
+     slari       10/07/96 - add back OCIRowid
+     aroy        10/08/96 -  add typedef ocibfill for PRO*C
+     mluong      10/11/96 - replace OCI_ATTR_CHARSET* with OCI_ATTR_CHARSET_*
+     cxcheng     10/10/96 - temporarily take out #define for lob functions
+     sgollapu    10/02/96 - Rename OCI functions and datatypes
+     skotsovo    10/01/96 - move orl lob fnts to oci
+     aroy        09/10/96 - fix merge errors
+     aroy        08/19/96 - NCHAR support
+     jboonleu    09/05/96 - add OCI attributes for object cache
+     dchatter    08/20/96 - HTYPE ranges from 1-50; DTYPE from 50-255
+     slari       08/06/96 - define OCI_DTYPE_ROWID
+     sthakur     08/14/96 - complex object support
+     schandra    06/17/96 - Convert XA to use new OCI
+     abrik       08/15/96 - OCI_ATTR_HEAPALLOC added
+     aroy        07/17/96 - terminology change: ocilobd => ocilobl
+     aroy        07/03/96 - add lob typedefs for Pro*C
+     slari       06/28/96 - add OCI_ATTR_STMT_TYPE
+     lchidamb    06/26/96 - reorg #ifndef
+     schandra    05/31/96 - attribute types for internal and external client name
+     asurpur     05/30/96 - Changing the value of mode
+     schandra    05/18/96 - OCI_TRANS_TWOPHASE -> 0x00000001 to 0x00100000
+     slari       05/30/96 - add callback function prototypes
+     jbellemo    05/23/96 - remove ociisc
+     schandra    04/23/96 - loosely-coupled branches
+     asurpur     05/15/96 - New mode for ocicpw
+     aroy        04/24/96 - making ocihandles opaque
+     slari       04/18/96 - add missing defines
+     schandra    03/27/96 - V8OCI - add transaction related calls
+     dchatter    04/01/96 - add OCI_FILE options
+     dchatter    03/21/96 - add oci2lda conversion routines
+     dchatter    03/07/96 - add OCI piece definition
+     slari       03/12/96 - add describe attributes
+     slari       03/12/96 - add OCI_OTYPE_QUERY
+     aroy        02/28/96 - Add column attributes
+     slari       02/09/96 - add OCI_OBJECT
+     slari       02/07/96 - add OCI_HYTPE_DSC
+     aroy        01/10/96 - adding function code defines...
+     dchatter    01/03/96 - define OCI_NON_BLOCKING
+     dchatter    01/02/96 - Add Any descriptor
+     dchatter    01/02/96 - Add Select List descriptor
+     dchatter    12/29/95 - V8 OCI definitions
+     dchatter    12/29/95 - Creation
+  
+   }
+
+  const // forward declarations which aren't possible in pascal
+  { Attach using server handle from pool  }
+     OCI_CPOOL = $0200;
+  { char set id  }
+     OCI_ATTR_NCHARSET_ID = 262;
+
+{$include ocidfn.inc}
+
+  {---------------------------------------------------------------------------
+   Short names provided for platforms which do not allow extended symbolic names 
+    --------------------------------------------------------------------------- }
+{$ifdef SLSHORTNAME}
+  { Translation of the long function/type names to short names for IBM only  }
+  { maybe lint will use this too  }
+
+  const
+     OCISessionEnd = ocitac;     
+     OCIResultSetToStmt = ocirs2sh;     
+     OCISessionBegin = ociauth;     
+     OCIServerAttach = ociatch;     
+     OCIDescriptorAlloc = ocigdesc;     
+     OCIServerDetach = ocidtch;     
+     OCIDescriptorFree = ocifdesc;     
+     OCIServerVersion = ocivers;     
+     OCIDescribeAny = ocidsca;     
+     OCIBindDynamic = ocibda;     
+     OCIBindByName = ocibdn;     
+     OCIBindByPos = ocibdp;     
+     OCIErrorGet = ocigdr;     
+     OCIBindArrayOfStruct = ocibsa;     
+     OCIEnvInit = ociinit;     
+     OCIBindObject = ocibndt;     
+     OCIHandleAlloc = ocighndl;     
+     OCIHandleFree = ocifhndl;     
+     OCIRowidToChar = ociri2c;     
+{$ifdef NEVER}
+
+  const
+     OCIStmtBindByPos = ocibndp;     
+     OCIStmtBindByName = ocibndn;     
+{$endif}
+
+  const
+     OCIAttrGet = ocigattr;     
+     OCIDefineByPos = ocidfne;     
+     OCIAttrSet = ocisattr;     
+     OCIDefineDynamic = ociddf;     
+     OCILdaToSvcCtx = ocild2sv;     
+     OCIDefineArrayOfStruct = ocidarr;     
+     OCIInitialize = ocipi;     
+     OCIDefineObject = ocidndt;     
+     OCIStmtExecute = ociexec;     
+     OCILobAppend = ocilfap;     
+     OCILobOpenFile = ocifopn;     
+     OCILobCloseFile = ocifcls;     
+     OCILobLocator = ocilobd;     
+     OCILobCopy = ocilfcp;     
+     OCILobFileCreate = ocifcrt;     
+     OCILobFileDelete = ocifdel;     
+     OCILobGetLength = ocilfln;     
+     OCILobWrite = ocilfwr;     
+     OCILobRead = ocilfrd;     
+     OCILobErase = ocilfer;     
+     OCILobTrim = ocilftr;     
+     OCIStmtFetch = ocifch;     
+     OCIStmtGetBindInfo = ocigbp;     
+     OCIStmtGetPieceInfo = ocigpi;     
+     OCIStmtPrepare = ocireq;     
+     OCIStmtSetPieceInfo = ocispi;     
+     OCISvcCtxToLda = ocisv2ld;     
+     OCITransCommit = ocitxcm;     
+     OCITransDetach = ocitxdt;     
+     OCITransForget = ocitxfgt;     
+     OCITransPrepare = ocitxpre;     
+     OCITransRollback = ocitxrl;     
+     OCIPasswordChange = ocicpw;     
+     OCITransStart = ocitxst;     
+     OCITransMultiPrepare = ocitxmp;     
+     OCIBreak = ocibreak;     
+     OCIParamGet = ocigparm;     
+     OCIParamSet = ocisparm;     
+     OCISecurityOpenWallet = ocizwOpenWallet;     
+     OCISecurityCloseWallet = ocizwCloseWallet;     
+     OCISecurityCreateWallet = ocizwCreateWallet;     
+     OCISecurityDestroyWallet = ocizwDestroyWallet;     
+     OCISecurityStorePersona = ocizeStorePersona;     
+     OCISecurityOpenPersona = ocizeOpenPersona;     
+     OCISecurityClosePersona = ocizeClosePersona;     
+     OCISecurityRemovePersona = ocizeRemovePersona;     
+     OCISecurityCreatePersona = ocizeCreatePersona;     
+     OCISecuritySetProtection = ocizeSetProtection;     
+     OCISecurityGetProtection = ocizeGetProtection;     
+     OCISecurityRemoveIdentity = ociziRemoveIdentity;     
+     OCISecurityCreateIdentity = ociziCreateIdentity;     
+     OCISecurityAbortIdentity = ociziAbortIdentity;     
+     OCISecurityFreeIdentity = ociziFreeIdentity;     
+     OCISecurityStoreTrustedIdentity = ociziStoreTrustedIdentity;     
+     OCISecuritySign = ocizSign;     
+     OCISecuritySignExpansion = ocizxSignExpansion;     
+     OCISecurityVerify = ocizVerify;     
+     OCISecurityValidate = ocizValidate;     
+     OCISecuritySignDetached = ocizsd_SignDetached;     
+     OCISecuritySignDetExpansion = ocizxsd_SignDetachedExpansion;     
+     OCISecurityVerifyDetached = ocizved_VerifyDetached;     
+     OCISecurity_PKEncrypt = ocizkec_PKEncrypt;     
+     OCISecurityPKEncryptExpansion = ocizxkec_PKEncryptExpansion;     
+     OCISecurityPKDecrypt = ocizkdc_PKDecrypt;     
+     OCISecurityEncrypt = ocizEncrypt;     
+     OCISecurityEncryptExpansion = ocizxEncryptExpansion;     
+     OCISecurityDecrypt = ocizDecrypt;     
+     OCISecurityEnvelope = ocizEnvelope;     
+     OCISecurityDeEnvelope = ocizDeEnvelope;     
+     OCISecurityKeyedHash = ocizKeyedHash;     
+     OCISecurityKeyedHashExpansion = ocizxKeyedHashExpansion;     
+     OCISecurityHash = ocizHash;     
+     OCISecurityHashExpansion = ocizxHashExpansion;     
+     OCISecuritySeedRandom = ocizSeedRandom;     
+     OCISecurityRandomBytes = ocizrb_RandomBytes;     
+     OCISecurityRandomNumber = ocizrn_RandomNumber;     
+     OCISecurityInitBlock = ocizibInitBlock;     
+     OCISecurityReuseBlock = ocizrbReuseBlock;     
+     OCISecurityPurgeBlock = ocizpbPurgeBlock;     
+     OCISecuritySetBlock = ocizsbSetBlock;     
+     OCISecurityGetIdentity = ocizgi_GetIdentity;     
+     OCIExtractInit = ocixeini;     
+     OCIExtractTerm = ocixetrm;     
+     OCIExtractReset = ocixerst;     
+     OCIExtractSetNumKeys = ocixesnk;     
+     OCIExtractSetKey = ocixesk;     
+     OCIExtractFromFile = ocixeff;     
+     OCIExtractFromStr = ocixefs;     
+     OCIExtractToInt = ocixeti;     
+     OCIExtractToBool = ocixetb;     
+     OCIExtractToStr = ocixets;     
+     OCIExtractToOCINum = ocixeton;     
+     OCIExtractToList = ocixetl;     
+     OCIExtractFromList = ocixefl;     
+     OCIDateTimeGetTime = ocidt01_GetTime;     
+     OCIDateTimeGetDate = ocidt02_GetDate;     
+     OCIDateTimeGetTimeZoneOffset = ocidt03_GetTZ;     
+     OCIDateTimeSysTimeStamp = ocidt07_SysTS;     
+     OCIDateTimeAssign = ocidt08_Assign;     
+     OCIDateTimeToText = ocidt09_ToText;     
+     OCIDateTimeFromText = ocidt10_FromText;     
+     OCIDateTimeCompare = ocidt11_Compare;     
+     OCIDateTimeCheck = ocidt12_Check;     
+     OCIDateTimeConvert = ocidt13_Convert;     
+     OCIDateTimeSubtract = ocidt14_Subtract;     
+     OCIDateTimeIntervalAdd = ocidt15_IntervalAdd;     
+     OCIDateTimeIntervalSub = ocidt16_IntervalSub;     
+     OCIDateTimeGetTimeZoneName = ocidt17_Gettzname;     
+     OCIDateTimeToArray = ocidt18_ToArray;     
+     OCIDateTimeFromArray = ocidt19_FromArray;     
+     OCIIntervalSubtract = ociint01_Subtract;     
+     OCIIntervalAdd = ociint02_Add;     
+     OCIIntervalMultiply = ociint03_Multiply;     
+     OCIIntervalDivide = ociint04_Divide;     
+     OCIIntervalCompare = ociint05_Compare;     
+     OCIIntervalFromText = ociint06_FromText;     
+     OCIIntervalToText = ociint07_ToText;     
+     OCIIntervalToNumber = ociint08_ToNumber;     
+     OCIIntervalCheck = ociint09_Check;     
+     OCIIntervalAssign = ociint10_Assign;     
+     OCIIntervalGetYearMonth = ociint11_GetYearMonth;     
+     OCIIntervalSetYearMonth = ociint12_SetYearMonth;     
+     OCIIntervalGetDaySecond = ociint13_GetDaySecond;     
+     OCIIntervalSetDaySecond = ociint14_SetDaySecond;     
+     OCIIntervalFromNumber = ociint15_FromNumber;     
+     OCIIntervalFromTZ = ociint16_FromTZ;     
+     OCIFormatInit = ocixs01_Init;     
+     OCIFormatString = ocixs02_Format;     
+     OCIFormatTerm = ocixs03_Term;     
+     OCIFormatTUb1 = ocixs04_TUb1;     
+     OCIFormatTUb2 = ocixs05_TUb2;     
+     OCIFormatTUb4 = ocixs06_TUb4;     
+     OCIFormatTUword = ocixs07_TUword;     
+     OCIFormatTUbig_ora = ocixs08_TUbig_ora;     
+     OCIFormatTSb1 = ocixs09_TSb1;     
+     OCIFormatTSb2 = ocixs10_TSb2;     
+     OCIFormatTSb4 = ocixs11_TSb4;     
+     OCIFormatTSword = ocixs12_TSword;     
+     OCIFormatTSbig_ora = ocixs13_TSbig_ora;     
+     OCIFormatTEb1 = ocixs14_TEb1;     
+     OCIFormatTEb2 = ocixs15_TEb2;     
+     OCIFormatTEb4 = ocixs16_TEb4;     
+     OCIFormatTEword = ocixs17_TEword;     
+     OCIFormatTChar = ocixs18_TChar;     
+     OCIFormatTText = ocixs19_TText;     
+     OCIFormatTDouble = ocixs20_TDouble;     
+     OCIFormatTDvoid = ocixs21_TDvoid;     
+     OCIFormatTEnd = ocixs22_TEnd;     
+     OCIFileInit = ocifinit;     
+     OCIFileTerm = ocifterm;     
+     OCIFileOpen = ocifopen;     
+     OCIFileClose = ocifclose;     
+     OCIFileRead = ocifread;     
+     OCIFileWrite = ocifwrite;     
+     OCIFileSeek = ocifseek;     
+     OCIFileExists = ocifexists;     
+     OCIFileGetLength = ocifglen;     
+     OCIFileFlush = ocifflush;     
+  { OCIThread short name  }
+     OCIThreadProcessInit = ocitt01_ProcessInit;     
+     OCIThreadInit = ocitt02_Init;     
+     OCIThreadTerm = ocitt03_Term;     
+     OCIThreadIsMulti = ocitt04_IsMulti;     
+     OCIThreadMutexInit = ocitt05_MutexInit;     
+     OCIThreadMutexDestroy = ocitt06_MutexDestroy;     
+     OCIThreadMutexAcquire = ocitt07_MutexAcquire;     
+     OCIThreadMutexRelease = ocitt08_MutexRelease;     
+     OCIThreadKeyInit = ocitt09_KeyInit;     
+     OCIThreadKeyDestroy = ocitt10_KeyDestroy;     
+     OCIThreadKeyGet = ocitt11_KeyGet;     
+     OCIThreadKeySet = ocitt12_KeySet;     
+     OCIThreadIdInit = ocitt13_IdInit;     
+     OCIThreadIdDestroy = ocitt14_IdDestroy;     
+     OCIThreadIdSet = ocitt15_IdSet;     
+     OCIThreadIdSetNull = ocitt16_IdSetNull;     
+     OCIThreadIdGet = ocitt17_IdGet;     
+     OCIThreadIdSame = ocitt18_IdSame;     
+     OCIThreadIdNull = ocitt19_IdNull;     
+     OCIThreadHndInit = ocitt20_HndInit;     
+     OCIThreadHndDestroy = ocitt21_HndDestroy;     
+     OCIThreadCreate = ocitt22_Create;     
+     OCIThreadJoin = ocitt23_Join;     
+     OCIThreadClose = ocitt24_Close;     
+     OCIThreadHandleGet = ocitt25_HandleGet;     
+  { Translation between the old and new datatypes  }
+     OCISession = ociusrh;     
+     OCIBind = ocibndh;     
+     OCIDescribe = ocidsch;     
+     OCIDefine = ocidfnh;     
+     OCIEnv = ocienvh;     
+     OCIError = ocierrh;     
+     OCICPool = ocicpool;     
+     OCISPool = ocispool;     
+     OCIAuthInfo = ociauthinfo;     
+     OCILob = ocilobd;     
+     OCILobLength = ocillen;     
+     OCILobMode = ocilmo;     
+     OCILobOffset = ociloff;     
+     OCILobLocator = ocilobd;     
+     OCIBlobLocator = ociblobl;     
+     OCIClobLocator = ociclobl;     
+     OCIBFileLocator = ocibfilel;     
+     OCIParam = ocipard;     
+     OCIResult = ocirstd;     
+     OCISnapshot = ocisnad;     
+     OCIServer = ocisrvh;     
+     OCIStmt = ocistmh;     
+     OCISvcCtx = ocisvch;     
+     OCITrans = ocitxnh;     
+     OCICallbackInBind = ocibicfp;     
+     OCICallbackOutBind = ocibocfp;     
+     OCICallbackDefine = ocidcfp;     
+     OCICallbackLobRead = ocilrfp;     
+     OCICallbackLobWrite = ocilwfp;     
+     OCISecurity = ociossh;     
+     OCIComplexObject = ocicorh;     
+     OCIComplexObjectComp = ocicord;     
+     OCIRowid = ociridd;     
+     OCIAQDeq = ociaqdeq;     
+     OCIAQEnq = ociaqenq;     
+     OCIConnectionPoolCreate = ociconpc;     
+     OCIConnectionPoolDestroy = ociconpd;     
+     OCIEnvCreate = ocienvct;     
+     OCILobAssign = ociloass;     
+     OCILobCharSetForm = ocilocfm;     
+     OCILobCharSetId = ocilocid;     
+     OCILobDisableBuffering = ocilodbf;     
+     OCILobEnableBuffering = ociloebf;     
+     OCILobFileClose = ocilofcl;     
+     OCILobFileCloseAll = ocilofca;     
+     OCILobFileExists = ocilofex;     
+     OCILobFileGetName = ocilofgn;     
+     OCILobFileIsOpen = ocifiopn;     
+     OCILobFileOpen = ocilofop;     
+     OCILobFileSetName = ocilofsn;     
+     OCILobFlushBuffer = ocilofbf;     
+     OCILobIsEqual = ociloieq;     
+     OCILobLoadFromFile = ocilolff;     
+     OCILobLocatorIsInit = ocilolii;     
+     OCILobLocatorAssign = ocilolas;     
+     OCILogon = ocilogon;     
+     OCILogon2 = ocilgon2;     
+     OCILogoff = ocilgoff;     
+{$endif}
+  { ifdef SLSHORTNAME  }
+  {--------------------------------------------------------------------------- 
+                       PUBLIC TYPES AND CONSTANTS 
+    --------------------------------------------------------------------------- }
+  {-----------------------------Handle Types---------------------------------- }
+  { handle types range from 1 - 49  }
+  { start value of handle type  }
+
+  const
+     OCI_HTYPE_FIRST = 1;     
+  { environment handle  }
+     OCI_HTYPE_ENV = 1;     
+  { error handle  }
+     OCI_HTYPE_ERROR = 2;     
+  { service handle  }
+     OCI_HTYPE_SVCCTX = 3;     
+  { statement handle  }
+     OCI_HTYPE_STMT = 4;     
+  { bind handle  }
+     OCI_HTYPE_BIND = 5;     
+  { define handle  }
+     OCI_HTYPE_DEFINE = 6;     
+  { describe handle  }
+     OCI_HTYPE_DESCRIBE = 7;     
+  { server handle  }
+     OCI_HTYPE_SERVER = 8;     
+  { authentication handle  }
+     OCI_HTYPE_SESSION = 9;     
+  { SessionGet auth handle  }
+     OCI_HTYPE_AUTHINFO = OCI_HTYPE_SESSION;     
+  { transaction handle  }
+     OCI_HTYPE_TRANS = 10;     
+  { complex object retrieval handle  }
+     OCI_HTYPE_COMPLEXOBJECT = 11;     
+  { security handle  }
+     OCI_HTYPE_SECURITY = 12;     
+  { subscription handle  }
+     OCI_HTYPE_SUBSCRIPTION = 13;     
+  { direct path context  }
+     OCI_HTYPE_DIRPATH_CTX = 14;     
+  { direct path column array  }
+     OCI_HTYPE_DIRPATH_COLUMN_ARRAY = 15;     
+  { direct path stream  }
+     OCI_HTYPE_DIRPATH_STREAM = 16;     
+  { process handle  }
+     OCI_HTYPE_PROC = 17;     
+  { direct path function context  }
+     OCI_HTYPE_DIRPATH_FN_CTX = 18;     
+  { dp object column array  }
+     OCI_HTYPE_DIRPATH_FN_COL_ARRAY = 19;     
+  { access driver session  }
+     OCI_HTYPE_XADSESSION = 20;     
+  { access driver table  }
+     OCI_HTYPE_XADTABLE = 21;     
+  { access driver field  }
+     OCI_HTYPE_XADFIELD = 22;     
+  { access driver granule  }
+     OCI_HTYPE_XADGRANULE = 23;     
+  { access driver record  }
+     OCI_HTYPE_XADRECORD = 24;     
+  { access driver I/O  }
+     OCI_HTYPE_XADIO = 25;     
+  { connection pool handle  }
+     OCI_HTYPE_CPOOL = 26;     
+  { session pool handle  }
+     OCI_HTYPE_SPOOL = 27;     
+  { admin handle  }
+     OCI_HTYPE_ADMIN = 28;     
+  { HA event handle  }
+     OCI_HTYPE_EVENT = 29;     
+  { last value of a handle type  }
+     OCI_HTYPE_LAST = 29;     
+  {--------------------------------------------------------------------------- }
+  {-------------------------Descriptor Types---------------------------------- }
+  { descriptor values range from 50 - 255  }
+  { start value of descriptor type  }
+     OCI_DTYPE_FIRST = 50;     
+  { lob  locator  }
+     OCI_DTYPE_LOB = 50;     
+  { snapshot descriptor  }
+     OCI_DTYPE_SNAP = 51;     
+  { result set descriptor  }
+     OCI_DTYPE_RSET = 52;     
+  { a parameter descriptor obtained from ocigparm  }
+     OCI_DTYPE_PARAM = 53;     
+  { rowid descriptor  }
+     OCI_DTYPE_ROWID = 54;     
+     OCI_DTYPE_COMPLEXOBJECTCOMP = 55;     
+  { complex object retrieval descriptor  }
+  { File Lob locator  }
+     OCI_DTYPE_FILE = 56;     
+  { enqueue options  }
+     OCI_DTYPE_AQENQ_OPTIONS = 57;     
+  { dequeue options  }
+     OCI_DTYPE_AQDEQ_OPTIONS = 58;     
+  { message properties  }
+     OCI_DTYPE_AQMSG_PROPERTIES = 59;     
+  { aq agent  }
+     OCI_DTYPE_AQAGENT = 60;     
+  { LOB locator  }
+     OCI_DTYPE_LOCATOR = 61;     
+  { Interval year month  }
+     OCI_DTYPE_INTERVAL_YM = 62;     
+  { Interval day second  }
+     OCI_DTYPE_INTERVAL_DS = 63;     
+  { AQ notify descriptor  }
+     OCI_DTYPE_AQNFY_DESCRIPTOR = 64;     
+  { Date  }
+     OCI_DTYPE_DATE = 65;     
+  { Time  }
+     OCI_DTYPE_TIME = 66;     
+  { Time with timezone  }
+     OCI_DTYPE_TIME_TZ = 67;     
+  { Timestamp  }
+     OCI_DTYPE_TIMESTAMP = 68;     
+  { Timestamp with timezone  }
+     OCI_DTYPE_TIMESTAMP_TZ = 69;     
+  { Timestamp with local tz  }
+     OCI_DTYPE_TIMESTAMP_LTZ = 70;     
+  { user callback descriptor  }
+     OCI_DTYPE_UCB = 71;     
+  { server DN list descriptor  }
+     OCI_DTYPE_SRVDN = 72;     
+  { signature  }
+     OCI_DTYPE_SIGNATURE = 73;     
+  { reserved for internal use  }
+     OCI_DTYPE_RESERVED_1 = 74;     
+  { AQ listen options  }
+     OCI_DTYPE_AQLIS_OPTIONS = 75;     
+  { AQ listen msg props  }
+     OCI_DTYPE_AQLIS_MSG_PROPERTIES = 76;     
+  { Top level change notification desc  }
+     OCI_DTYPE_CHDES = 77;     
+  { Table change descriptor            }
+     OCI_DTYPE_TABLE_CHDES = 78;     
+  { Row change descriptor             }
+     OCI_DTYPE_ROW_CHDES = 79;     
+  { last value of a descriptor type  }
+     OCI_DTYPE_LAST = 79;     
+  {--------------------------------------------------------------------------- }
+  {--------------------------------LOB types --------------------------------- }
+  { LOB type - BLOB ------------------  }
+     OCI_TEMP_BLOB = 1;     
+  { LOB type - CLOB ------------------  }
+     OCI_TEMP_CLOB = 2;     
+  {--------------------------------------------------------------------------- }
+  {-------------------------Object Ptr Types---------------------------------- }
+  { object name  }
+     OCI_OTYPE_NAME = 1;     
+  { REF to TDO  }
+     OCI_OTYPE_REF = 2;     
+  { PTR to TDO  }
+     OCI_OTYPE_PTR = 3;     
+  {--------------------------------------------------------------------------- }
+  {=============================Attribute Types=============================== }
+  { 
+     Note: All attributes are global.  New attibutes should be added to the end
+     of the list. Before you add an attribute see if an existing one can be 
+     used for your handle. 
+  
+     If you see any holes please use the holes first. 
+   
+   }
+  {=========================================================================== }
+  { the OCI function code  }
+     OCI_ATTR_FNCODE = 1;     
+  { is the environment initialized in object mode  }
+     OCI_ATTR_OBJECT = 2;     
+  { non blocking mode  }
+     OCI_ATTR_NONBLOCKING_MODE = 3;     
+  { the SQL verb  }
+     OCI_ATTR_SQLCODE = 4;     
+  { the environment handle  }
+     OCI_ATTR_ENV = 5;     
+  { the server handle  }
+     OCI_ATTR_SERVER = 6;     
+  { the user session handle  }
+     OCI_ATTR_SESSION = 7;     
+  { the transaction handle  }
+     OCI_ATTR_TRANS = 8;     
+  { the rows processed so far  }
+     OCI_ATTR_ROW_COUNT = 9;     
+  { the SQL verb of the statement  }
+     OCI_ATTR_SQLFNCODE = 10;     
+  { sets the number of rows to prefetch  }
+     OCI_ATTR_PREFETCH_ROWS = 11;     
+  { the prefetch rows of nested table }
+     OCI_ATTR_NESTED_PREFETCH_ROWS = 12;     
+  { memory limit for rows fetched  }
+     OCI_ATTR_PREFETCH_MEMORY = 13;     
+  { memory limit for nested rows  }
+     OCI_ATTR_NESTED_PREFETCH_MEMORY = 14;     
+     OCI_ATTR_CHAR_COUNT = 15;     
+  { this specifies the bind and define size in characters  }
+  { packed decimal scale  }
+     OCI_ATTR_PDSCL = 16;     
+     OCI_ATTR_FSPRECISION = OCI_ATTR_PDSCL;     
+  { fs prec for datetime data types  }
+  { packed decimal format  }
+     OCI_ATTR_PDPRC = 17;     
+     OCI_ATTR_LFPRECISION = OCI_ATTR_PDPRC;     
+  { fs prec for datetime data types  }
+  { number of column in the select list  }
+     OCI_ATTR_PARAM_COUNT = 18;     
+  { the rowid  }
+     OCI_ATTR_ROWID = 19;     
+  { the character set value  }
+     OCI_ATTR_CHARSET = 20;     
+  { NCHAR type  }
+     OCI_ATTR_NCHAR = 21;     
+  { username attribute  }
+     OCI_ATTR_USERNAME = 22;     
+  { password attribute  }
+     OCI_ATTR_PASSWORD = 23;     
+  { statement type  }
+     OCI_ATTR_STMT_TYPE = 24;     
+  { user friendly global name  }
+     OCI_ATTR_INTERNAL_NAME = 25;     
+  { the internal name for global txn  }
+     OCI_ATTR_EXTERNAL_NAME = 26;     
+  { XOPEN defined global transaction id  }
+     OCI_ATTR_XID = 27;     
+  {  }
+     OCI_ATTR_TRANS_LOCK = 28;     
+  { string to identify a global transaction  }
+     OCI_ATTR_TRANS_NAME = 29;     
+  { memory allocated on the heap  }
+     OCI_ATTR_HEAPALLOC = 30;     
+  { Character Set ID  }
+     OCI_ATTR_CHARSET_ID = 31;     
+  { Character Set Form  }
+     OCI_ATTR_CHARSET_FORM = 32;     
+  { Maximumsize of data on the server   }
+     OCI_ATTR_MAXDATA_SIZE = 33;     
+  { object cache optimal size  }
+     OCI_ATTR_CACHE_OPT_SIZE = 34;     
+  { object cache maximum size percentage  }
+     OCI_ATTR_CACHE_MAX_SIZE = 35;     
+  { object cache default pin option  }
+     OCI_ATTR_PINOPTION = 36;     
+     OCI_ATTR_ALLOC_DURATION = 37;     
+  { object cache default allocation duration  }
+  { object cache default pin duration  }
+     OCI_ATTR_PIN_DURATION = 38;     
+  { Format Descriptor object attribute  }
+     OCI_ATTR_FDO = 39;     
+     OCI_ATTR_POSTPROCESSING_CALLBACK = 40;     
+  { Callback to process outbind data  }
+     OCI_ATTR_POSTPROCESSING_CONTEXT = 41;     
+  { Callback context to process outbind data  }
+     OCI_ATTR_ROWS_RETURNED = 42;     
+  { Number of rows returned in current iter - for Bind handles  }
+  { Failover Callback attribute  }
+     OCI_ATTR_FOCBK = 43;     
+  { is the server/service context in V8 mode  }
+     OCI_ATTR_IN_V8_MODE = 44;     
+  { empty lob ?  }
+     OCI_ATTR_LOBEMPTY = 45;     
+  { session language handle  }
+     OCI_ATTR_SESSLANG = 46;     
+  { visibility  }
+     OCI_ATTR_VISIBILITY = 47;     
+  { relative message id  }
+     OCI_ATTR_RELATIVE_MSGID = 48;     
+  { sequence deviation  }
+     OCI_ATTR_SEQUENCE_DEVIATION = 49;     
+  { consumer name  }
+     OCI_ATTR_CONSUMER_NAME = 50;     
+  { dequeue mode  }
+     OCI_ATTR_DEQ_MODE = 51;     
+  { navigation  }
+     OCI_ATTR_NAVIGATION = 52;     
+  { wait  }
+     OCI_ATTR_WAIT = 53;     
+  { dequeue message id  }
+     OCI_ATTR_DEQ_MSGID = 54;     
+  { priority  }
+     OCI_ATTR_PRIORITY = 55;     
+  { delay  }
+     OCI_ATTR_DELAY = 56;     
+  { expiration  }
+     OCI_ATTR_EXPIRATION = 57;     
+  { correlation id  }
+     OCI_ATTR_CORRELATION = 58;     
+  { # of attempts  }
+     OCI_ATTR_ATTEMPTS = 59;     
+  { recipient list  }
+     OCI_ATTR_RECIPIENT_LIST = 60;     
+  { exception queue name  }
+     OCI_ATTR_EXCEPTION_QUEUE = 61;     
+  { enqueue time (only OCIAttrGet)  }
+     OCI_ATTR_ENQ_TIME = 62;     
+  { message state (only OCIAttrGet)  }
+     OCI_ATTR_MSG_STATE = 63;     
+  { NOTE: 64-66 used below  }
+  { agent name  }
+     OCI_ATTR_AGENT_NAME = 64;     
+  { agent address  }
+     OCI_ATTR_AGENT_ADDRESS = 65;     
+  { agent protocol  }
+     OCI_ATTR_AGENT_PROTOCOL = 66;     
+  { user property  }
+     OCI_ATTR_USER_PROPERTY = 67;     
+  { sender id  }
+     OCI_ATTR_SENDER_ID = 68;     
+  { original message id  }
+     OCI_ATTR_ORIGINAL_MSGID = 69;     
+  { queue name  }
+     OCI_ATTR_QUEUE_NAME = 70;     
+  { message id  }
+     OCI_ATTR_NFY_MSGID = 71;     
+  { message properties  }
+     OCI_ATTR_MSG_PROP = 72;     
+  { num of errs in array DML  }
+     OCI_ATTR_NUM_DML_ERRORS = 73;     
+  { row offset in the array  }
+     OCI_ATTR_DML_ROW_OFFSET = 74;     
+  { AQ array error handling uses DML method of accessing errors  }
+     OCI_ATTR_AQ_NUM_ERRORS = OCI_ATTR_NUM_DML_ERRORS;     
+     OCI_ATTR_AQ_ERROR_INDEX = OCI_ATTR_DML_ROW_OFFSET;     
+  { default date format string  }
+     OCI_ATTR_DATEFORMAT = 75;     
+  { buffer address  }
+     OCI_ATTR_BUF_ADDR = 76;     
+  { buffer size  }
+     OCI_ATTR_BUF_SIZE = 77;     
+  { For values 78 - 80, see DirPathAPI attribute section in this file  }
+  { number of rows in column array  }
+     OCI_ATTR_NUM_ROWS = 81;     
+  { NOTE that OCI_ATTR_NUM_COLS is a column
+                                     * array attribute too.
+                                      }
+  { columns of column array
+                                                       processed so far.        }
+     OCI_ATTR_COL_COUNT = 82;     
+  { str off of last row processed  }
+     OCI_ATTR_STREAM_OFFSET = 83;     
+  { Shared Heap Allocation Size  }
+     OCI_ATTR_SHARED_HEAPALLOC = 84;     
+  { server group name  }
+     OCI_ATTR_SERVER_GROUP = 85;     
+  { migratable session attribute  }
+     OCI_ATTR_MIGSESSION = 86;     
+  { Temporary LOBs  }
+     OCI_ATTR_NOCACHE = 87;     
+  { Pool Size  }
+     OCI_ATTR_MEMPOOL_SIZE = 88;     
+  { Instance name  }
+     OCI_ATTR_MEMPOOL_INSTNAME = 89;     
+  { Application name  }
+     OCI_ATTR_MEMPOOL_APPNAME = 90;     
+  { Home Directory name  }
+     OCI_ATTR_MEMPOOL_HOMENAME = 91;     
+  { Pool Model (proc,thrd,both) }
+     OCI_ATTR_MEMPOOL_MODEL = 92;     
+  { Modes  }
+     OCI_ATTR_MODES = 93;     
+  { name of subscription  }
+     OCI_ATTR_SUBSCR_NAME = 94;     
+  { associated callback  }
+     OCI_ATTR_SUBSCR_CALLBACK = 95;     
+  { associated callback context  }
+     OCI_ATTR_SUBSCR_CTX = 96;     
+  { associated payload  }
+     OCI_ATTR_SUBSCR_PAYLOAD = 97;     
+  { associated namespace  }
+     OCI_ATTR_SUBSCR_NAMESPACE = 98;     
+  { Proxy user credentials  }
+     OCI_ATTR_PROXY_CREDENTIALS = 99;     
+  { Initial client role list  }
+     OCI_ATTR_INITIAL_CLIENT_ROLES = 100;     
+  { unknown attribute  }
+     OCI_ATTR_UNK = 101;     
+  { number of columns  }
+     OCI_ATTR_NUM_COLS = 102;     
+  { parameter of the column list  }
+     OCI_ATTR_LIST_COLUMNS = 103;     
+  { DBA of the segment header  }
+     OCI_ATTR_RDBA = 104;     
+  { whether the table is clustered  }
+     OCI_ATTR_CLUSTERED = 105;     
+  { whether the table is partitioned  }
+     OCI_ATTR_PARTITIONED = 106;     
+  { whether the table is index only  }
+     OCI_ATTR_INDEX_ONLY = 107;     
+  { parameter of the argument list  }
+     OCI_ATTR_LIST_ARGUMENTS = 108;     
+  { parameter of the subprogram list  }
+     OCI_ATTR_LIST_SUBPROGRAMS = 109;     
+  { REF to the type descriptor  }
+     OCI_ATTR_REF_TDO = 110;     
+  { the database link name  }
+     OCI_ATTR_LINK = 111;     
+  { minimum value  }
+     OCI_ATTR_MIN = 112;     
+  { maximum value  }
+     OCI_ATTR_MAX = 113;     
+  { increment value  }
+     OCI_ATTR_INCR = 114;     
+  { number of sequence numbers cached  }
+     OCI_ATTR_CACHE = 115;     
+  { whether the sequence is ordered  }
+     OCI_ATTR_ORDER = 116;     
+  { high-water mark  }
+     OCI_ATTR_HW_MARK = 117;     
+  { type's schema name  }
+     OCI_ATTR_TYPE_SCHEMA = 118;     
+  { timestamp of the object  }
+     OCI_ATTR_TIMESTAMP = 119;     
+  { number of sttributes  }
+     OCI_ATTR_NUM_ATTRS = 120;     
+  { number of parameters  }
+     OCI_ATTR_NUM_PARAMS = 121;     
+  { object id for a table or view  }
+     OCI_ATTR_OBJID = 122;     
+  { type of info described by  }
+     OCI_ATTR_PTYPE = 123;     
+  { parameter descriptor  }
+     OCI_ATTR_PARAM = 124;     
+  { overload ID for funcs and procs  }
+     OCI_ATTR_OVERLOAD_ID = 125;     
+  { table name space  }
+     OCI_ATTR_TABLESPACE = 126;     
+  { TDO of a type  }
+     OCI_ATTR_TDO = 127;     
+  { list type  }
+     OCI_ATTR_LTYPE = 128;     
+  { Parse Error offset  }
+     OCI_ATTR_PARSE_ERROR_OFFSET = 129;     
+  { whether table is temporary  }
+     OCI_ATTR_IS_TEMPORARY = 130;     
+  { whether table is typed  }
+     OCI_ATTR_IS_TYPED = 131;     
+  { duration of temporary table  }
+     OCI_ATTR_DURATION = 132;     
+  { is invoker rights  }
+     OCI_ATTR_IS_INVOKER_RIGHTS = 133;     
+  { top level schema obj name  }
+     OCI_ATTR_OBJ_NAME = 134;     
+  { schema name  }
+     OCI_ATTR_OBJ_SCHEMA = 135;     
+  { top level schema object id  }
+     OCI_ATTR_OBJ_ID = 136;     
+  { For values 137 - 141, see DirPathAPI attribute section in this file  }
+  { transaction timeout  }
+     OCI_ATTR_TRANS_TIMEOUT = 142;     
+  { state of the server handle  }
+     OCI_ATTR_SERVER_STATUS = 143;     
+  { statement txt in stmt hdl  }
+     OCI_ATTR_STATEMENT = 144;     
+  { For value 145, see DirPathAPI attribute section in this file  }
+  { dequeue condition  }
+     OCI_ATTR_DEQCOND = 146;     
+  { reserved  }
+     OCI_ATTR_RESERVED_2 = 147;     
+  { recepient of subscription  }
+     OCI_ATTR_SUBSCR_RECPT = 148;     
+  { protocol for recepient  }
+     OCI_ATTR_SUBSCR_RECPTPROTO = 149;     
+  { For values 150 - 151, see DirPathAPI attribute section in this file  }
+  { LDAP host to connect to  }
+     OCI_ATTR_LDAP_HOST = 153;     
+  { LDAP port to connect to  }
+     OCI_ATTR_LDAP_PORT = 154;     
+  { bind DN  }
+     OCI_ATTR_BIND_DN = 155;     
+  { credentials to connect to LDAP  }
+     OCI_ATTR_LDAP_CRED = 156;     
+  { client wallet location  }
+     OCI_ATTR_WALL_LOC = 157;     
+  { LDAP authentication method  }
+     OCI_ATTR_LDAP_AUTH = 158;     
+  { LDAP adminstration context DN  }
+     OCI_ATTR_LDAP_CTX = 159;     
+  { list of registration server DNs  }
+     OCI_ATTR_SERVER_DNS = 160;     
+  { the number of server DNs  }
+     OCI_ATTR_DN_COUNT = 161;     
+  { server DN attribute  }
+     OCI_ATTR_SERVER_DN = 162;     
+  { max char size of data  }
+     OCI_ATTR_MAXCHAR_SIZE = 163;     
+  { for scrollable result sets }
+     OCI_ATTR_CURRENT_POSITION = 164;     
+  { Added to get attributes for ref cursor to statement handle  }
+  { reserved  }
+     OCI_ATTR_RESERVED_3 = 165;     
+  { reserved  }
+     OCI_ATTR_RESERVED_4 = 166;     
+  { For value 167, see DirPathAPI attribute section in this file  }
+  { digest algorithm  }
+     OCI_ATTR_DIGEST_ALGO = 168;     
+  { certificate  }
+     OCI_ATTR_CERTIFICATE = 169;     
+  { signature algorithm  }
+     OCI_ATTR_SIGNATURE_ALGO = 170;     
+  { canonicalization algo.  }
+     OCI_ATTR_CANONICAL_ALGO = 171;     
+  { private key  }
+     OCI_ATTR_PRIVATE_KEY = 172;     
+  { digest value  }
+     OCI_ATTR_DIGEST_VALUE = 173;     
+  { signature value  }
+     OCI_ATTR_SIGNATURE_VAL = 174;     
+  { signature  }
+     OCI_ATTR_SIGNATURE = 175;     
+  { attributes for setting OCI stmt caching specifics in svchp  }
+  { size of the stm cache  }
+     OCI_ATTR_STMTCACHESIZE = 176;     
+  { --------------------------- Connection Pool Attributes ------------------  }
+     OCI_ATTR_CONN_NOWAIT = 178;     
+     OCI_ATTR_CONN_BUSY_COUNT = 179;     
+     OCI_ATTR_CONN_OPEN_COUNT = 180;     
+     OCI_ATTR_CONN_TIMEOUT = 181;     
+     OCI_ATTR_STMT_STATE = 182;     
+     OCI_ATTR_CONN_MIN = 183;     
+     OCI_ATTR_CONN_MAX = 184;     
+     OCI_ATTR_CONN_INCR = 185;     
+  { For value 187, see DirPathAPI attribute section in this file  }
+  { open stmts in session  }
+     OCI_ATTR_NUM_OPEN_STMTS = 188;     
+  { get native info via desc  }
+     OCI_ATTR_DESCRIBE_NATIVE = 189;     
+  { number of bind postions  }
+     OCI_ATTR_BIND_COUNT = 190;     
+  { pos of bind/define handle  }
+     OCI_ATTR_HANDLE_POSITION = 191;     
+  { reserverd  }
+     OCI_ATTR_RESERVED_5 = 192;     
+  { call in progress on server }
+     OCI_ATTR_SERVER_BUSY = 193;     
+  { For value 194, see DirPathAPI attribute section in this file  }
+  { notification presentation for recipient  }
+     OCI_ATTR_SUBSCR_RECPTPRES = 195;     
+  { AQ message transformation  }
+     OCI_ATTR_TRANSFORMATION = 196;     
+  { rows fetched in last call  }
+     OCI_ATTR_ROWS_FETCHED = 197;     
+  { --------------------------- Snapshot attributes -------------------------  }
+  { snapshot base  }
+     OCI_ATTR_SCN_BASE = 198;     
+  { snapshot wrap  }
+     OCI_ATTR_SCN_WRAP = 199;     
+  { --------------------------- Miscellanous attributes ---------------------  }
+  { reserved  }
+     OCI_ATTR_RESERVED_6 = 200;     
+  { txn is readonly  }
+     OCI_ATTR_READONLY_TXN = 201;     
+  { reserved  }
+     OCI_ATTR_RESERVED_7 = 202;     
+  { position of erroneous col  }
+     OCI_ATTR_ERRONEOUS_COLUMN = 203;     
+  { reserved  }
+     OCI_ATTR_RESERVED_8 = 204;     
+  { For value 206, see DirPathAPI attribute section in this file  }
+  { oracle instance type  }
+     OCI_ATTR_INST_TYPE = 207;     
+  {*****USED attribute 208 for  OCI_ATTR_SPOOL_STMTCACHESIZE****************** }
+  { is env in utf16 mode?  }
+     OCI_ATTR_ENV_UTF16 = 209;     
+  { reserved for TMZ  }
+     OCI_ATTR_RESERVED_9 = 210;     
+  { reserved  }
+     OCI_ATTR_RESERVED_10 = 211;     
+  { For values 212 and 213, see DirPathAPI attribute section in this file  }
+  { reserved  }
+     OCI_ATTR_RESERVED_12 = 214;     
+  { reserved  }
+     OCI_ATTR_RESERVED_13 = 215;     
+  { whether table is external  }
+     OCI_ATTR_IS_EXTERNAL = 216;     
+  { -------------------------- Statement Handle Attributes ------------------  }
+  { reserved  }
+     OCI_ATTR_RESERVED_15 = 217;     
+  { stmt has returning clause  }
+     OCI_ATTR_STMT_IS_RETURNING = 218;     
+  { reserved  }
+     OCI_ATTR_RESERVED_16 = 219;     
+  { reserved  }
+     OCI_ATTR_RESERVED_17 = 220;     
+  { reserved  }
+     OCI_ATTR_RESERVED_18 = 221;     
+  { --------------------------- session attributes --------------------------- }
+  { reserved  }
+     OCI_ATTR_RESERVED_19 = 222;     
+  { reserved  }
+     OCI_ATTR_RESERVED_20 = 223;     
+  { Current Schema  }
+     OCI_ATTR_CURRENT_SCHEMA = 224;     
+  { reserved  }
+     OCI_ATTR_RESERVED_21 = 415;     
+  { ------------------------- notification subscription ---------------------- }
+  { QOS flags  }
+     OCI_ATTR_SUBSCR_QOSFLAGS = 225;     
+  { Payload callback  }
+     OCI_ATTR_SUBSCR_PAYLOADCBK = 226;     
+  { Timeout  }
+     OCI_ATTR_SUBSCR_TIMEOUT = 227;     
+  { Namespace context  }
+     OCI_ATTR_SUBSCR_NAMESPACE_CTX = 228;     
+  { ----------------------- row callback attributes -------------------------  }
+  { bind row callback  }
+     OCI_ATTR_BIND_ROWCBK = 301;     
+  { ctx for bind row callback  }
+     OCI_ATTR_BIND_ROWCTX = 302;     
+  { skip buffer in array ops  }
+     OCI_ATTR_SKIP_BUFFER = 303;     
+  { ------------- DB Change Notification reg handle attributes --------------- }
+  { out: array of table names      }
+     OCI_ATTR_CHNF_TABLENAMES = 401;     
+  { in: rowids needed  }     OCI_ATTR_CHNF_ROWIDS = 402;     
+  { in: notification operation filter }     OCI_ATTR_CHNF_OPERATIONS = 403;     
+  { txn lag between notifications   }
+     OCI_ATTR_CHNF_CHANGELAG = 404;     
+  { DB Change: Notification Descriptor attributes ----------------------- }
+  { source database     }
+     OCI_ATTR_CHDES_DBNAME = 405;     
+  { notification type flags  }
+     OCI_ATTR_CHDES_NFYTYPE = 406;     
+  { XID  of the transaction  }
+     OCI_ATTR_CHDES_XID = 407;     
+  { array of table chg descriptors  }
+     OCI_ATTR_CHDES_TABLE_CHANGES = 408;     
+  { table name  }
+     OCI_ATTR_CHDES_TABLE_NAME = 409;     
+  { table operation flags  }
+     OCI_ATTR_CHDES_TABLE_OPFLAGS = 410;     
+  { array of changed rows    }
+     OCI_ATTR_CHDES_TABLE_ROW_CHANGES = 411;     
+  { rowid of changed row     }
+     OCI_ATTR_CHDES_ROW_ROWID = 412;     
+  { row operation flags      }
+     OCI_ATTR_CHDES_ROW_OPFLAGS = 413;     
+  { Statement handle attribute for db change notification  }
+  { IN: subscription handle   }
+     OCI_ATTR_CHNF_REGHANDLE = 414;     
+  { client name for single session proxy  }
+     OCI_ATTR_PROXY_CLIENT = 416;     
+  { 415 is already taken - see OCI_ATTR_RESERVED_21  }
+  { TDE attributes on the Table  }
+  { does table have any encrypt columns  }
+     OCI_ATTR_TABLE_ENC = 417;     
+  { Table encryption Algorithm  }
+     OCI_ATTR_TABLE_ENC_ALG = 418;     
+  { Internal Id of encryption Algorithm }
+     OCI_ATTR_TABLE_ENC_ALG_ID = 419;     
+  { Please use from 143  }
+  { DB Change: Event types --------------- }
+  { None  }
+     OCI_EVENT_NONE = $0;     
+  { Startup database  }
+     OCI_EVENT_STARTUP = $1;     
+  { Shutdown database  }
+     OCI_EVENT_SHUTDOWN = $2;     
+  { Startup instance  }
+     OCI_EVENT_SHUTDOWN_ANY = $3;     
+  { Drop database     }
+     OCI_EVENT_DROP_DB = $4;     
+  { Subscription deregistered  }
+     OCI_EVENT_DEREG = $5;     
+  { Object change notification  }
+     OCI_EVENT_OBJCHANGE = $6;     
+  { DB Change: Operation types ----------- }
+  { all rows invalidated   }
+     OCI_OPCODE_ALLROWS = $1;     
+  { interested in all operations  }
+     OCI_OPCODE_ALLOPS = $0;     
+  {  INSERT  }
+     OCI_OPCODE_INSERT = $2;     
+  {  UPDATE  }
+     OCI_OPCODE_UPDATE = $4;     
+  { DELETE  }
+     OCI_OPCODE_DELETE = $8;     
+  { ALTER  }
+     OCI_OPCODE_ALTER = $10;     
+  { DROP TABLE  }
+     OCI_OPCODE_DROP = $20;     
+  { GENERIC/ UNKNOWN }
+     OCI_OPCODE_UNKNOWN = $40;     
+  { -------- client side character and national character set ids -----------  }
+  { charset id in env  }
+     OCI_ATTR_ENV_CHARSET_ID = OCI_ATTR_CHARSET_ID;     
+  { ncharset id in env  }
+     OCI_ATTR_ENV_NCHARSET_ID = OCI_ATTR_NCHARSET_ID;
+  { ----------------------- ha event callback attributes --------------------  }
+  { ha callback  }
+     OCI_ATTR_EVTCBK = 304;     
+  { ctx for ha callback  }
+     OCI_ATTR_EVTCTX = 305;     
+  { ------------------ User memory attributes (all handles) -----------------  }
+  { pointer to user memory  }
+     OCI_ATTR_USER_MEMORY = 306;     
+  { ----------------- port no attribute in subscription handle  -------------  }
+  { port no to listen         }
+     OCI_ATTR_SUBSCR_PORTNO = 390;     
+  {------------- Supported Values for protocol for recepient ----------------- }
+  { oci  }
+     OCI_SUBSCR_PROTO_OCI = 0;     
+  { mail  }
+     OCI_SUBSCR_PROTO_MAIL = 1;     
+  { server  }
+     OCI_SUBSCR_PROTO_SERVER = 2;     
+  { http  }
+     OCI_SUBSCR_PROTO_HTTP = 3;     
+  { max current protocols  }
+     OCI_SUBSCR_PROTO_MAX = 4;     
+  {------------- Supported Values for presentation for recepient ------------- }
+  { default  }
+     OCI_SUBSCR_PRES_DEFAULT = 0;     
+  { xml  }
+     OCI_SUBSCR_PRES_XML = 1;     
+  { max current presentations  }
+     OCI_SUBSCR_PRES_MAX = 2;     
+  {------------- Supported QOS values for notification registrations --------- }
+  { reliable  }
+     OCI_SUBSCR_QOS_RELIABLE = $01;     
+  { payload delivery  }
+     OCI_SUBSCR_QOS_PAYLOAD = $02;     
+  { replicate to director  }
+     OCI_SUBSCR_QOS_REPLICATE = $04;     
+  { secure payload delivery  }
+     OCI_SUBSCR_QOS_SECURE = $08;     
+  { purge on first ntfn  }
+     OCI_SUBSCR_QOS_PURGE_ON_NTFN = $10;     
+  { multi instance callback  }
+     OCI_SUBSCR_QOS_MULTICBK = $20;     
+  { ----- Temporary attribute value for UCS2/UTF16 character set ID --------  }  { UCS2 charset ID  }
+     OCI_UCS2ID = 1000;     
+  { UTF16 charset ID  }
+     OCI_UTF16ID = 1000;     
+  {============================== End OCI Attribute Types ==================== }
+  {---------------- Server Handle Attribute Values --------------------------- }
+  { OCI_ATTR_SERVER_STATUS  }
+     OCI_SERVER_NOT_CONNECTED = $0;     
+     OCI_SERVER_NORMAL = $1;     
+  {--------------------------------------------------------------------------- }
+  {------------------------- Supported Namespaces  --------------------------- }
+  { Anonymous Namespace  }
+     OCI_SUBSCR_NAMESPACE_ANONYMOUS = 0;     
+  { Advanced Queues  }
+     OCI_SUBSCR_NAMESPACE_AQ = 1;     
+  { change notification  }
+     OCI_SUBSCR_NAMESPACE_DBCHANGE = 2;     
+  { Max Name Space Number  }
+     OCI_SUBSCR_NAMESPACE_MAX = 3;     
+  {-------------------------Credential Types---------------------------------- }
+  { database username/password  }
+     OCI_CRED_RDBMS = 1;     
+  { externally provided credentials  }
+     OCI_CRED_EXT = 2;     
+  { proxy authentication  }
+     OCI_CRED_PROXY = 3;     
+  { reserved  }
+     OCI_CRED_RESERVED_1 = 4;     
+  { reserved  }
+     OCI_CRED_RESERVED_2 = 5;     
+  {--------------------------------------------------------------------------- }
+  {------------------------Error Return Values-------------------------------- }
+  { maps to SQL_SUCCESS of SAG CLI  }
+     OCI_SUCCESS = 0;     
+  { maps to SQL_SUCCESS_WITH_INFO  }
+     OCI_SUCCESS_WITH_INFO = 1;     
+  { reserved  }     OCI_RESERVED_FOR_INT_USE = 200;     
+  { maps to SQL_NO_DATA  }
+     OCI_NO_DATA = 100;     
+  { maps to SQL_ERROR  }
+     OCI_ERROR = -(1);     
+  { maps to SQL_INVALID_HANDLE  }
+     OCI_INVALID_HANDLE = -(2);     
+  { maps to SQL_NEED_DATA  }
+     OCI_NEED_DATA = 99;     
+  { OCI would block error  }
+     OCI_STILL_EXECUTING = -(3123);     
+  {--------------------------------------------------------------------------- }
+  {--------------------- User Callback Return Values ------------------------- }
+  { Continue with the body of the OCI function  }
+     OCI_CONTINUE = -(24200);     
+  { done with user row callback  }
+     OCI_ROWCBK_DONE = -(24201);     
+  {--------------------------------------------------------------------------- }
+  {------------------DateTime and Interval check Error codes------------------ }
+  { DateTime Error Codes used by OCIDateTimeCheck()  }
+  { Bad day  }
+     OCI_DT_INVALID_DAY = $1;     
+  { Bad DAy Low/high bit (1=low) }
+     OCI_DT_DAY_BELOW_VALID = $2;     
+  {  Bad MOnth  }
+     OCI_DT_INVALID_MONTH = $4;     
+  { Bad MOnth Low/high bit (1=low)  }
+     OCI_DT_MONTH_BELOW_VALID = $8;     
+  { Bad YeaR  }
+     OCI_DT_INVALID_YEAR = $10;     
+  {  Bad YeaR Low/high bit (1=low)  }
+     OCI_DT_YEAR_BELOW_VALID = $20;     
+  {  Bad HouR  }
+     OCI_DT_INVALID_HOUR = $40;     
+  { Bad HouR Low/high bit (1=low)  }
+     OCI_DT_HOUR_BELOW_VALID = $80;     
+  { Bad MiNute  }
+     OCI_DT_INVALID_MINUTE = $100;     
+  {Bad MiNute Low/high bit (1=low)  }
+     OCI_DT_MINUTE_BELOW_VALID = $200;     
+  {  Bad SeCond  }
+     OCI_DT_INVALID_SECOND = $400;     
+  {bad second Low/high bit (1=low) }
+     OCI_DT_SECOND_BELOW_VALID = $800;     
+     OCI_DT_DAY_MISSING_FROM_1582 = $1000;     
+  {  Day is one of those "missing" from 1582  }
+  { Year may not equal zero  }
+     OCI_DT_YEAR_ZERO = $2000;     
+  {  Bad Timezone  }
+     OCI_DT_INVALID_TIMEZONE = $4000;     
+  { Bad date format input  }
+     OCI_DT_INVALID_FORMAT = $8000;     
+  { Interval Error Codes used by OCIInterCheck()  }
+  { Bad day  }
+     OCI_INTER_INVALID_DAY = $1;     
+  { Bad DAy Low/high bit (1=low)  }
+     OCI_INTER_DAY_BELOW_VALID = $2;     
+  { Bad MOnth  }
+     OCI_INTER_INVALID_MONTH = $4;     
+  {Bad MOnth Low/high bit (1=low)  }
+     OCI_INTER_MONTH_BELOW_VALID = $8;     
+  { Bad YeaR  }
+     OCI_INTER_INVALID_YEAR = $10;     
+  {Bad YeaR Low/high bit (1=low)  }
+     OCI_INTER_YEAR_BELOW_VALID = $20;     
+  { Bad HouR  }
+     OCI_INTER_INVALID_HOUR = $40;     
+  {Bad HouR Low/high bit (1=low)  }
+     OCI_INTER_HOUR_BELOW_VALID = $80;     
+  { Bad MiNute  }
+     OCI_INTER_INVALID_MINUTE = $100;     
+     OCI_INTER_MINUTE_BELOW_VALID = $200;     
+  {Bad MiNute Low/high bit(1=low)  }
+  { Bad SeCond  }
+     OCI_INTER_INVALID_SECOND = $400;     
+     OCI_INTER_SECOND_BELOW_VALID = $800;     
+  {bad second Low/high bit(1=low)  }
+  { Bad Fractional second  }
+     OCI_INTER_INVALID_FRACSEC = $1000;     
+     OCI_INTER_FRACSEC_BELOW_VALID = $2000;     
+  { Bad fractional second Low/High  }
+  {------------------------Parsing Syntax Types------------------------------- }
+  { V815 language - for backwards compatibility  }
+     OCI_V7_SYNTAX = 2;     
+  { V815 language - for backwards compatibility  }
+     OCI_V8_SYNTAX = 3;     
+  { Use what so ever is the native lang of server  }
+     OCI_NTV_SYNTAX = 1;     
+  { these values must match the values defined in kpul.h  }
+  {--------------------------------------------------------------------------- }
+  {------------------------(Scrollable Cursor) Fetch Options------------------- 
+   * For non-scrollable cursor, the only valid (and default) orientation is 
+   * OCI_FETCH_NEXT
+    }
+  { refetching current position   }
+     OCI_FETCH_CURRENT = $00000001;     
+  { next row  }
+     OCI_FETCH_NEXT = $00000002;     
+  { first row of the result set  }
+     OCI_FETCH_FIRST = $00000004;     
+  { the last row of the result set  }
+     OCI_FETCH_LAST = $00000008;     
+  { previous row relative to current  }
+     OCI_FETCH_PRIOR = $00000010;     
+  { absolute offset from first  }
+     OCI_FETCH_ABSOLUTE = $00000020;     
+  { offset relative to current  }
+     OCI_FETCH_RELATIVE = $00000040;     
+  { reserved  }
+     OCI_FETCH_RESERVED_1 = $00000080;     
+  { reserved  }
+     OCI_FETCH_RESERVED_2 = $00000100;     
+  { reserved  }
+     OCI_FETCH_RESERVED_3 = $00000200;     
+  { reserved  }
+     OCI_FETCH_RESERVED_4 = $00000400;     
+  { reserved  }
+     OCI_FETCH_RESERVED_5 = $00000800;     
+  {--------------------------------------------------------------------------- }
+  {------------------------Bind and Define Options---------------------------- }
+  { unused  }
+     OCI_SB2_IND_PTR = $00000001;     
+  { data at execute time  }
+     OCI_DATA_AT_EXEC = $00000002;     
+  { fetch dynamically  }
+     OCI_DYNAMIC_FETCH = $00000002;     
+  { piecewise DMLs or fetch  }
+     OCI_PIECEWISE = $00000004;     
+  { reserved  }
+     OCI_DEFINE_RESERVED_1 = $00000008;     
+  { reserved  }
+     OCI_BIND_RESERVED_2 = $00000010;     
+  { reserved  }
+     OCI_DEFINE_RESERVED_2 = $00000020;     
+  { soft bind or define  }
+     OCI_BIND_SOFT = $00000040;     
+  { soft bind or define  }
+     OCI_DEFINE_SOFT = $00000080;     
+  { reserved  }
+     OCI_BIND_RESERVED_3 = $00000100;     
+  {--------------------------------------------------------------------------- }
+  {-----------------------------  Various Modes ------------------------------ }
+     OCI_DEFAULT = $00000000;     
+  { the default value for parameters and attributes  }
+  {-------------OCIInitialize Modes / OCICreateEnvironment Modes ------------- }
+  { appl. in threaded environment  }
+     OCI_THREADED = $00000001;     
+  { application in object environment  }
+     OCI_OBJECT = $00000002;     
+  { application is enabled for events  }
+     OCI_EVENTS = $00000004;     
+  { reserved  }
+     OCI_RESERVED1 = $00000008;     
+  { the application is in shared mode  }
+     OCI_SHARED = $00000010;     
+  { reserved  }
+     OCI_RESERVED2 = $00000020;     
+  { The following *TWO* are only valid for OCICreateEnvironment call  }
+  { No user callback called during ini  }
+     OCI_NO_UCB = $00000040;     
+  { the environment handle will not be  }
+     OCI_NO_MUTEX = $00000080;     
+  {  protected by a mutex internally  }
+  { Used for shared forms  }
+     OCI_SHARED_EXT = $00000100;     
+  {************************* 0x00000200 free ********************************* }
+  { all connections always blocking  }
+     OCI_ALWAYS_BLOCKING = $00000400;     
+  {************************* 0x00000800 free ********************************* }
+  { allow  LDAP connections  }
+     OCI_USE_LDAP = $00001000;     
+  { only register to LDAP  }
+     OCI_REG_LDAPONLY = $00002000;     
+  { mode for all UTF16 metadata  }
+     OCI_UTF16 = $00004000;     
+     OCI_AFC_PAD_ON = $00008000;     
+  { turn on AFC blank padding when rlenp present  }
+  { reserved  }
+     OCI_ENVCR_RESERVED3 = $00010000;     
+  { adopt new length semantics  }
+     OCI_NEW_LENGTH_SEMANTICS = $00020000;     
+  { the new length semantics, always bytes, is used by OCIEnvNlsCreate  }
+  { Do not mutex stmt handle  }
+     OCI_NO_MUTEX_STMT = $00040000;     
+  { Mutex only the environment handle  }
+     OCI_MUTEX_ENV_ONLY = $00080000;     
+  { reserved  }
+     OCI_STM_RESERVED4 = $00100000;     
+  { try and acquire mutex  }
+     OCI_MUTEX_TRY = $00200000;     
+  { nchar literal replace on  }
+     OCI_NCHAR_LITERAL_REPLACE_ON = $00400000;     
+  { nchar literal replace off }
+     OCI_NCHAR_LITERAL_REPLACE_OFF = $00800000;     
+  { reserved  }
+     OCI_SRVATCH_RESERVED5 = $01000000;     
+  {--------------------------------------------------------------------------- }
+  {------------------------OCIConnectionpoolCreate Modes---------------------- }
+     OCI_CPOOL_REINITIALIZE = $111;     
+  {--------------------------------------------------------------------------- }
+  {--------------------------------- OCILogon2 Modes ------------------------- }
+  { Use session pool  }
+     OCI_LOGON2_SPOOL = $0001;     
+  { Use connection pool  }
+     OCI_LOGON2_CPOOL = OCI_CPOOL;     
+  { Use Stmt Caching  }
+     OCI_LOGON2_STMTCACHE = $0004;     
+  { Proxy authentiaction  }
+     OCI_LOGON2_PROXY = $0008;     
+  {--------------------------------------------------------------------------- }
+  {------------------------- OCISessionPoolCreate Modes ---------------------- }
+  { Reinitialize the session pool  }
+     OCI_SPC_REINITIALIZE = $0001;     
+  { Session pool is homogeneneous  }
+     OCI_SPC_HOMOGENEOUS = $0002;     
+  { Session pool has stmt cache  }
+     OCI_SPC_STMTCACHE = $0004;     
+  {--------------------------------------------------------------------------- }
+  {--------------------------- OCISessionGet Modes --------------------------- }
+  { SessionGet called in SPOOL mode  }
+     OCI_SESSGET_SPOOL = $0001;     
+  { SessionGet called in CPOOL mode  }
+     OCI_SESSGET_CPOOL = OCI_CPOOL;     
+  { Use statement cache  }
+     OCI_SESSGET_STMTCACHE = $0004;     
+  { SessionGet called in proxy mode  }
+     OCI_SESSGET_CREDPROXY = $0008;     
+     OCI_SESSGET_CREDEXT = $0010;     
+     OCI_SESSGET_SPOOL_MATCHANY = $0020;     
+  {--------------------------------------------------------------------------- }
+  {------------------------ATTR Values for Session Pool----------------------- }
+  { Attribute values for OCI_ATTR_SPOOL_GETMODE  }
+  { block till you get a session  }
+     OCI_SPOOL_ATTRVAL_WAIT = 0;     
+  { error out if no session avaliable  }
+     OCI_SPOOL_ATTRVAL_NOWAIT = 1;     
+  { get session even if max is exceeded  }
+     OCI_SPOOL_ATTRVAL_FORCEGET = 2;     
+  {--------------------------------------------------------------------------- }
+  {--------------------------- OCISessionRelease Modes ----------------------- }
+  { Drop the Session  }
+     OCI_SESSRLS_DROPSESS = $0001;     
+  { Retag the session  }
+     OCI_SESSRLS_RETAG = $0002;     
+  {--------------------------------------------------------------------------- }
+  {----------------------- OCISessionPoolDestroy Modes ----------------------- }
+  { Force the sessions to terminate. 
+                                               Even if there are some busy 
+                                               sessions close them  }
+     OCI_SPD_FORCE = $0001;     
+  {--------------------------------------------------------------------------- }
+  {----------------------------- Statement States ---------------------------- }
+     OCI_STMT_STATE_INITIALIZED = $0001;     
+     OCI_STMT_STATE_EXECUTED = $0002;     
+     OCI_STMT_STATE_END_OF_FETCH = $0003;     
+  {--------------------------------------------------------------------------- }
+  {----------------------------- OCIMemStats Modes --------------------------- }
+     OCI_MEM_INIT = $01;     
+     OCI_MEM_CLN = $02;     
+     OCI_MEM_FLUSH = $04;     
+     OCI_DUMP_HEAP = $80;     
+     OCI_CLIENT_STATS = $10;     
+     OCI_SERVER_STATS = $20;     
+  {----------------------------- OCIEnvInit Modes ---------------------------- }
+  { NOTE: NO NEW MODES SHOULD BE ADDED HERE BECAUSE THE RECOMMENDED METHOD 
+   * IS TO USE THE NEW OCICreateEnvironment MODES.
+    }
+  { A user callback will not be called in
+                                         OCIEnvInit()  }
+     OCI_ENV_NO_UCB = $01;     
+  { the environment handle will not be protected
+                                   by a mutex internally  }
+     OCI_ENV_NO_MUTEX = $08;     
+  {--------------------------------------------------------------------------- }
+  {------------------------ Prepare Modes ------------------------------------ }
+  { turn off statement handle sharing  }
+     OCI_NO_SHARING = $01;     
+  { reserved  }
+     OCI_PREP_RESERVED_1 = $02;     
+  { turn on blank padding for AFC  }
+     OCI_PREP_AFC_PAD_ON = $04;     
+  { turn off blank padding for AFC  }
+     OCI_PREP_AFC_PAD_OFF = $08;     
+  {--------------------------------------------------------------------------- }
+  {--------------------------------------------------------------------------- }
+  {----------------------- Execution Modes ----------------------------------- }
+  { batch the oci statement for execution  }
+     OCI_BATCH_MODE = $01;     
+  { fetch the exact rows specified  }
+     OCI_EXACT_FETCH = $02;     
+  { #define                    0x04                                 available  }
+  { if result set is scrollable  }
+     OCI_STMT_SCROLLABLE_READONLY = $08;     
+  { only describe the statement  }
+     OCI_DESCRIBE_ONLY = $10;     
+  { commit, if successful execution  }
+     OCI_COMMIT_ON_SUCCESS = $20;     
+  { non-blocking  }
+     OCI_NON_BLOCKING = $40;     
+  { batch errors in array dmls  }
+     OCI_BATCH_ERRORS = $80;     
+  { only parse the statement  }
+     OCI_PARSE_ONLY = $100;     
+  { reserved  }
+     OCI_EXACT_FETCH_RESERVED_1 = $200;     
+     OCI_SHOW_DML_WARNINGS = $400;     
+  { return OCI_SUCCESS_WITH_INFO for delete/update w/no where clause  }
+  { reserved  }
+     OCI_EXEC_RESERVED_2 = $800;     
+  { reserved  }
+     OCI_DESC_RESERVED_1 = $1000;     
+  { reserved  }
+     OCI_EXEC_RESERVED_3 = $2000;     
+  { reserved  }
+     OCI_EXEC_RESERVED_4 = $4000;     
+  { reserved  }
+     OCI_EXEC_RESERVED_5 = $8000;     
+  {--------------------------------------------------------------------------- }
+  {------------------------Authentication Modes------------------------------- }
+  { migratable auth context  }
+     OCI_MIGRATE = $00000001;     
+  { for SYSDBA authorization  }
+     OCI_SYSDBA = $00000002;     
+  { for SYSOPER authorization  }
+     OCI_SYSOPER = $00000004;     
+  { for preliminary authorization  }
+     OCI_PRELIM_AUTH = $00000008;     
+  { Private OCI cache mode  }
+     OCIP_ICACHE = $00000010;     
+  { reserved  }
+     OCI_AUTH_RESERVED_1 = $00000020;     
+  { enable OCI Stmt Caching  }
+     OCI_STMT_CACHE = $00000040;     
+  { stateless at call boundary  }
+     OCI_STATELESS_CALL = $00000080;     
+  { stateless at txn boundary  }
+     OCI_STATELESS_TXN = $00000100;     
+  { stateless at user-specified pts  }
+     OCI_STATELESS_APP = $00000200;     
+  { reserved  }
+     OCI_AUTH_RESERVED_2 = $00000400;     
+  { reserved  }
+     OCI_AUTH_RESERVED_3 = $00000800;     
+  { reserved  }
+     OCI_AUTH_RESERVED_4 = $00001000;     
+  { reserved  }
+     OCI_AUTH_RESERVED_5 = $00002000;     
+  {--------------------------------------------------------------------------- }
+  {------------------------Session End Modes---------------------------------- }
+  { reserved  }
+     OCI_SESSEND_RESERVED_1 = $0001;     
+  { reserved  }
+     OCI_SESSEND_RESERVED_2 = $0002;     
+  {--------------------------------------------------------------------------- }
+  {------------------------Attach Modes--------------------------------------- }
+  { The following attach modes are the same as the UPI modes defined in 
+   * UPIDEF.H.  Do not use these values externally.
+    }
+  { Attach in fast path mode  }
+     OCI_FASTPATH = $0010;     
+  { reserved  }
+     OCI_ATCH_RESERVED_1 = $0020;     
+  { reserved  }
+     OCI_ATCH_RESERVED_2 = $0080;     
+  { reserved  }
+     OCI_ATCH_RESERVED_3 = $0100;     
+  { reserved  }
+     OCI_ATCH_RESERVED_4 = $0400;     
+  { reserved  }
+     OCI_ATCH_RESERVED_5 = $2000;     
+  {---------------------OCIStmtPrepare2 Modes--------------------------------- }
+  { ONly Search  }
+     OCI_PREP2_CACHE_SEARCHONLY = $0010;     
+  { Get PL/SQL warnings   }
+     OCI_PREP2_GET_PLSQL_WARNINGS = $0020;     
+  { reserved  }
+     OCI_PREP2_RESERVED_1 = $0040;     
+  {---------------------OCIStmtRelease Modes---------------------------------- }
+  { Delete from Cache  }
+     OCI_STRLS_CACHE_DELETE = $0010;     
+  {-----------------------------End Various Modes ---------------------------- }
+  {------------------------Piece Information---------------------------------- }
+  { in parameter  }
+     OCI_PARAM_IN = $01;     
+  { out parameter  }
+     OCI_PARAM_OUT = $02;     
+  {--------------------------------------------------------------------------- }
+  {------------------------ Transaction Start Flags -------------------------- }
+  { NOTE: OCI_TRANS_JOIN and OCI_TRANS_NOMIGRATE not supported in 8.0.X        }
+  { starts a new transaction branch  }
+     OCI_TRANS_NEW = $00000001;     
+  { join an existing transaction  }
+     OCI_TRANS_JOIN = $00000002;     
+  { resume this transaction  }
+     OCI_TRANS_RESUME = $00000004;     
+     OCI_TRANS_STARTMASK = $000000ff;     
+  { starts a readonly transaction  }
+     OCI_TRANS_READONLY = $00000100;     
+  { starts a read-write transaction  }
+     OCI_TRANS_READWRITE = $00000200;     
+     OCI_TRANS_SERIALIZABLE = $00000400;     
+  { starts a serializable transaction  }
+     OCI_TRANS_ISOLMASK = $0000ff00;     
+  { a loosely coupled branch  }
+     OCI_TRANS_LOOSE = $00010000;     
+  { a tightly coupled branch  }
+     OCI_TRANS_TIGHT = $00020000;     
+     OCI_TRANS_TYPEMASK = $000f0000;     
+  { non migratable transaction  }
+     OCI_TRANS_NOMIGRATE = $00100000;     
+  { separable transaction (8.1.6+)  }
+     OCI_TRANS_SEPARABLE = $00200000;     
+  { OTS resuming a transaction  }
+     OCI_TRANS_OTSRESUME = $00400000;     
+  {--------------------------------------------------------------------------- }
+  {------------------------ Transaction End Flags ---------------------------- }
+  { use two phase commit  }
+     OCI_TRANS_TWOPHASE = $01000000;     
+  { force cmt-redo for local txns  }
+     OCI_TRANS_WRITEBATCH = $00000001;     
+  { no force cmt-redo  }
+     OCI_TRANS_WRITEIMMED = $00000002;     
+  { no sync cmt-redo  }
+     OCI_TRANS_WRITEWAIT = $00000004;     
+  { sync cmt-redo for local txns  }
+     OCI_TRANS_WRITENOWAIT = $00000008;     
+  {--------------------------------------------------------------------------- }
+  {------------------------- AQ Constants ------------------------------------
+   * NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE
+   * The following constants must match the PL/SQL dbms_aq constants
+   * NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE
+    }
+  { ------------------------- Visibility flags ------------------------------- }
+  { enqueue is an independent transaction  }
+     OCI_ENQ_IMMEDIATE = 1;     
+  { enqueue is part of current transaction  }
+     OCI_ENQ_ON_COMMIT = 2;     
+  { ----------------------- Dequeue mode flags ------------------------------- }
+  { read message without acquiring a lock  }
+     OCI_DEQ_BROWSE = 1;     
+  { read and obtain write lock on message  }
+     OCI_DEQ_LOCKED = 2;     
+  { read the message and delete it  }
+     OCI_DEQ_REMOVE = 3;     
+  { delete message w'o returning payload  }
+     OCI_DEQ_REMOVE_NODATA = 4;     
+  { get signature only  }
+     OCI_DEQ_GETSIG = 5;     
+  { ----------------- Dequeue navigation flags ------------------------------- }
+  { get first message at head of queue  }
+     OCI_DEQ_FIRST_MSG = 1;     
+  { next message that is available  }
+     OCI_DEQ_NEXT_MSG = 3;     
+  { get first message of next txn group  }
+     OCI_DEQ_NEXT_TRANSACTION = 2;     
+  { array dequeue across txn groups  }
+     OCI_DEQ_MULT_TRANSACTION = 5;     
+  { ----------------- Dequeue Option Reserved flags -------------------------  }
+     OCI_DEQ_RESERVED_1 = $000001;     
+  { --------------------- Message states ------------------------------------- }
+  { the message delay has not yet completed  }
+     OCI_MSG_WAITING = 1;     
+  { the message is ready to be processed  }
+     OCI_MSG_READY = 0;     
+  { the message has been processed  }
+     OCI_MSG_PROCESSED = 2;     
+  { message has moved to exception queue  }
+     OCI_MSG_EXPIRED = 3;     
+  { --------------------- Sequence deviation --------------------------------- }
+  { enqueue message before another message  }
+     OCI_ENQ_BEFORE = 2;     
+  { enqueue message before all messages  }
+     OCI_ENQ_TOP = 3;     
+  { ------------------------- Visibility flags ------------------------------- }
+  { dequeue is an independent transaction  }
+     OCI_DEQ_IMMEDIATE = 1;     
+  { dequeue is part of current transaction  }
+     OCI_DEQ_ON_COMMIT = 2;     
+  { ------------------------ Wait -------------------------------------------- }
+  { wait forever if no message available  }
+     OCI_DEQ_WAIT_FOREVER = -(1);     
+  { do not wait if no message is available  }
+     OCI_DEQ_NO_WAIT = 0;     
+  { ------------------------ Delay ------------------------------------------- }
+  { message is available immediately  }
+     OCI_MSG_NO_DELAY = 0;     
+  { ------------------------- Expiration ------------------------------------- }
+  { message will never expire  }
+     OCI_MSG_NO_EXPIRATION = -(1);     
+     OCI_MSG_PERSISTENT_OR_BUFFERED = 3;     
+     OCI_MSG_BUFFERED = 2;     
+     OCI_MSG_PERSISTENT = 1;     
+  { ------------------------- Reserved --------------------------------------- }
+     OCI_AQ_RESERVED_1 = $0002;     
+     OCI_AQ_RESERVED_2 = $0004;     
+     OCI_AQ_RESERVED_3 = $0008;     
+     OCI_AQ_RESERVED_4 = $0010;     
+  { -------------------------- END AQ Constants -----------------------------  }
+  { --------------------END DateTime and Interval Constants ------------------ }
+  {-----------------------Object Types---------------------------------------- }
+  {-----------Object Types **** Not to be Used **** -------------------------- }
+  { Deprecated  }
+     OCI_OTYPE_UNK = 0;     
+     OCI_OTYPE_TABLE = 1;     
+     OCI_OTYPE_VIEW = 2;     
+     OCI_OTYPE_SYN = 3;     
+     OCI_OTYPE_PROC = 4;     
+     OCI_OTYPE_FUNC = 5;     
+     OCI_OTYPE_PKG = 6;     
+     OCI_OTYPE_STMT = 7;     
+  {--------------------------------------------------------------------------- }
+  {=======================Describe Handle Parameter Attributes =============== }
+  { 
+     These attributes are orthogonal to the other set of attributes defined 
+     above.  These attrubutes are to be used only for the describe handle. 
+   }
+  {=========================================================================== }
+  { Attributes common to Columns and Stored Procs  }
+  { maximum size of the data  }
+     OCI_ATTR_DATA_SIZE = 1;     
+  { the SQL type of the column/argument  }
+     OCI_ATTR_DATA_TYPE = 2;     
+  { the display size  }
+     OCI_ATTR_DISP_SIZE = 3;     
+  { the name of the column/argument  }
+     OCI_ATTR_NAME = 4;     
+  { precision if number type  }
+     OCI_ATTR_PRECISION = 5;     
+  { scale if number type  }
+     OCI_ATTR_SCALE = 6;     
+  { is it null ?  }
+     OCI_ATTR_IS_NULL = 7;     
+     OCI_ATTR_TYPE_NAME = 8;     
+  { name of the named data type or a package name for package private types  }
+  { the schema name  }
+     OCI_ATTR_SCHEMA_NAME = 9;     
+  { type name if package private type  }
+     OCI_ATTR_SUB_NAME = 10;     
+     OCI_ATTR_POSITION = 11;     
+  { relative position of col/arg in the list of cols/args  }
+  { complex object retrieval parameter attributes  }
+     OCI_ATTR_COMPLEXOBJECTCOMP_TYPE = 50;     
+     OCI_ATTR_COMPLEXOBJECTCOMP_TYPE_LEVEL = 51;     
+     OCI_ATTR_COMPLEXOBJECT_LEVEL = 52;     
+     OCI_ATTR_COMPLEXOBJECT_COLL_OUTOFLINE = 53;     
+  { Only Columns  }
+  { the display name  }
+     OCI_ATTR_DISP_NAME = 100;     
+  { encrypted data size  }
+     OCI_ATTR_ENCC_SIZE = 101;     
+  { column is encrypted ?  }
+     OCI_ATTR_COL_ENC = 102;     
+  { is encrypted column salted ?  }
+     OCI_ATTR_COL_ENC_SALT = 103;     
+  {Only Stored Procs  }
+  { is this position overloaded  }
+     OCI_ATTR_OVERLOAD = 210;     
+  { level for structured types  }
+     OCI_ATTR_LEVEL = 211;     
+  { has a default value  }
+     OCI_ATTR_HAS_DEFAULT = 212;     
+  { in, out inout  }
+     OCI_ATTR_IOMODE = 213;     
+  { returns a radix  }
+     OCI_ATTR_RADIX = 214;     
+  { total number of arguments  }
+     OCI_ATTR_NUM_ARGS = 215;     
+  { only named type attributes  }
+  { object or collection  }
+     OCI_ATTR_TYPECODE = 216;     
+  { varray or nested table  }
+     OCI_ATTR_COLLECTION_TYPECODE = 217;     
+  { user assigned version  }
+     OCI_ATTR_VERSION = 218;     
+  { is this an incomplete type  }
+     OCI_ATTR_IS_INCOMPLETE_TYPE = 219;     
+  { a system type  }
+     OCI_ATTR_IS_SYSTEM_TYPE = 220;     
+  { a predefined type  }
+     OCI_ATTR_IS_PREDEFINED_TYPE = 221;     
+  { a transient type  }
+     OCI_ATTR_IS_TRANSIENT_TYPE = 222;     
+  { system generated type  }
+     OCI_ATTR_IS_SYSTEM_GENERATED_TYPE = 223;     
+  { contains nested table attr  }
+     OCI_ATTR_HAS_NESTED_TABLE = 224;     
+  { has a lob attribute  }
+     OCI_ATTR_HAS_LOB = 225;     
+  { has a file attribute  }
+     OCI_ATTR_HAS_FILE = 226;     
+  { has a collection attribute  }
+     OCI_ATTR_COLLECTION_ELEMENT = 227;     
+  { number of attribute types  }
+     OCI_ATTR_NUM_TYPE_ATTRS = 228;     
+  { list of type attributes  }
+     OCI_ATTR_LIST_TYPE_ATTRS = 229;     
+  { number of type methods  }
+     OCI_ATTR_NUM_TYPE_METHODS = 230;     
+  { list of type methods  }
+     OCI_ATTR_LIST_TYPE_METHODS = 231;     
+  { map method of type  }
+     OCI_ATTR_MAP_METHOD = 232;     
+  { order method of type  }
+     OCI_ATTR_ORDER_METHOD = 233;     
+  { only collection element  }
+  { number of elements  }
+     OCI_ATTR_NUM_ELEMS = 234;     
+  { only type methods  }
+  { encapsulation level  }
+     OCI_ATTR_ENCAPSULATION = 235;     
+  { method selfish  }
+     OCI_ATTR_IS_SELFISH = 236;     
+  { virtual  }
+     OCI_ATTR_IS_VIRTUAL = 237;     
+  { inline  }
+     OCI_ATTR_IS_INLINE = 238;     
+  { constant  }
+     OCI_ATTR_IS_CONSTANT = 239;     
+  { has result  }
+     OCI_ATTR_HAS_RESULT = 240;     
+  { constructor  }
+     OCI_ATTR_IS_CONSTRUCTOR = 241;     
+  { destructor  }
+     OCI_ATTR_IS_DESTRUCTOR = 242;     
+  { operator  }
+     OCI_ATTR_IS_OPERATOR = 243;     
+  { a map method  }
+     OCI_ATTR_IS_MAP = 244;     
+  { order method  }
+     OCI_ATTR_IS_ORDER = 245;     
+  { read no data state method  }
+     OCI_ATTR_IS_RNDS = 246;     
+  { read no process state  }
+     OCI_ATTR_IS_RNPS = 247;     
+  { write no data state method  }
+     OCI_ATTR_IS_WNDS = 248;     
+  { write no process state  }
+     OCI_ATTR_IS_WNPS = 249;     
+  { public object  }
+     OCI_ATTR_DESC_PUBLIC = 250;     
+  { Object Cache Enhancements : attributes for User Constructed Instances      }
+     OCI_ATTR_CACHE_CLIENT_CONTEXT = 251;     
+     OCI_ATTR_UCI_CONSTRUCT = 252;     
+     OCI_ATTR_UCI_DESTRUCT = 253;     
+     OCI_ATTR_UCI_COPY = 254;     
+     OCI_ATTR_UCI_PICKLE = 255;     
+     OCI_ATTR_UCI_UNPICKLE = 256;     
+     OCI_ATTR_UCI_REFRESH = 257;     
+  { for type inheritance  }
+     OCI_ATTR_IS_SUBTYPE = 258;     
+     OCI_ATTR_SUPERTYPE_SCHEMA_NAME = 259;     
+     OCI_ATTR_SUPERTYPE_NAME = 260;     
+  { for schemas  }
+  { list of objects in schema  }
+     OCI_ATTR_LIST_OBJECTS = 261;     
+  { for database  }
+  { list of schemas  }
+     OCI_ATTR_LIST_SCHEMAS = 263;     
+  { max procedure length  }
+     OCI_ATTR_MAX_PROC_LEN = 264;     
+  { max column name length  }
+     OCI_ATTR_MAX_COLUMN_LEN = 265;     
+  { cursor commit behavior  }
+     OCI_ATTR_CURSOR_COMMIT_BEHAVIOR = 266;     
+  { catalog namelength  }
+     OCI_ATTR_MAX_CATALOG_NAMELEN = 267;     
+  { catalog location  }
+     OCI_ATTR_CATALOG_LOCATION = 268;     
+  { savepoint support  }
+     OCI_ATTR_SAVEPOINT_SUPPORT = 269;     
+  { nowait support  }
+     OCI_ATTR_NOWAIT_SUPPORT = 270;     
+  { autocommit DDL  }
+     OCI_ATTR_AUTOCOMMIT_DDL = 271;     
+  { locking mode  }
+     OCI_ATTR_LOCKING_MODE = 272;     
+  { for externally initialized context  }
+  { count of context to be init }
+     OCI_ATTR_APPCTX_SIZE = 273;     
+  { count of context to be init }
+     OCI_ATTR_APPCTX_LIST = 274;     
+  { name  of context to be init }
+     OCI_ATTR_APPCTX_NAME = 275;     
+  { attr  of context to be init }
+     OCI_ATTR_APPCTX_ATTR = 276;     
+  { value of context to be init }
+     OCI_ATTR_APPCTX_VALUE = 277;     
+  { for client id propagation  }
+  { value of client id to set }
+     OCI_ATTR_CLIENT_IDENTIFIER = 278;     
+  { for inheritance - part 2  }
+  { is final type ?  }
+     OCI_ATTR_IS_FINAL_TYPE = 279;     
+  { is instantiable type ?  }
+     OCI_ATTR_IS_INSTANTIABLE_TYPE = 280;     
+  { is final method ?  }
+     OCI_ATTR_IS_FINAL_METHOD = 281;     
+  { is instantiable method ?  }
+     OCI_ATTR_IS_INSTANTIABLE_METHOD = 282;     
+  { is overriding method ?  }
+     OCI_ATTR_IS_OVERRIDING_METHOD = 283;     
+  { Describe the base object  }
+     OCI_ATTR_DESC_SYNBASE = 284;     
+  { char length semantics  }
+     OCI_ATTR_CHAR_USED = 285;     
+  { char length  }
+     OCI_ATTR_CHAR_SIZE = 286;     
+  { SQLJ support  }
+  { is java implemented type ?  }
+     OCI_ATTR_IS_JAVA_TYPE = 287;     
+  { N-Tier support  }
+  { use DN as user name  }
+     OCI_ATTR_DISTINGUISHED_NAME = 300;     
+  { Kerberos ticket as cred.  }
+     OCI_ATTR_KERBEROS_TICKET = 301;     
+  { for multilanguage debugging  }
+  { ORA_DEBUG_JDWP attribute  }
+     OCI_ATTR_ORA_DEBUG_JDWP = 302;     
+  { reserved  }
+     OCI_ATTR_RESERVED_14 = 303;     
+  {---------------------------End Describe Handle Attributes ----------------- }
+  { For values 303 - 307, see DirPathAPI attribute section in this file  }
+  { ----------------------- Session Pool Attributes -------------------------  }
+  { session timeout  }
+     OCI_ATTR_SPOOL_TIMEOUT = 308;     
+  { session get mode  }
+     OCI_ATTR_SPOOL_GETMODE = 309;     
+  { busy session count  }
+     OCI_ATTR_SPOOL_BUSY_COUNT = 310;     
+  { open session count  }
+     OCI_ATTR_SPOOL_OPEN_COUNT = 311;     
+  { min session count  }
+     OCI_ATTR_SPOOL_MIN = 312;     
+  { max session count  }
+     OCI_ATTR_SPOOL_MAX = 313;     
+  { session increment count  }
+     OCI_ATTR_SPOOL_INCR = 314;     
+  {Stmt cache size of pool   }
+     OCI_ATTR_SPOOL_STMTCACHESIZE = 208;     
+  {------------------------------End Session Pool Attributes ----------------- }
+  {---------------------------- For XML Types -------------------------------  }
+  { For table, view and column  }
+  { Is the type an XML type?  }
+     OCI_ATTR_IS_XMLTYPE = 315;     
+  { Name of XML Schema  }
+     OCI_ATTR_XMLSCHEMA_NAME = 316;     
+  { Name of XML Element  }
+     OCI_ATTR_XMLELEMENT_NAME = 317;     
+  { SQL type's schema for XML Ele  }
+     OCI_ATTR_XMLSQLTYPSCH_NAME = 318;     
+  { Name of SQL type for XML Ele  }
+     OCI_ATTR_XMLSQLTYPE_NAME = 319;     
+  { XML type stored as object?  }
+     OCI_ATTR_XMLTYPE_STORED_OBJ = 320;     
+  {---------------------------- For Subtypes -------------------------------  }
+  { For type  }
+  { Has subtypes?  }
+     OCI_ATTR_HAS_SUBTYPES = 321;     
+  { Number of subtypes  }
+     OCI_ATTR_NUM_SUBTYPES = 322;     
+  { List of subtypes  }
+     OCI_ATTR_LIST_SUBTYPES = 323;     
+  { XML flag  }
+  { hierarchy enabled?  }
+     OCI_ATTR_XML_HRCHY_ENABLED = 324;     
+  { Method flag  }
+  { Method is overridden?  }
+     OCI_ATTR_IS_OVERRIDDEN_METHOD = 325;     
+  { For values 326 - 335, see DirPathAPI attribute section in this file  }
+  {------------- Attributes for 10i Distributed Objects ---------------------- }
+  { obj col/tab substitutable  }
+     OCI_ATTR_OBJ_SUBS = 336;     
+  { For values 337 - 338, see DirPathAPI attribute section in this file  }
+  {---------- Attributes for 10i XADFIELD (NLS language, territory ----------- }
+  { reserved  }
+     OCI_ATTR_XADFIELD_RESERVED_1 = 339;     
+  { reserved  }
+     OCI_ATTR_XADFIELD_RESERVED_2 = 340;     
+  {------------- Kerberos Secure Client Identifier --------------------------- }
+  { Kerberos db service ticket }
+     OCI_ATTR_KERBEROS_CID = 341;     
+  {------------------------ Attributes for Rules objects --------------------- }
+  { rule condition  }
+     OCI_ATTR_CONDITION = 342;     
+  { comment  }
+     OCI_ATTR_COMMENT = 343;     
+  { Anydata value  }
+     OCI_ATTR_VALUE = 344;     
+  { eval context owner  }
+     OCI_ATTR_EVAL_CONTEXT_OWNER = 345;     
+  { eval context name  }
+     OCI_ATTR_EVAL_CONTEXT_NAME = 346;     
+  { eval function name  }
+     OCI_ATTR_EVALUATION_FUNCTION = 347;     
+  { variable type  }
+     OCI_ATTR_VAR_TYPE = 348;     
+  { variable value function  }
+     OCI_ATTR_VAR_VALUE_FUNCTION = 349;     
+  { variable method function  }
+     OCI_ATTR_VAR_METHOD_FUNCTION = 350;     
+  { action context  }
+     OCI_ATTR_ACTION_CONTEXT = 351;     
+  { list of table aliases  }
+     OCI_ATTR_LIST_TABLE_ALIASES = 352;     
+  { list of variable types  }
+     OCI_ATTR_LIST_VARIABLE_TYPES = 353;     
+  { table name  }
+     OCI_ATTR_TABLE_NAME = 356;     
+  { For values 357 - 359, see DirPathAPI attribute section in this file  }
+  { message cscn  }
+     OCI_ATTR_MESSAGE_CSCN = 360;     
+  { message dscn  }
+     OCI_ATTR_MESSAGE_DSCN = 361;     
+  {--------------------- Audit Session ID ------------------------------------ }
+  { Audit session ID  }
+     OCI_ATTR_AUDIT_SESSION_ID = 362;     
+  {--------------------- Kerberos TGT Keys ----------------------------------- }
+  { n-tier Kerberos cred key  }
+     OCI_ATTR_KERBEROS_KEY = 363;     
+  { SCID Kerberos cred key  }
+     OCI_ATTR_KERBEROS_CID_KEY = 364;     
+  { AQ enq txn number  }
+     OCI_ATTR_TRANSACTION_NO = 365;     
+  {----------------------- Attributes for End To End Tracing ----------------- }
+  { module for tracing  }
+     OCI_ATTR_MODULE = 366;     
+  { action for tracing  }
+     OCI_ATTR_ACTION = 367;     
+  { client info  }
+     OCI_ATTR_CLIENT_INFO = 368;     
+  { collect call time  }
+     OCI_ATTR_COLLECT_CALL_TIME = 369;     
+  { extract call time  }
+     OCI_ATTR_CALL_TIME = 370;     
+  { execution-id context  }
+     OCI_ATTR_ECONTEXT_ID = 371;     
+  {execution-id sequence num  }
+     OCI_ATTR_ECONTEXT_SEQ = 372;     
+  {------------------------------ Session attributes ------------------------- }
+  { session state  }
+     OCI_ATTR_SESSION_STATE = 373;     
+  { valid states  }
+     OCI_SESSION_STATELESS = 1;     
+     OCI_SESSION_STATEFUL = 2;     
+  { session state type  }
+     OCI_ATTR_SESSION_STATETYPE = 374;     
+  { valid state types  }
+     OCI_SESSION_STATELESS_DEF = 0;     
+     OCI_SESSION_STATELESS_CAL = 1;     
+     OCI_SESSION_STATELESS_TXN = 2;     
+     OCI_SESSION_STATELESS_APP = 3;     
+  { session state cleared  }
+     OCI_ATTR_SESSION_STATE_CLEARED = 376;     
+  { did session migrate  }
+     OCI_ATTR_SESSION_MIGRATED = 377;     
+  { preserve session state  }
+     OCI_ATTR_SESSION_PRESERVE_STATE = 388;     
+  { -------------------------- Admin Handle Attributes ----------------------  }
+  { client-side param file  }
+     OCI_ATTR_ADMIN_PFILE = 389;     
+  {----------------------- Attributes for End To End Tracing ----------------- }
+  { -------------------------- HA Event Handle Attributes -------------------  }
+  { SYS_CONTEXT hostname  }
+     OCI_ATTR_HOSTNAME = 390;     
+  { SYS_CONTEXT dbname  }
+     OCI_ATTR_DBNAME = 391;     
+  { SYS_CONTEXT instance name  }
+     OCI_ATTR_INSTNAME = 392;     
+  { SYS_CONTEXT service name  }
+     OCI_ATTR_SERVICENAME = 393;     
+  { v$instance instance start time  }
+     OCI_ATTR_INSTSTARTTIME = 394;     
+  { event time  }
+     OCI_ATTR_HA_TIMESTAMP = 395;     
+  { reserved  }
+     OCI_ATTR_RESERVED_22 = 396;     
+  { reserved  }
+     OCI_ATTR_RESERVED_23 = 397;     
+  { reserved  }
+     OCI_ATTR_RESERVED_24 = 398;     
+  { db domain  }
+     OCI_ATTR_DBDOMAIN = 399;     
+  { event type  }
+     OCI_ATTR_EVENTTYPE = 400;     
+  { valid value for OCI_ATTR_EVENTTYPE  }
+     OCI_EVENTTYPE_HA = 0;     
+     OCI_ATTR_HA_SOURCE = 401;     
+  { valid values for OCI_ATTR_HA_SOURCE  }
+     OCI_HA_SOURCE_INSTANCE = 0;     
+     OCI_HA_SOURCE_DATABASE = 1;     
+     OCI_HA_SOURCE_NODE = 2;     
+     OCI_HA_SOURCE_SERVICE = 3;     
+     OCI_HA_SOURCE_SERVICE_MEMBER = 4;     
+     OCI_HA_SOURCE_ASM_INSTANCE = 5;     
+     OCI_HA_SOURCE_SERVICE_PRECONNECT = 6;     
+     OCI_ATTR_HA_STATUS = 402;     
+  { valid values for OCI_ATTR_HA_STATUS  }
+     OCI_HA_STATUS_DOWN = 0;     
+     OCI_HA_STATUS_UP = 1;     
+     OCI_ATTR_HA_SRVFIRST = 403;     
+     OCI_ATTR_HA_SRVNEXT = 404;     
+  { ------------------------- Server Handle Attributes ----------------------- }
+     OCI_ATTR_TAF_ENABLED = 405;     
+  { Extra notification attributes  }
+     OCI_ATTR_NFY_FLAGS = 406;     
+  { msg delivery mode  }
+     OCI_ATTR_MSG_DELIVERY_MODE = 407;     
+  { database charset ID  }
+     OCI_ATTR_DB_CHARSET_ID = 416;     
+  { database ncharset ID  }
+     OCI_ATTR_DB_NCHARSET_ID = 417;     
+  { reserved  }
+     OCI_ATTR_RESERVED_25 = 418;     
+  {--------------------------------------------------------------------------- }
+  { ------------------DirPathAPI attribute Section---------------------------- }
+  { All DirPathAPI attributes are in this section of the file.  Existing       }
+  { attributes prior to this section being created are assigned values < 2000  }
+  { Add new DirPathAPI attributes to this section and their assigned value     }
+  { should be whatever the last entry is + 1.                                  }
+  {------------- Supported Values for Direct Path Stream Version ------------- }
+     OCI_DIRPATH_STREAM_VERSION_1 = 100;     
+     OCI_DIRPATH_STREAM_VERSION_2 = 200;     
+  { default  }
+     OCI_DIRPATH_STREAM_VERSION_3 = 300;     
+  { mode of direct path operation  }
+     OCI_ATTR_DIRPATH_MODE = 78;     
+  { nologging option  }
+     OCI_ATTR_DIRPATH_NOLOG = 79;     
+  { parallel (temp seg) option  }
+     OCI_ATTR_DIRPATH_PARALLEL = 80;     
+  { index that data is sorted on  }
+     OCI_ATTR_DIRPATH_SORTED_INDEX = 137;     
+  { direct path index maint method (see oci8dp.h)  }
+     OCI_ATTR_DIRPATH_INDEX_MAINT_METHOD = 138;     
+  { parallel load: db file, initial and next extent sizes  }
+  { DB file to load into  }
+     OCI_ATTR_DIRPATH_FILE = 139;     
+  { initial extent size  }
+     OCI_ATTR_DIRPATH_STORAGE_INITIAL = 140;     
+  { next extent size  }
+     OCI_ATTR_DIRPATH_STORAGE_NEXT = 141;     
+  { direct path index maint method (see oci8dp.h)  }
+     OCI_ATTR_DIRPATH_SKIPINDEX_METHOD = 145;     
+  { 8.2 dpapi support of ADTs  }
+  { expr type of OCI_ATTR_NAME  }
+     OCI_ATTR_DIRPATH_EXPR_TYPE = 150;     
+  { input in text or stream format  }
+     OCI_ATTR_DIRPATH_INPUT = 151;     
+     OCI_DIRPATH_INPUT_TEXT = $01;     
+     OCI_DIRPATH_INPUT_STREAM = $02;     
+     OCI_DIRPATH_INPUT_UNKNOWN = $04;     
+  { fn ctx ADT attrs or args  }
+     OCI_ATTR_DIRPATH_FN_CTX = 167;     
+  { loading into an OID col  }
+     OCI_ATTR_DIRPATH_OID = 187;     
+  { loading into an SID col  }
+     OCI_ATTR_DIRPATH_SID = 194;     
+  { obj type of subst obj tbl  }
+     OCI_ATTR_DIRPATH_OBJ_CONSTR = 206;     
+  { Attr to allow setting of the stream version PRIOR to calling Prepare  }
+  { version of the stream }
+     OCI_ATTR_DIRPATH_STREAM_VERSION = 212;     
+  { varray index column  }
+     OCIP_ATTR_DIRPATH_VARRAY_INDEX = 213;     
+  {------------- Supported Values for Direct Path Date cache ----------------- }
+  { date cache entries  }
+     OCI_ATTR_DIRPATH_DCACHE_NUM = 303;     
+  { date cache limit  }
+     OCI_ATTR_DIRPATH_DCACHE_SIZE = 304;     
+  { date cache misses  }
+     OCI_ATTR_DIRPATH_DCACHE_MISSES = 305;     
+  { date cache hits  }
+     OCI_ATTR_DIRPATH_DCACHE_HITS = 306;     
+  { on set: disable datecache 
+                                                  * on overflow.
+                                                  * on get: datecache disabled? 
+                                                  * could be due to overflow
+                                                  * or others                   }
+     OCI_ATTR_DIRPATH_DCACHE_DISABLE = 307;     
+  {------------- Attributes for 10i Updates to the DirPath API --------------- }
+  { reserved  }
+     OCI_ATTR_DIRPATH_RESERVED_7 = 326;     
+  { reserved  }
+     OCI_ATTR_DIRPATH_RESERVED_8 = 327;     
+  { stream conversion needed?  }
+     OCI_ATTR_DIRPATH_CONVERT = 328;     
+  { info about bad row  }
+     OCI_ATTR_DIRPATH_BADROW = 329;     
+  { length of bad row info  }
+     OCI_ATTR_DIRPATH_BADROW_LENGTH = 330;     
+  { column fill order  }
+     OCI_ATTR_DIRPATH_WRITE_ORDER = 331;     
+  { granule size for unload  }
+     OCI_ATTR_DIRPATH_GRANULE_SIZE = 332;     
+  { offset to last granule  }
+     OCI_ATTR_DIRPATH_GRANULE_OFFSET = 333;     
+  { reserved  }
+     OCI_ATTR_DIRPATH_RESERVED_1 = 334;     
+  { reserved  }
+     OCI_ATTR_DIRPATH_RESERVED_2 = 335;     
+  {------ Attributes for 10i DirPathAPI conversion (NLS lang, terr, cs) ------ }
+  { reserved  }
+     OCI_ATTR_DIRPATH_RESERVED_3 = 337;     
+  { reserved  }
+     OCI_ATTR_DIRPATH_RESERVED_4 = 338;     
+  { reserved  }
+     OCI_ATTR_DIRPATH_RESERVED_5 = 357;     
+  { reserved  }
+     OCI_ATTR_DIRPATH_RESERVED_6 = 358;     
+  { wait for lock in dpapi  }
+     OCI_ATTR_DIRPATH_LOCK_WAIT = 359;     
+  { reserved  }
+     OCI_ATTR_DIRPATH_RESERVED_9 = 2000;     
+  {------ Attribute for 10iR2 for column encryption for Direct Path API ------ }
+  { vector of functions  }
+     OCI_ATTR_DIRPATH_RESERVED_10 = 2001;     
+  { encryption metadata  }
+     OCI_ATTR_DIRPATH_RESERVED_11 = 2002;     
+  {------ Attribute to determine last column successfully converted ---------- }
+  { current error column  }
+     OCI_ATTR_CURRENT_ERRCOL = 2003;     
+  { Add DirPathAPI attributes above.  Next value to be assigned is 2004        }
+  { ------------------End of DirPathAPI attribute Section -------------------- }
+  {--------------------------------------------------------------------------- }
+  {---------------- Describe Handle Parameter Attribute Values --------------- }
+  { OCI_ATTR_CURSOR_COMMIT_BEHAVIOR  }
+     OCI_CURSOR_OPEN = 0;     
+     OCI_CURSOR_CLOSED = 1;     
+  { OCI_ATTR_CATALOG_LOCATION  }
+     OCI_CL_START = 0;     
+     OCI_CL_END = 1;     
+  { OCI_ATTR_SAVEPOINT_SUPPORT  }
+     OCI_SP_SUPPORTED = 0;     
+     OCI_SP_UNSUPPORTED = 1;     
+  { OCI_ATTR_NOWAIT_SUPPORT  }
+     OCI_NW_SUPPORTED = 0;     
+     OCI_NW_UNSUPPORTED = 1;     
+  { OCI_ATTR_AUTOCOMMIT_DDL  }
+     OCI_AC_DDL = 0;     
+     OCI_NO_AC_DDL = 1;     
+  { OCI_ATTR_LOCKING_MODE  }
+     OCI_LOCK_IMMEDIATE = 0;     
+     OCI_LOCK_DELAYED = 1;     
+  { ------------------- Instance type attribute values ----------------------- }
+     OCI_INSTANCE_TYPE_UNKNOWN = 0;     
+     OCI_INSTANCE_TYPE_RDBMS = 1;     
+     OCI_INSTANCE_TYPE_OSM = 2;     
+  {--------------------------------------------------------------------------- }
+  {---------------------------OCIPasswordChange------------------------------- }
+  { Change the password but do not login  }
+     OCI_AUTH = $08;     
+  {------------------------Other Constants------------------------------------ }
+  { max number of OCI Functions  }
+     OCI_MAX_FNS = 100;     
+     OCI_SQLSTATE_SIZE = 5;     
+  { max size of an error message  }
+     OCI_ERROR_MAXMSG_SIZE = 1024;     
+  { maximum lob data size  }
+     OCI_LOBMAXSIZE = 4294967295; // was MINUB4MAXVAL
+     OCI_ROWID_LEN = 23;     
+  {--------------------------------------------------------------------------- }
+  {------------------------ Fail Over Events --------------------------------- }
+     OCI_FO_END = $00000001;     
+     OCI_FO_ABORT = $00000002;     
+     OCI_FO_REAUTH = $00000004;     
+     OCI_FO_BEGIN = $00000008;     
+     OCI_FO_ERROR = $00000010;     
+  {--------------------------------------------------------------------------- }
+  {------------------------ Fail Over Callback Return Codes ------------------ }
+     OCI_FO_RETRY = 25410;     
+  {--------------------------------------------------------------------------- }
+  {------------------------- Fail Over Types --------------------------------- }
+     OCI_FO_NONE = $00000001;     
+     OCI_FO_SESSION = $00000002;     
+     OCI_FO_SELECT = $00000004;     
+     OCI_FO_TXNAL = $00000008;     
+  {--------------------------------------------------------------------------- }
+  {-----------------------Function Codes-------------------------------------- }
+  { OCIInitialize  }
+     OCI_FNCODE_INITIALIZE = 1;     
+  { OCIHandleAlloc  }
+     OCI_FNCODE_HANDLEALLOC = 2;     
+  { OCIHandleFree  }
+     OCI_FNCODE_HANDLEFREE = 3;     
+  { OCIDescriptorAlloc  }
+     OCI_FNCODE_DESCRIPTORALLOC = 4;     
+  { OCIDescriptorFree  }
+     OCI_FNCODE_DESCRIPTORFREE = 5;     
+  { OCIEnvInit  }
+     OCI_FNCODE_ENVINIT = 6;     
+  { OCIServerAttach  }
+     OCI_FNCODE_SERVERATTACH = 7;     
+  { OCIServerDetach  }
+     OCI_FNCODE_SERVERDETACH = 8;     
+  { unused         9  }  { OCISessionBegin  }
+     OCI_FNCODE_SESSIONBEGIN = 10;     
+  { OCISessionEnd  }
+     OCI_FNCODE_SESSIONEND = 11;     
+  { OCIPasswordChange  }
+     OCI_FNCODE_PASSWORDCHANGE = 12;     
+  { OCIStmtPrepare  }
+     OCI_FNCODE_STMTPREPARE = 13;     
+  { unused       14- 16  }
+  { OCIBindDynamic  }
+     OCI_FNCODE_BINDDYNAMIC = 17;     
+  { OCIBindObject  }
+     OCI_FNCODE_BINDOBJECT = 18;     
+  { 19 unused  }
+  { OCIBindArrayOfStruct  }
+     OCI_FNCODE_BINDARRAYOFSTRUCT = 20;     
+  { OCIStmtExecute  }
+     OCI_FNCODE_STMTEXECUTE = 21;     
+  { unused 22-24  }
+  { OCIDefineObject  }
+     OCI_FNCODE_DEFINEOBJECT = 25;     
+  { OCIDefineDynamic  }
+     OCI_FNCODE_DEFINEDYNAMIC = 26;     
+  { OCIDefineArrayOfStruct  }
+     OCI_FNCODE_DEFINEARRAYOFSTRUCT = 27;     
+  { OCIStmtFetch  }
+     OCI_FNCODE_STMTFETCH = 28;     
+  { OCIStmtGetBindInfo  }
+     OCI_FNCODE_STMTGETBIND = 29;     
+  { 30, 31 unused  }
+  { OCIDescribeAny  }
+     OCI_FNCODE_DESCRIBEANY = 32;     
+  { OCITransStart  }
+     OCI_FNCODE_TRANSSTART = 33;     
+  { OCITransDetach  }
+     OCI_FNCODE_TRANSDETACH = 34;     
+  { OCITransCommit  }
+     OCI_FNCODE_TRANSCOMMIT = 35;     
+  { 36 unused  }
+  { OCIErrorGet  }
+     OCI_FNCODE_ERRORGET = 37;     
+  { OCILobFileOpen  }
+     OCI_FNCODE_LOBOPENFILE = 38;     
+  { OCILobFileClose  }
+     OCI_FNCODE_LOBCLOSEFILE = 39;     
+  { 40 was LOBCREATEFILE, unused  }
+  { 41 was OCILobFileDelete, unused   }
+  { OCILobCopy  }
+     OCI_FNCODE_LOBCOPY = 42;     
+  { OCILobAppend  }
+     OCI_FNCODE_LOBAPPEND = 43;     
+  { OCILobErase  }
+     OCI_FNCODE_LOBERASE = 44;     
+  { OCILobGetLength  }
+     OCI_FNCODE_LOBLENGTH = 45;     
+  { OCILobTrim  }
+     OCI_FNCODE_LOBTRIM = 46;     
+  { OCILobRead  }
+     OCI_FNCODE_LOBREAD = 47;     
+  { OCILobWrite  }
+     OCI_FNCODE_LOBWRITE = 48;     
+  { 49 unused  }
+  { OCIBreak  }
+     OCI_FNCODE_SVCCTXBREAK = 50;     
+  { OCIServerVersion  }
+     OCI_FNCODE_SERVERVERSION = 51;     
+  { OCIKerbAttrSet  }
+     OCI_FNCODE_KERBATTRSET = 52;     
+  { unused 53  }
+  { OCIAttrGet  }
+     OCI_FNCODE_ATTRGET = 54;     
+  { OCIAttrSet  }
+     OCI_FNCODE_ATTRSET = 55;     
+  { OCIParamSet  }
+     OCI_FNCODE_PARAMSET = 56;     
+  { OCIParamGet  }
+     OCI_FNCODE_PARAMGET = 57;     
+  { OCIStmtGetPieceInfo  }
+     OCI_FNCODE_STMTGETPIECEINFO = 58;     
+  { OCILdaToSvcCtx  }
+     OCI_FNCODE_LDATOSVCCTX = 59;     
+  { 60 unused  }
+  { OCIStmtSetPieceInfo  }
+     OCI_FNCODE_STMTSETPIECEINFO = 61;     
+  { OCITransForget  }
+     OCI_FNCODE_TRANSFORGET = 62;     
+  { OCITransPrepare  }
+     OCI_FNCODE_TRANSPREPARE = 63;     
+  { OCITransRollback  }
+     OCI_FNCODE_TRANSROLLBACK = 64;     
+  { OCIDefineByPos  }
+     OCI_FNCODE_DEFINEBYPOS = 65;     
+  { OCIBindByPos  }
+     OCI_FNCODE_BINDBYPOS = 66;     
+  { OCIBindByName  }
+     OCI_FNCODE_BINDBYNAME = 67;     
+  { OCILobAssign  }
+     OCI_FNCODE_LOBASSIGN = 68;     
+  { OCILobIsEqual  }
+     OCI_FNCODE_LOBISEQUAL = 69;     
+  { OCILobLocatorIsInit  }
+     OCI_FNCODE_LOBISINIT = 70;     
+  { OCILobEnableBuffering  }
+     OCI_FNCODE_LOBENABLEBUFFERING = 71;     
+  { OCILobCharSetID  }
+     OCI_FNCODE_LOBCHARSETID = 72;     
+  { OCILobCharSetForm  }
+     OCI_FNCODE_LOBCHARSETFORM = 73;     
+  { OCILobFileSetName  }
+     OCI_FNCODE_LOBFILESETNAME = 74;     
+  { OCILobFileGetName  }
+     OCI_FNCODE_LOBFILEGETNAME = 75;     
+  { OCILogon  }
+     OCI_FNCODE_LOGON = 76;     
+  { OCILogoff  }
+     OCI_FNCODE_LOGOFF = 77;     
+  { OCILobDisableBuffering  }
+     OCI_FNCODE_LOBDISABLEBUFFERING = 78;     
+  { OCILobFlushBuffer  }
+     OCI_FNCODE_LOBFLUSHBUFFER = 79;     
+  { OCILobLoadFromFile  }
+     OCI_FNCODE_LOBLOADFROMFILE = 80;     
+  { OCILobOpen  }
+     OCI_FNCODE_LOBOPEN = 81;     
+  { OCILobClose  }
+     OCI_FNCODE_LOBCLOSE = 82;     
+  { OCILobIsOpen  }
+     OCI_FNCODE_LOBISOPEN = 83;     
+  { OCILobFileIsOpen  }
+     OCI_FNCODE_LOBFILEISOPEN = 84;     
+  { OCILobFileExists  }
+     OCI_FNCODE_LOBFILEEXISTS = 85;     
+  { OCILobFileCloseAll  }
+     OCI_FNCODE_LOBFILECLOSEALL = 86;     
+  { OCILobCreateTemporary  }
+     OCI_FNCODE_LOBCREATETEMP = 87;     
+  { OCILobFreeTemporary  }
+     OCI_FNCODE_LOBFREETEMP = 88;     
+  { OCILobIsTemporary  }
+     OCI_FNCODE_LOBISTEMP = 89;     
+  { OCIAQEnq  }
+     OCI_FNCODE_AQENQ = 90;     
+  { OCIAQDeq  }
+     OCI_FNCODE_AQDEQ = 91;     
+  { OCIReset  }
+     OCI_FNCODE_RESET = 92;     
+  { OCISvcCtxToLda  }
+     OCI_FNCODE_SVCCTXTOLDA = 93;     
+  { OCILobLocatorAssign  }
+     OCI_FNCODE_LOBLOCATORASSIGN = 94;     
+     OCI_FNCODE_UBINDBYNAME = 95;     
+  { OCIAQListen  }
+     OCI_FNCODE_AQLISTEN = 96;     
+  { reserved  }
+     OCI_FNCODE_SVC2HST = 97;     
+  { reserved  }
+     OCI_FNCODE_SVCRH = 98;     
+  { 97 and 98 are reserved for Oracle internal use  }
+  { OCITransMultiPrepare  }
+     OCI_FNCODE_TRANSMULTIPREPARE = 99;     
+  { OCIConnectionPoolCreate  }
+     OCI_FNCODE_CPOOLCREATE = 100;     
+  { OCIConnectionPoolDestroy  }
+     OCI_FNCODE_CPOOLDESTROY = 101;     
+  { OCILogon2  }
+     OCI_FNCODE_LOGON2 = 102;     
+  { OCIRowidToChar  }
+     OCI_FNCODE_ROWIDTOCHAR = 103;     
+  { OCISessionPoolCreate  }
+     OCI_FNCODE_SPOOLCREATE = 104;     
+  { OCISessionPoolDestroy  }
+     OCI_FNCODE_SPOOLDESTROY = 105;     
+  { OCISessionGet  }
+     OCI_FNCODE_SESSIONGET = 106;     
+  { OCISessionRelease  }
+     OCI_FNCODE_SESSIONRELEASE = 107;     
+  { OCIStmtPrepare2  }
+     OCI_FNCODE_STMTPREPARE2 = 108;     
+  { OCIStmtRelease  }
+     OCI_FNCODE_STMTRELEASE = 109;     
+  { OCIAQEnqArray  }
+     OCI_FNCODE_AQENQARRAY = 110;     
+  { OCIAQDeqArray  }
+     OCI_FNCODE_AQDEQARRAY = 111;     
+  { OCILobCopy2  }
+     OCI_FNCODE_LOBCOPY2 = 112;     
+  { OCILobErase2  }
+     OCI_FNCODE_LOBERASE2 = 113;     
+  { OCILobGetLength2  }
+     OCI_FNCODE_LOBLENGTH2 = 114;     
+  { OCILobLoadFromFile2  }
+     OCI_FNCODE_LOBLOADFROMFILE2 = 115;     
+  { OCILobRead2  }
+     OCI_FNCODE_LOBREAD2 = 116;     
+  { OCILobTrim2  }
+     OCI_FNCODE_LOBTRIM2 = 117;     
+  { OCILobWrite2  }
+     OCI_FNCODE_LOBWRITE2 = 118;     
+  { OCILobGetStorageLimit  }
+     OCI_FNCODE_LOBGETSTORAGELIMIT = 119;     
+  { OCIDBStartup  }
+     OCI_FNCODE_DBSTARTUP = 120;     
+  { OCIDBShutdown  }
+     OCI_FNCODE_DBSHUTDOWN = 121;     
+  { OCILobArrayRead  }
+     OCI_FNCODE_LOBARRAYREAD = 122;     
+  { OCILobArrayWrite  }
+     OCI_FNCODE_LOBARRAYWRITE = 123;     
+  { maximum OCI function code  }
+     OCI_FNCODE_MAXFCN = 123;     
+  {--------------------------------------------------------------------------- }
+
+  type
+  {-----------------------Handle Definitions---------------------------------- }
+    POCIEnv = pointer;          // OCI environment handle
+    POCIError = pointer;        // OCI error handle
+    POCISvcCtx = pointer;       // OCI service handle
+    POCIStmt = pointer;         // OCI statement handle
+    POCIBind = pointer;         // OCI bind handle
+    POCIDefine = pointer;       // OCI Define handle
+    POCIDescribe = pointer;     // OCI Describe handle
+    POCIServer = pointer;       // OCI Server handle
+    POCISession = pointer;      // OCI Authentication handle
+    POCIComplexObject = pointer;// OCI COR handle
+    POCITrans = pointer;        // OCI Transaction handle
+    POCISecurity = pointer;     // OCI Security handle
+    POCISubscription = pointer; // subscription handle
+
+    POCICPool = pointer;        // connection pool handle
+    POCISPool = pointer;        // session pool handle
+    POCIAuthInfo = pointer;     // auth handle
+    POCIAdmin = pointer;        // admin handle
+    POCIEvent = pointer;        // HA event handle
+
+
+
+{    OCIEnv = record end;          // OCI environment handle
+    OCIError = record end;        // OCI error handle
+    OCISvcCtx = record end;       // OCI service handle
+    OCIStmt = record end;         // OCI statement handle
+    OCIBind = record end;         // OCI bind handle
+    OCIDefine = record end;       // OCI Define handle
+    OCIDescribe = record end;     // OCI Describe handle
+    OCIServer = record end;       // OCI Server handle
+    OCISession = record end;      // OCI Authentication handle
+    OCIComplexObject = record end;// OCI COR handle
+    OCITrans = record end;        // OCI Transaction handle
+    OCISecurity = record end;     // OCI Security handle
+    OCISubscription = record end; // subscription handle
+
+    OCICPool = record end;        // connection pool handle
+    OCISPool = record end;        // session pool handle
+    OCIAuthInfo = record end;     // auth handle
+    OCIAdmin = record end;        // admin handle
+    OCIEvent = record end;        // HA event handle
+
+    POCIEnv = ^OCIEnv;
+    POCIError = ^OCIError;
+    POCISvcCtx = ^OCISvcCtx;
+    POCIStmt = ^OCIStmt;
+    POCIBind = ^OCIBind;
+    POCIDefine = ^OCIDefine;
+    POCIDescribe = ^OCIDescribe;
+    POCIServer = ^OCIServer;
+    POCISession = ^OCISession;
+    POCIComplexObject = ^OCIComplexObject;
+    POCITrans = ^OCITrans;
+    POCISecurity = ^OCISecurity;
+    POCISubscription = ^OCISubscription;
+    POCICPool = ^OCICPool;
+    POCISPool = ^OCISPool;
+    POCIAuthInfo = ^OCIAuthinfo;
+    POCIAdmin = ^OCIAdmin;
+    POCIEvent = ^OCIEvent;}
+
+  {-----------------------Descriptor Definitions------------------------------ }
+    POCISnapshot = pointer;       // OCI snapshot descriptor
+    POCIResult = pointer;         // OCI Result Set Descriptor
+    POCILobLocator = pointer;     // OCI Lob Locator descriptor
+    POCIParam = pointer;          // OCI PARameter descriptor
+    POCIComplexObjectComp = pointer; // OCI COR descriptor
+    POCIROWID = pointer;          // OCI ROWID descriptor
+    POCIDateTime = pointer;       // OCI DateTime descriptor
+    POCIInterval = pointer;       // OCI Interval descriptor
+    POCIUcb = pointer;            // OCI User Callback descriptor
+    POCIServerDNs = pointer;      // OCI server DN descriptor
+  {-------------------------- AQ Descriptors --------------------------------- }
+    POCIAQEnqOptions = pointer;       // AQ Enqueue Options hdl
+    POCIAQDeqOptions = pointer;       // AQ Dequeue Options hdl
+    POCIAQMsgProperties = pointer;    // AQ Mesg Properties
+    POCIAQAgent = pointer;            // AQ Agent descriptor
+    POCIAQNfyDescriptor = pointer;    // AQ Nfy descriptor
+    POCIAQSignature = pointer;        // AQ Siganture
+    POCIAQListenOpts = pointer;       // AQ listen options
+    POCIAQLisMsgProps = pointer;      // AQ listen msg props
+  {--------------------------------------------------------------------------- }
+  { Lob typedefs for Pro*C  }
+// Only for OCCI, which isn't supported in Pascal
+//     OCILobLocator = OCIClobLocator;
+  { OCI Character LOB Locator  }
+// Only for OCCI, which isn't supported in Pascal
+//     OCILobLocator = OCIBlobLocator;
+  { OCI Binary LOB Locator  }
+// Only for OCCI, which isn't supported in Pascal
+//     OCILobLocator = OCIBFileLocator;
+  { OCI Binary LOB File Locator  }
+  {--------------------------------------------------------------------------- }
+  { Undefined value for tz in interval types }
+
+  const
+     OCI_INTHR_UNK = 24;     
+  { These defined adjustment values  }
+     OCI_ADJUST_UNK = 10;     
+     OCI_ORACLE_DATE = 0;     
+     OCI_ANSI_DATE = 1;     
+  {------------------------ Lob-specific Definitions ------------------------- }
+  {
+   * ociloff - OCI Lob OFFset
+   *
+   * The offset in the lob data.  The offset is specified in terms of bytes for
+   * BLOBs and BFILes.  Character offsets are used for CLOBs, NCLOBs.
+   * The maximum size of internal lob data is 4 gigabytes.  FILE LOB 
+   * size is limited by the operating system.
+    }
+
+  type
+
+     POCILobOffset = ^OCILobOffset;
+     OCILobOffset = ub4;
+  {
+   * ocillen - OCI Lob LENgth (of lob data)
+   *
+   * Specifies the length of lob data in bytes for BLOBs and BFILes and in 
+   * characters for CLOBs, NCLOBs.  The maximum length of internal lob
+   * data is 4 gigabytes.  The length of FILE LOBs is limited only by the
+   * operating system.
+    }
+
+     POCILobLength = ^OCILobLength;
+     OCILobLength = ub4;
+  {
+   * ocilmo - OCI Lob open MOdes
+   *
+   * The mode specifies the planned operations that will be performed on the
+   * FILE lob data.  The FILE lob can be opened in read-only mode only.
+   * 
+   * In the future, we may include read/write, append and truncate modes.  Append
+   * is equivalent to read/write mode except that the FILE is positioned for
+   * writing to the end.  Truncate is equivalent to read/write mode except that
+   * the FILE LOB data is first truncated to a length of 0 before use.
+    }
+  { read-only  }
+  { read_write for internal lobs only  }
+     OCILobMode = (OCI_LOBMODE_READONLY := 1,OCI_LOBMODE_READWRITE := 2
+       );
+
+
+     POCILobMode = ^OCILobMode;
+
+  {--------------------------------------------------------------------------- }
+  {--------------------------- FILE open modes ------------------------------- }
+  { readonly mode open for FILE types  }
+
+  const
+     OCI_FILE_READONLY = 1;     
+  {--------------------------------------------------------------------------- }
+  {--------------------------- LOB open modes -------------------------------- }
+  { readonly mode open for ILOB types  }
+     OCI_LOB_READONLY = 1;     
+  { read write mode open for ILOBs  }
+     OCI_LOB_READWRITE = 2;     
+  {----------------------- LOB Buffering Flush Flags ------------------------- }
+     OCI_LOB_BUFFER_FREE = 1;     
+     OCI_LOB_BUFFER_NOFREE = 2;     
+  {--------------------------------------------------------------------------- }
+  {--------------------------- OCI Statement Types --------------------------- }
+  { select statement  }
+     OCI_STMT_SELECT = 1;     
+  { update statement  }
+     OCI_STMT_UPDATE = 2;     
+  { delete statement  }
+     OCI_STMT_DELETE = 3;     
+  { Insert Statement  }
+     OCI_STMT_INSERT = 4;     
+  { create statement  }
+     OCI_STMT_CREATE = 5;     
+  { drop statement  }
+     OCI_STMT_DROP = 6;     
+  { alter statement  }
+     OCI_STMT_ALTER = 7;     
+  { begin ... (pl/sql statement) }
+     OCI_STMT_BEGIN = 8;     
+  { declare .. (pl/sql statement )  }
+     OCI_STMT_DECLARE = 9;     
+  {--------------------------------------------------------------------------- }
+  {--------------------------- OCI Parameter Types --------------------------- }
+  { unknown    }
+     OCI_PTYPE_UNK = 0;     
+  { table      }
+     OCI_PTYPE_TABLE = 1;     
+  { view       }
+     OCI_PTYPE_VIEW = 2;     
+  { procedure  }
+     OCI_PTYPE_PROC = 3;     
+  { function   }
+     OCI_PTYPE_FUNC = 4;     
+  { package    }
+     OCI_PTYPE_PKG = 5;     
+  { user-defined type  }
+     OCI_PTYPE_TYPE = 6;     
+  { synonym    }
+     OCI_PTYPE_SYN = 7;     
+  { sequence   }
+     OCI_PTYPE_SEQ = 8;     
+  { column     }
+     OCI_PTYPE_COL = 9;     
+  { argument   }
+     OCI_PTYPE_ARG = 10;     
+  { list       }
+     OCI_PTYPE_LIST = 11;     
+  { user-defined type's attribute  }
+     OCI_PTYPE_TYPE_ATTR = 12;     
+  { collection type's element  }
+     OCI_PTYPE_TYPE_COLL = 13;     
+  { user-defined type's method  }
+     OCI_PTYPE_TYPE_METHOD = 14;     
+  { user-defined type method's arg  }
+     OCI_PTYPE_TYPE_ARG = 15;     
+  { user-defined type method's result  }
+     OCI_PTYPE_TYPE_RESULT = 16;     
+  { schema  }
+     OCI_PTYPE_SCHEMA = 17;     
+  { database  }
+     OCI_PTYPE_DATABASE = 18;     
+  { rule  }
+     OCI_PTYPE_RULE = 19;     
+  { rule set  }
+     OCI_PTYPE_RULE_SET = 20;     
+  { evaluation context  }
+     OCI_PTYPE_EVALUATION_CONTEXT = 21;     
+  { table alias  }
+     OCI_PTYPE_TABLE_ALIAS = 22;     
+  { variable type  }
+     OCI_PTYPE_VARIABLE_TYPE = 23;     
+  { name value pair  }
+     OCI_PTYPE_NAME_VALUE = 24;     
+  {--------------------------------------------------------------------------- }
+  {----------------------------- OCI List Types ------------------------------ }
+  { unknown    }
+     OCI_LTYPE_UNK = 0;     
+  { column list  }
+     OCI_LTYPE_COLUMN = 1;     
+  { procedure argument list  }
+     OCI_LTYPE_ARG_PROC = 2;     
+  { function argument list  }
+     OCI_LTYPE_ARG_FUNC = 3;     
+  { subprogram list  }
+     OCI_LTYPE_SUBPRG = 4;     
+  { type attribute  }
+     OCI_LTYPE_TYPE_ATTR = 5;     
+  { type method  }
+     OCI_LTYPE_TYPE_METHOD = 6;     
+  { type method w/o result argument list  }
+     OCI_LTYPE_TYPE_ARG_PROC = 7;     
+  { type method w/result argument list  }
+     OCI_LTYPE_TYPE_ARG_FUNC = 8;     
+  { schema object list  }
+     OCI_LTYPE_SCH_OBJ = 9;     
+  { database schema list  }
+     OCI_LTYPE_DB_SCH = 10;     
+  { subtype list  }
+     OCI_LTYPE_TYPE_SUBTYPE = 11;     
+  { table alias list  }
+     OCI_LTYPE_TABLE_ALIAS = 12;     
+  { variable type list  }
+     OCI_LTYPE_VARIABLE_TYPE = 13;     
+  { name value list  }
+     OCI_LTYPE_NAME_VALUE = 14;     
+  {--------------------------------------------------------------------------- }
+  {-------------------------- Memory Cartridge Services --------------------- }
+     OCI_MEMORY_CLEARED = 1;     
+  {-------------------------- Pickler Cartridge Services --------------------- }
+
+  type
+     POCIPicklerTdsCtx = pointer;
+     POCIPicklerTds = pointer;
+     POCIPicklerImage = pointer;
+     POCIPicklerFdo = pointer;
+     POCIPicklerTdsElement = ^OCIPicklerTdsElement;
+     OCIPicklerTdsElement = ub4;
+
+     POCIAnyData = pointer;
+
+     POCIAnyDataSet = pointer;
+     POCIAnyDataCtx = pointer;
+
+  {--------------------------------------------------------------------------- }
+  {--------------------------- User Callback Constants ----------------------- }
+  { entry callback  }
+
+  const
+     OCI_UCBTYPE_ENTRY = 1;     
+  { exit callback  }
+     OCI_UCBTYPE_EXIT = 2;     
+  { replacement callback  }
+     OCI_UCBTYPE_REPLACE = 3;     
+  {--------------------------------------------------------------------------- }
+  {--------------------- NLS service type and constance ---------------------- }
+  { Native name for Monday  }
+     OCI_NLS_DAYNAME1 = 1;     
+  { Native name for Tuesday  }
+     OCI_NLS_DAYNAME2 = 2;     
+  { Native name for Wednesday  }
+     OCI_NLS_DAYNAME3 = 3;     
+  { Native name for Thursday  }
+     OCI_NLS_DAYNAME4 = 4;     
+  { Native name for Friday  }
+     OCI_NLS_DAYNAME5 = 5;     
+  { Native name for for Saturday  }
+     OCI_NLS_DAYNAME6 = 6;     
+  { Native name for for Sunday  }
+     OCI_NLS_DAYNAME7 = 7;     
+  { Native abbreviated name for Monday  }
+     OCI_NLS_ABDAYNAME1 = 8;     
+  { Native abbreviated name for Tuesday  }
+     OCI_NLS_ABDAYNAME2 = 9;     
+  { Native abbreviated name for Wednesday  }
+     OCI_NLS_ABDAYNAME3 = 10;     
+  { Native abbreviated name for Thursday  }
+     OCI_NLS_ABDAYNAME4 = 11;     
+  { Native abbreviated name for Friday  }
+     OCI_NLS_ABDAYNAME5 = 12;     
+  { Native abbreviated name for for Saturday  }
+     OCI_NLS_ABDAYNAME6 = 13;     
+  { Native abbreviated name for for Sunday  }
+     OCI_NLS_ABDAYNAME7 = 14;     
+  { Native name for January  }
+     OCI_NLS_MONTHNAME1 = 15;     
+  { Native name for February  }
+     OCI_NLS_MONTHNAME2 = 16;     
+  { Native name for March  }
+     OCI_NLS_MONTHNAME3 = 17;     
+  { Native name for April  }
+     OCI_NLS_MONTHNAME4 = 18;     
+  { Native name for May  }
+     OCI_NLS_MONTHNAME5 = 19;     
+  { Native name for June  }
+     OCI_NLS_MONTHNAME6 = 20;     
+  { Native name for July  }
+     OCI_NLS_MONTHNAME7 = 21;     
+  { Native name for August  }
+     OCI_NLS_MONTHNAME8 = 22;     
+  { Native name for September  }
+     OCI_NLS_MONTHNAME9 = 23;     
+  { Native name for October  }
+     OCI_NLS_MONTHNAME10 = 24;     
+  { Native name for November  }
+     OCI_NLS_MONTHNAME11 = 25;     
+  { Native name for December  }
+     OCI_NLS_MONTHNAME12 = 26;     
+  { Native abbreviated name for January  }
+     OCI_NLS_ABMONTHNAME1 = 27;     
+  { Native abbreviated name for February  }
+     OCI_NLS_ABMONTHNAME2 = 28;     
+  { Native abbreviated name for March  }
+     OCI_NLS_ABMONTHNAME3 = 29;     
+  { Native abbreviated name for April  }
+     OCI_NLS_ABMONTHNAME4 = 30;     
+  { Native abbreviated name for May  }
+     OCI_NLS_ABMONTHNAME5 = 31;     
+  { Native abbreviated name for June  }
+     OCI_NLS_ABMONTHNAME6 = 32;     
+  { Native abbreviated name for July  }
+     OCI_NLS_ABMONTHNAME7 = 33;     
+  { Native abbreviated name for August  }
+     OCI_NLS_ABMONTHNAME8 = 34;     
+  { Native abbreviated name for September  }
+     OCI_NLS_ABMONTHNAME9 = 35;     
+  { Native abbreviated name for October  }
+     OCI_NLS_ABMONTHNAME10 = 36;     
+  { Native abbreviated name for November  }
+     OCI_NLS_ABMONTHNAME11 = 37;     
+  { Native abbreviated name for December  }
+     OCI_NLS_ABMONTHNAME12 = 38;     
+  { Native string for affirmative response  }
+     OCI_NLS_YES = 39;     
+  { Native negative response  }
+     OCI_NLS_NO = 40;     
+  { Native equivalent string of AM  }
+     OCI_NLS_AM = 41;     
+  { Native equivalent string of PM  }
+     OCI_NLS_PM = 42;     
+  { Native equivalent string of AD  }
+     OCI_NLS_AD = 43;     
+  { Native equivalent string of BC  }
+     OCI_NLS_BC = 44;     
+  { decimal character  }
+     OCI_NLS_DECIMAL = 45;     
+  { group separator  }
+     OCI_NLS_GROUP = 46;     
+  { Native symbol of debit  }
+     OCI_NLS_DEBIT = 47;     
+  { Native sumbol of credit  }
+     OCI_NLS_CREDIT = 48;     
+  { Oracle date format  }
+     OCI_NLS_DATEFORMAT = 49;     
+  { International currency symbol  }
+     OCI_NLS_INT_CURRENCY = 50;     
+  { Locale currency symbol  }
+     OCI_NLS_LOC_CURRENCY = 51;     
+  { Language name  }
+     OCI_NLS_LANGUAGE = 52;     
+  { Abbreviation for language name  }
+     OCI_NLS_ABLANGUAGE = 53;     
+  { Territory name  }
+     OCI_NLS_TERRITORY = 54;     
+  { Character set name  }
+     OCI_NLS_CHARACTER_SET = 55;     
+  { Linguistic name  }
+     OCI_NLS_LINGUISTIC_NAME = 56;     
+  { Calendar name  }
+     OCI_NLS_CALENDAR = 57;     
+  { Dual currency symbol  }
+     OCI_NLS_DUAL_CURRENCY = 78;     
+  { Language writing direction  }
+     OCI_NLS_WRITINGDIR = 79;     
+  { Territory Abbreviation  }
+     OCI_NLS_ABTERRITORY = 80;     
+  { Oracle default date format  }
+     OCI_NLS_DDATEFORMAT = 81;     
+  { Oracle default time format  }
+     OCI_NLS_DTIMEFORMAT = 82;     
+  { Local string formatted date format  }
+     OCI_NLS_SFDATEFORMAT = 83;     
+  { Local string formatted time format  }
+     OCI_NLS_SFTIMEFORMAT = 84;     
+  { Number grouping fields  }
+     OCI_NLS_NUMGROUPING = 85;     
+  { List separator  }
+     OCI_NLS_LISTSEP = 86;     
+  { Monetary decimal character  }
+     OCI_NLS_MONDECIMAL = 87;     
+  { Monetary group separator  }
+     OCI_NLS_MONGROUP = 88;     
+  { Monetary grouping fields  }
+     OCI_NLS_MONGROUPING = 89;     
+  { International currency separator  }
+     OCI_NLS_INT_CURRENCYSEP = 90;     
+  { Maximum character byte size       }
+     OCI_NLS_CHARSET_MAXBYTESZ = 91;     
+  { Fixed-width charset byte size     }
+     OCI_NLS_CHARSET_FIXEDWIDTH = 92;     
+  { Character set id  }
+     OCI_NLS_CHARSET_ID = 93;     
+  { NCharacter set id  }
+     OCI_NLS_NCHARSET_ID = 94;     
+  { Max buffer size may need for OCINlsGetInfo  }
+     OCI_NLS_MAXBUFSZ = 100;     
+  { for the binary comparison  }
+     OCI_NLS_BINARY = $1;     
+  { for linguistic comparison  }
+     OCI_NLS_LINGUISTIC = $2;     
+  { for case-insensitive comparison  }
+     OCI_NLS_CASE_INSENSITIVE = $10;     
+  { convert to uppercase  }
+     OCI_NLS_UPPERCASE = $20;     
+  { convert to lowercase  }
+     OCI_NLS_LOWERCASE = $40;     
+  { Map charset name from IANA to Oracle  }
+     OCI_NLS_CS_IANA_TO_ORA = 0;     
+  { Map charset name from Oracle to IANA  }
+     OCI_NLS_CS_ORA_TO_IANA = 1;     
+  { Map language name from ISO to Oracle  }
+     OCI_NLS_LANG_ISO_TO_ORA = 2;     
+  { Map language name from Oracle to ISO  }
+     OCI_NLS_LANG_ORA_TO_ISO = 3;     
+  { Map territory name from ISO to Oracle }
+     OCI_NLS_TERR_ISO_TO_ORA = 4;     
+  { Map territory name from Oracle to ISO }
+     OCI_NLS_TERR_ORA_TO_ISO = 5;     
+  { Map territory name from 3-letter ISO  }
+     OCI_NLS_TERR_ISO3_TO_ORA = 6;     
+  { abbreviation to Oracle                }
+  { Map territory name from Oracle to     }
+     OCI_NLS_TERR_ORA_TO_ISO3 = 7;     
+  { 3-letter ISO abbreviation             }
+
+  type
+     POCIMsg = pointer;
+
+     POCIWchar = ^OCIWchar;
+     OCIWchar = ub4;
+
+  const
+     OCI_XMLTYPE_CREATE_OCISTRING = 1;     
+     OCI_XMLTYPE_CREATE_CLOB = 2;     
+     OCI_XMLTYPE_CREATE_BLOB = 3;     
+  {------------------------- Kerber Authentication Modes --------------------- }
+  { Apply Kerberos Creds for Proxy  }
+     OCI_KERBCRED_PROXY = 1;     
+  {Apply Creds for Secure Client ID  }
+     OCI_KERBCRED_CLIENT_IDENTIFIER = 2;     
+  {------------------------- Database Startup Flags -------------------------- }
+  { Abort running instance, start  }
+     OCI_DBSTARTUPFLAG_FORCE = $00000001;     
+  { Restrict access to DBA  }
+     OCI_DBSTARTUPFLAG_RESTRICT = $00000002;     
+  {------------------------- Database Shutdown Modes ------------------------- }
+  { Wait for all the transactions  }
+     OCI_DBSHUTDOWN_TRANSACTIONAL = 1;     
+  { Wait for local transactions  }
+     OCI_DBSHUTDOWN_TRANSACTIONAL_LOCAL = 2;     
+  { Terminate and roll back  }
+     OCI_DBSHUTDOWN_IMMEDIATE = 3;     
+  { Terminate and don't roll back  }
+     OCI_DBSHUTDOWN_ABORT = 4;     
+  { Orderly shutdown  }
+     OCI_DBSHUTDOWN_FINAL = 5;     
+  {------------------------- Version information ----------------------------- }
+  { Major release version  }
+     OCI_MAJOR_VERSION = 10;     
+  { Minor release version  }
+     OCI_MINOR_VERSION = 2;     
+  {--------------------------------------------------------------------------- 
+                       PRIVATE TYPES AND CONSTANTS 
+    --------------------------------------------------------------------------- }
+  { None  }
+  {--------------------------------------------------------------------------- 
+                             PUBLIC FUNCTIONS 
+    --------------------------------------------------------------------------- }
+  { see ociap.h or ocikp.h  }
+  {--------------------------------------------------------------------------- 
+                            PRIVATE FUNCTIONS 
+    --------------------------------------------------------------------------- }
+  { None  }
+
+  { more includes  }
+{$include oci1.inc}
+{$include oro_interface.inc}
+
+{$include orl.inc}
+
+{$include ort.inc}
+
+{$include ociap.inc}
+
+{$IFDEF LinkDynamically}
+Procedure InitialiseOCI;
+Procedure ReleaseOCI;
+
+var OCILibraryHandle : TLibHandle;
+{$ENDIF}
+
+implementation
+
+{$include oro_implementation.inc}
+
+{$IFDEF LinkDynamically}
+
+var RefCount : integer;
+
+Procedure InitialiseOCI;
+
+begin
+  inc(RefCount);
+  if RefCount = 1 then
+    begin
+    OCILibraryHandle:=loadlibrary(ocilib);
+    if (OCILibraryHandle=nilhandle) then
+      begin
+      RefCount := 0;
+      Raise EInOutError.Create('Can not load Oracle client. Is it installed? ('+ocilib+')');
+      end;
+{ ORL.inc}
+    pointer(OCINumberInc) := GetProcedureAddress(OCILibraryHandle,'OCINumberInc');
+    pointer(OCINumberDec) := GetProcedureAddress(OCILibraryHandle,'OCINumberDec');
+    pointer(OCINumberSetZero) := GetProcedureAddress(OCILibraryHandle,'OCINumberSetZero');
+    pointer(OCINumberSetPi) := GetProcedureAddress(OCILibraryHandle,'OCINumberSetPi');
+    pointer(OCINumberAdd) := GetProcedureAddress(OCILibraryHandle,'OCINumberAdd');
+    pointer(OCINumberSub) := GetProcedureAddress(OCILibraryHandle,'OCINumberSub');
+    pointer(OCINumberMul) := GetProcedureAddress(OCILibraryHandle,'OCINumberMul');
+    pointer(OCINumberDiv) := GetProcedureAddress(OCILibraryHandle,'OCINumberDiv');
+    pointer(OCINumberMod) := GetProcedureAddress(OCILibraryHandle,'OCINumberMod');
+    pointer(OCINumberIntPower) := GetProcedureAddress(OCILibraryHandle,'OCINumberIntPower');
+    pointer(OCINumberShift) := GetProcedureAddress(OCILibraryHandle,'OCINumberShift');
+    pointer(OCINumberNeg) := GetProcedureAddress(OCILibraryHandle,'OCINumberNeg');
+    pointer(OCINumberToText) := GetProcedureAddress(OCILibraryHandle,'OCINumberToText');
+    pointer(OCINumberFromText) := GetProcedureAddress(OCILibraryHandle,'OCINumberFromText');
+    pointer(OCINumberToInt) := GetProcedureAddress(OCILibraryHandle,'OCINumberToInt');
+    pointer(OCINumberFromInt) := GetProcedureAddress(OCILibraryHandle,'OCINumberFromInt');
+    pointer(OCINumberToReal) := GetProcedureAddress(OCILibraryHandle,'OCINumberToReal');
+    pointer(OCINumberToRealArray) := GetProcedureAddress(OCILibraryHandle,'OCINumberToRealArray');
+    pointer(OCINumberFromReal) := GetProcedureAddress(OCILibraryHandle,'OCINumberFromReal');
+    pointer(OCINumberCmp) := GetProcedureAddress(OCILibraryHandle,'OCINumberCmp');
+    pointer(OCINumberSign) := GetProcedureAddress(OCILibraryHandle,'OCINumberSign');
+    pointer(OCINumberIsZero) := GetProcedureAddress(OCILibraryHandle,'OCINumberIsZero');
+    pointer(OCINumberIsInt) := GetProcedureAddress(OCILibraryHandle,'OCINumberIsInt');
+    pointer(OCINumberAssign) := GetProcedureAddress(OCILibraryHandle,'OCINumberAssign');
+    pointer(OCINumberAbs) := GetProcedureAddress(OCILibraryHandle,'OCINumberAbs');
+    pointer(OCINumberCeil) := GetProcedureAddress(OCILibraryHandle,'OCINumberCeil');
+    pointer(OCINumberFloor) := GetProcedureAddress(OCILibraryHandle,'OCINumberFloor');
+    pointer(OCINumberSqrt) := GetProcedureAddress(OCILibraryHandle,'OCINumberSqrt');
+    pointer(OCINumberTrunc) := GetProcedureAddress(OCILibraryHandle,'OCINumberTrunc');
+    pointer(OCINumberPower) := GetProcedureAddress(OCILibraryHandle,'OCINumberPower');
+    pointer(OCINumberRound) := GetProcedureAddress(OCILibraryHandle,'OCINumberRound');
+    pointer(OCINumberPrec) := GetProcedureAddress(OCILibraryHandle,'OCINumberPrec');
+    pointer(OCINumberSin) := GetProcedureAddress(OCILibraryHandle,'OCINumberSin');
+    pointer(OCINumberArcSin) := GetProcedureAddress(OCILibraryHandle,'OCINumberArcSin');
+    pointer(OCINumberHypSin) := GetProcedureAddress(OCILibraryHandle,'OCINumberHypSin');
+    pointer(OCINumberCos) := GetProcedureAddress(OCILibraryHandle,'OCINumberCos');
+    pointer(OCINumberArcCos) := GetProcedureAddress(OCILibraryHandle,'OCINumberArcCos');
+    pointer(OCINumberHypCos) := GetProcedureAddress(OCILibraryHandle,'OCINumberHypCos');
+    pointer(OCINumberTan) := GetProcedureAddress(OCILibraryHandle,'OCINumberTan');
+    pointer(OCINumberArcTan) := GetProcedureAddress(OCILibraryHandle,'OCINumberArcTan');
+    pointer(OCINumberArcTan2) := GetProcedureAddress(OCILibraryHandle,'OCINumberArcTan2');
+    pointer(OCINumberHypTan) := GetProcedureAddress(OCILibraryHandle,'OCINumberHypTan');
+    pointer(OCINumberExp) := GetProcedureAddress(OCILibraryHandle,'OCINumberExp');
+    pointer(OCINumberLn) := GetProcedureAddress(OCILibraryHandle,'OCINumberLn');
+    pointer(OCINumberLog) := GetProcedureAddress(OCILibraryHandle,'OCINumberLog');
+    pointer(OCIDateToText) := GetProcedureAddress(OCILibraryHandle,'var OCIDateToText');
+    pointer(OCIDateFromText) := GetProcedureAddress(OCILibraryHandle,'OCIDateFromText');
+    pointer(OCIDateCompare) := GetProcedureAddress(OCILibraryHandle,'OCIDateCompare');
+    pointer(OCIDateAddMonths) := GetProcedureAddress(OCILibraryHandle,'OCIDateAddMonths');
+    pointer(OCIDateAddDays) := GetProcedureAddress(OCILibraryHandle,'OCIDateAddDays');
+    pointer(OCIDateLastDay) := GetProcedureAddress(OCILibraryHandle,'OCIDateLastDay');
+    pointer(OCIDateDaysBetween) := GetProcedureAddress(OCILibraryHandle,'OCIDateDaysBetween');
+    pointer(OCIDateZoneToZone) := GetProcedureAddress(OCILibraryHandle,'OCIDateZoneToZone');
+    pointer(OCIDateNextDay) := GetProcedureAddress(OCILibraryHandle,'OCIDateNextDay');
+    pointer(OCIDateCheck) := GetProcedureAddress(OCILibraryHandle,'OCIDateCheck');
+    pointer(OCIDateSysDate) := GetProcedureAddress(OCILibraryHandle,'OCIDateSysDate');
+    pointer(OCIStringAssign) := GetProcedureAddress(OCILibraryHandle,'OCIStringAssign');
+    pointer(OCIStringAssignText) := GetProcedureAddress(OCILibraryHandle,'OCIStringAssignText');
+    pointer(OCIStringResize) := GetProcedureAddress(OCILibraryHandle,'OCIStringResize');
+    pointer(OCIStringSize) := GetProcedureAddress(OCILibraryHandle,'OCIStringSize');
+    pointer(OCIStringPtr) := GetProcedureAddress(OCILibraryHandle,'OCIStringPtr');
+    pointer(OCIStringAllocSize) := GetProcedureAddress(OCILibraryHandle,'OCIStringAllocSize');
+    pointer(OCIRawAssignRaw) := GetProcedureAddress(OCILibraryHandle,'OCIRawAssignRaw');
+    pointer(OCIRawAssignBytes) := GetProcedureAddress(OCILibraryHandle,'OCIRawAssignBytes');
+    pointer(OCIRawResize) := GetProcedureAddress(OCILibraryHandle,'OCIRawResize');
+    pointer(OCIRawSize) := GetProcedureAddress(OCILibraryHandle,'OCIRawSize');
+    pointer(OCIRawPtr) := GetProcedureAddress(OCILibraryHandle,'OCIRawPtr');
+    pointer(OCIRawAllocSize) := GetProcedureAddress(OCILibraryHandle,'OCIRawAllocSize');
+    pointer(OCIRefClear) := GetProcedureAddress(OCILibraryHandle,'OCIRefClear');
+    pointer(OCIRefToHex) := GetProcedureAddress(OCILibraryHandle,'OCIRefToHex');
+    pointer(OCICollSize) := GetProcedureAddress(OCILibraryHandle,'OCICollSize');
+    pointer(OCICollMax) := GetProcedureAddress(OCILibraryHandle,'OCICollMax');
+    pointer(OCICollGetElem) := GetProcedureAddress(OCILibraryHandle,'OCICollGetElem');
+    pointer(OCICollAssignElem) := GetProcedureAddress(OCILibraryHandle,'OCICollAssignElem');
+    pointer(OCICollTrim) := GetProcedureAddress(OCILibraryHandle,'OCICollTrim');
+    pointer(OCICollIsLocator) := GetProcedureAddress(OCILibraryHandle,'OCICollIsLocator');
+    pointer(OCIIterCreate) := GetProcedureAddress(OCILibraryHandle,'OCIIterCreate');
+    pointer(OCIIterDelete) := GetProcedureAddress(OCILibraryHandle,'OCIIterDelete');
+    pointer(OCIIterInit) := GetProcedureAddress(OCILibraryHandle,'OCIIterInit');
+    pointer(OCIIterGetCurrent) := GetProcedureAddress(OCILibraryHandle,'OCIIterGetCurrent');
+    pointer(OCIIterPrev) := GetProcedureAddress(OCILibraryHandle,'OCIIterPrev');
+
+{ ORT.inc}
+
+    pointer(OCITypeIterNew) := GetProcedureAddress(OCILibraryHandle,'OCITypeIterNew');
+    pointer(OCITypeArrayByName) := GetProcedureAddress(OCILibraryHandle,'OCITypeArrayByName');
+    pointer(OCITypeArrayByRef) := GetProcedureAddress(OCILibraryHandle,'OCITypeArrayByRef');
+    pointer(OCITypeSchema) := GetProcedureAddress(OCILibraryHandle,'OCITypeSchema');
+    pointer(OCITypeCollTypeCode) := GetProcedureAddress(OCILibraryHandle,'OCITypeCollTypeCode');
+    pointer(OCITypeAttrs) := GetProcedureAddress(OCILibraryHandle,'OCITypeAttrs');
+    pointer(OCITypeElemName) := GetProcedureAddress(OCILibraryHandle,'OCITypeElemName');
+    pointer(OCITypeElemType) := GetProcedureAddress(OCILibraryHandle,'OCITypeElemType');
+    pointer(OCITypeElemFlags) := GetProcedureAddress(OCILibraryHandle,'OCITypeElemFlags');
+    pointer(OCITypeElemNumScale) := GetProcedureAddress(OCILibraryHandle,'OCITypeElemNumScale');
+    pointer(OCITypeElemCharSetID) := GetProcedureAddress(OCILibraryHandle,'OCITypeElemCharSetID');
+    pointer(OCITypeElemParameterizedType) := GetProcedureAddress(OCILibraryHandle,'OCITypeElemParameterizedType');
+    pointer(OCITypeAttrByName) := GetProcedureAddress(OCILibraryHandle,'OCITypeAttrByName');
+    pointer(OCITypeMethodNext) := GetProcedureAddress(OCILibraryHandle,'OCITypeMethodNext');
+    pointer(OCITypeMethodName) := GetProcedureAddress(OCILibraryHandle,'OCITypeMethodName');
+    pointer(OCITypeMethodFlags) := GetProcedureAddress(OCILibraryHandle,'OCITypeMethodFlags');
+    pointer(OCITypeMethodOrder) := GetProcedureAddress(OCILibraryHandle,'OCITypeMethodOrder');
+    pointer(OCITypeResult) := GetProcedureAddress(OCILibraryHandle,'OCITypeResult');
+    pointer(OCITypeParamByName) := GetProcedureAddress(OCILibraryHandle,'OCITypeParamByName');
+    pointer(OCITypeElemDefaultValue) := GetProcedureAddress(OCILibraryHandle,'OCITypeElemDefaultValue');
+    pointer(OCITypeVTInsert) := GetProcedureAddress(OCILibraryHandle,'OCITypeVTInsert');
+    pointer(ortgcty) := GetProcedureAddress(OCILibraryHandle,'ortgcty');
+    pointer(OCITypeBeginCreate) := GetProcedureAddress(OCILibraryHandle,'OCITypeBeginCreate');
+    pointer(OCITypeSetCollection) := GetProcedureAddress(OCILibraryHandle,'OCITypeSetCollection');
+    pointer(OCITypeSetBuiltin) := GetProcedureAddress(OCILibraryHandle,'OCITypeSetBuiltin');
+    pointer(OCITypeAddAttr) := GetProcedureAddress(OCILibraryHandle,'OCITypeAddAttr');
+    pointer(OCITypeEndCreate) := GetProcedureAddress(OCILibraryHandle,'OCITypeEndCreate');
+
+{ nzt.inc}
+
+    pointer(nzteStorePersona) := GetProcedureAddress(OCILibraryHandle,'nzteStorePersona');
+    pointer(nzteRemovePersona) := GetProcedureAddress(OCILibraryHandle,'nzteRemovePersona');
+    pointer(nzteCreatePersona) := GetProcedureAddress(OCILibraryHandle,'nzteCreatePersona');
+    pointer(nztiStoreTrustedIdentity) := GetProcedureAddress(OCILibraryHandle,'nztiStoreTrustedIdentity');
+    pointer(nzteSetProtection) := GetProcedureAddress(OCILibraryHandle,'nzteSetProtection');
+    pointer(nzteGetProtection) := GetProcedureAddress(OCILibraryHandle,'nzteGetProtection');
+    pointer(nztiRemoveIdentity) := GetProcedureAddress(OCILibraryHandle,'nztiRemoveIdentity');
+    pointer(nztifdn) := GetProcedureAddress(OCILibraryHandle,'nztifdn');
+    pointer(nztxSignExpansion) := GetProcedureAddress(OCILibraryHandle,'nztxSignExpansion');
+    pointer(nztxsd_SignDetachedExpansion) := GetProcedureAddress(OCILibraryHandle,'nztxsd_SignDetachedExpansion');
+    pointer(nztEncrypt) := GetProcedureAddress(OCILibraryHandle,'nztEncrypt');
+    pointer(nztxEncryptExpansion) := GetProcedureAddress(OCILibraryHandle,'nztxEncryptExpansion');
+    pointer(nztDecrypt) := GetProcedureAddress(OCILibraryHandle,'nztDecrypt');
+    pointer(nztEnvelope) := GetProcedureAddress(OCILibraryHandle,'nztEnvelope');
+    pointer(nztDeEnvelope) := GetProcedureAddress(OCILibraryHandle,'nztDeEnvelope');
+    pointer(nztKeyedHash) := GetProcedureAddress(OCILibraryHandle,'nztKeyedHash');
+    pointer(nztxKeyedHashExpansion) := GetProcedureAddress(OCILibraryHandle,'nztxKeyedHashExpansion');
+    pointer(nztxHashExpansion) := GetProcedureAddress(OCILibraryHandle,'nztxHashExpansion');
+    pointer(nztiae_IsAuthEnabled) := GetProcedureAddress(OCILibraryHandle,'nztiae_IsAuthEnabled');
+    pointer(nztiee_IsEncrEnabled) := GetProcedureAddress(OCILibraryHandle,'nztiee_IsEncrEnabled');
+    pointer(nztihe_IsHashEnabled) := GetProcedureAddress(OCILibraryHandle,'nztihe_IsHashEnabled');
+    pointer(nztGetIssuerName) := GetProcedureAddress(OCILibraryHandle,'nztGetIssuerName');
+    pointer(nztGetSubjectName) := GetProcedureAddress(OCILibraryHandle,'nztGetSubjectName');
+    pointer(nztGetBase64Cert) := GetProcedureAddress(OCILibraryHandle,'nztGetBase64Cert');
+    pointer(nztGetSerialNumber) := GetProcedureAddress(OCILibraryHandle,'nztGetSerialNumber');
+    pointer(nztGetValidDate) := GetProcedureAddress(OCILibraryHandle,'nztGetValidDate');
+    pointer(nztGetVersion) := GetProcedureAddress(OCILibraryHandle,'nztGetVersion');
+    pointer(nztGetPublicKey) := GetProcedureAddress(OCILibraryHandle,'nztGetPublicKey');
+    pointer(nztGenericDestroy) := GetProcedureAddress(OCILibraryHandle,'nztGenericDestroy');
+    pointer(nztSetAppDefaultLocation) := GetProcedureAddress(OCILibraryHandle,'nztSetAppDefaultLocation');
+    pointer(nztSearchNZDefault) := GetProcedureAddress(OCILibraryHandle,'nztSearchNZDefault');
+
+{ ociap.inc}
+
+    pointer(OCIInitialize) := GetProcedureAddress(OCILibraryHandle,'OCIInitialize');
+    pointer(OCITerminate) := GetProcedureAddress(OCILibraryHandle,'OCITerminate');
+    pointer(OCIEnvCreate) := GetProcedureAddress(OCILibraryHandle,'OCIEnvCreate');
+    pointer(OCIEnvNlsCreate) := GetProcedureAddress(OCILibraryHandle,'OCIEnvNlsCreate');
+    pointer(OCIFEnvCreate) := GetProcedureAddress(OCILibraryHandle,'OCIFEnvCreate');
+    pointer(OCIHandleAlloc) := GetProcedureAddress(OCILibraryHandle,'OCIHandleAlloc');
+    pointer(OCIHandleFree) := GetProcedureAddress(OCILibraryHandle,'OCIHandleFree');
+    pointer(OCIDescriptorAlloc) := GetProcedureAddress(OCILibraryHandle,'OCIDescriptorAlloc');
+    pointer(OCIDescriptorFree) := GetProcedureAddress(OCILibraryHandle,'OCIDescriptorFree');
+    pointer(OCIEnvInit) := GetProcedureAddress(OCILibraryHandle,'OCIEnvInit');
+    pointer(OCIServerAttach) := GetProcedureAddress(OCILibraryHandle,'OCIServerAttach');
+    pointer(OCIServerDetach) := GetProcedureAddress(OCILibraryHandle,'OCIServerDetach');
+    pointer(OCISessionBegin) := GetProcedureAddress(OCILibraryHandle,'OCISessionBegin');
+    pointer(OCISessionEnd) := GetProcedureAddress(OCILibraryHandle,'OCISessionEnd');
+    pointer(OCILogon) := GetProcedureAddress(OCILibraryHandle,'OCILogon');
+    pointer(OCILogon2) := GetProcedureAddress(OCILibraryHandle,'OCILogon2');
+    pointer(OCILogoff) := GetProcedureAddress(OCILibraryHandle,'OCILogoff');
+    pointer(OCIPasswordChange) := GetProcedureAddress(OCILibraryHandle,'OCIPasswordChange');
+    pointer(OCIStmtPrepare) := GetProcedureAddress(OCILibraryHandle,'OCIStmtPrepare');
+    pointer(OCIStmtPrepare2) := GetProcedureAddress(OCILibraryHandle,'OCIStmtPrepare2');
+    pointer(OCIStmtRelease) := GetProcedureAddress(OCILibraryHandle,'OCIStmtRelease');
+    pointer(OCIBindByPos) := GetProcedureAddress(OCILibraryHandle,'OCIBindByPos');
+    pointer(OCIBindByName) := GetProcedureAddress(OCILibraryHandle,'OCIBindByName');
+    pointer(OCIBindObject) := GetProcedureAddress(OCILibraryHandle,'OCIBindObject');
+    pointer(OCIBindDynamic) := GetProcedureAddress(OCILibraryHandle,'OCIBindDynamic');
+    pointer(OCIBindArrayOfStruct) := GetProcedureAddress(OCILibraryHandle,'OCIBindArrayOfStruct');
+    pointer(OCIStmtGetPieceInfo) := GetProcedureAddress(OCILibraryHandle,'OCIStmtGetPieceInfo');
+    pointer(OCIStmtSetPieceInfo) := GetProcedureAddress(OCILibraryHandle,'OCIStmtSetPieceInfo');
+    pointer(OCIStmtExecute) := GetProcedureAddress(OCILibraryHandle,'OCIStmtExecute');
+    pointer(OCIDefineByPos) := GetProcedureAddress(OCILibraryHandle,'OCIDefineByPos');
+    pointer(OCIDefineObject) := GetProcedureAddress(OCILibraryHandle,'OCIDefineObject');
+    pointer(OCIDefineDynamic) := GetProcedureAddress(OCILibraryHandle,'OCIDefineDynamic');
+    pointer(OCIRowidToChar) := GetProcedureAddress(OCILibraryHandle,'OCIRowidToChar');
+    pointer(OCIDefineArrayOfStruct) := GetProcedureAddress(OCILibraryHandle,'OCIDefineArrayOfStruct');
+    pointer(OCIStmtFetch) := GetProcedureAddress(OCILibraryHandle,'OCIStmtFetch');
+    pointer(OCIStmtFetch2) := GetProcedureAddress(OCILibraryHandle,'OCIStmtFetch2');
+    pointer(OCIStmtGetBindInfo) := GetProcedureAddress(OCILibraryHandle,'OCIStmtGetBindInfo');
+    pointer(OCIDescribeAny) := GetProcedureAddress(OCILibraryHandle,'OCIDescribeAny');
+    pointer(OCIParamGet) := GetProcedureAddress(OCILibraryHandle,'OCIParamGet');
+    pointer(OCIParamSet) := GetProcedureAddress(OCILibraryHandle,'OCIParamSet');
+    pointer(OCITransStart) := GetProcedureAddress(OCILibraryHandle,'OCITransStart');
+    pointer(OCITransDetach) := GetProcedureAddress(OCILibraryHandle,'OCITransDetach');
+    pointer(OCITransCommit) := GetProcedureAddress(OCILibraryHandle,'OCITransCommit');
+    pointer(OCITransRollback) := GetProcedureAddress(OCILibraryHandle,'OCITransRollback');
+    pointer(OCITransPrepare) := GetProcedureAddress(OCILibraryHandle,'OCITransPrepare');
+    pointer(OCITransMultiPrepare) := GetProcedureAddress(OCILibraryHandle,'OCITransMultiPrepare');
+    pointer(OCITransForget) := GetProcedureAddress(OCILibraryHandle,'OCITransForget');
+    pointer(OCIErrorGet) := GetProcedureAddress(OCILibraryHandle,'OCIErrorGet');
+    pointer(OCILobAppend) := GetProcedureAddress(OCILibraryHandle,'OCILobAppend');
+    pointer(OCILobAssign) := GetProcedureAddress(OCILibraryHandle,'OCILobAssign');
+    pointer(OCILobCharSetForm) := GetProcedureAddress(OCILibraryHandle,'OCILobCharSetForm');
+    pointer(OCILobCharSetId) := GetProcedureAddress(OCILibraryHandle,'OCILobCharSetId');
+    pointer(OCILobCopy) := GetProcedureAddress(OCILibraryHandle,'OCILobCopy');
+    pointer(OCILobCreateTemporary) := GetProcedureAddress(OCILibraryHandle,'OCILobCreateTemporary');
+    pointer(OCILobClose) := GetProcedureAddress(OCILibraryHandle,'OCILobClose');
+    pointer(OCILobDisableBuffering) := GetProcedureAddress(OCILibraryHandle,'OCILobDisableBuffering');
+    pointer(OCILobEnableBuffering) := GetProcedureAddress(OCILibraryHandle,'OCILobEnableBuffering');
+    pointer(OCILobErase) := GetProcedureAddress(OCILibraryHandle,'OCILobErase');
+    pointer(OCILobFileClose) := GetProcedureAddress(OCILibraryHandle,'OCILobFileClose');
+    pointer(OCILobFileCloseAll) := GetProcedureAddress(OCILibraryHandle,'OCILobFileCloseAll');
+    pointer(OCILobFileExists) := GetProcedureAddress(OCILibraryHandle,'OCILobFileExists');
+    pointer(OCILobFileGetName) := GetProcedureAddress(OCILibraryHandle,'OCILobFileGetName');
+    pointer(OCILobFileIsOpen) := GetProcedureAddress(OCILibraryHandle,'OCILobFileIsOpen');
+    pointer(OCILobFileOpen) := GetProcedureAddress(OCILibraryHandle,'OCILobFileOpen');
+    pointer(OCILobFileSetName) := GetProcedureAddress(OCILibraryHandle,'OCILobFileSetName');
+    pointer(OCILobFlushBuffer) := GetProcedureAddress(OCILibraryHandle,'OCILobFlushBuffer');
+    pointer(OCILobFreeTemporary) := GetProcedureAddress(OCILibraryHandle,'OCILobFreeTemporary');
+    pointer(OCILobGetChunkSize) := GetProcedureAddress(OCILibraryHandle,'OCILobGetChunkSize');
+    pointer(OCILobGetLength) := GetProcedureAddress(OCILibraryHandle,'OCILobGetLength');
+    pointer(OCILobIsEqual) := GetProcedureAddress(OCILibraryHandle,'OCILobIsEqual');
+    pointer(OCILobIsOpen) := GetProcedureAddress(OCILibraryHandle,'OCILobIsOpen');
+    pointer(OCILobIsTemporary) := GetProcedureAddress(OCILibraryHandle,'OCILobIsTemporary');
+    pointer(OCILobLoadFromFile) := GetProcedureAddress(OCILibraryHandle,'OCILobLoadFromFile');
+    pointer(OCILobLocatorAssign) := GetProcedureAddress(OCILibraryHandle,'OCILobLocatorAssign');
+    pointer(OCILobLocatorIsInit) := GetProcedureAddress(OCILibraryHandle,'OCILobLocatorIsInit');
+    pointer(OCILobOpen) := GetProcedureAddress(OCILibraryHandle,'OCILobOpen');
+    pointer(OCILobRead) := GetProcedureAddress(OCILibraryHandle,'OCILobRead');
+    pointer(OCILobTrim) := GetProcedureAddress(OCILibraryHandle,'OCILobTrim');
+    pointer(OCILobWrite) := GetProcedureAddress(OCILibraryHandle,'OCILobWrite');
+    pointer(OCILobWriteAppend) := GetProcedureAddress(OCILibraryHandle,'OCILobWriteAppend');
+    pointer(OCIBreak) := GetProcedureAddress(OCILibraryHandle,'OCIBreak');
+    pointer(OCIReset) := GetProcedureAddress(OCILibraryHandle,'OCIReset');
+    pointer(OCIServerVersion) := GetProcedureAddress(OCILibraryHandle,'OCIServerVersion');
+    pointer(OCIServerRelease) := GetProcedureAddress(OCILibraryHandle,'OCIServerRelease');
+    pointer(OCIAttrGet) := GetProcedureAddress(OCILibraryHandle,'OCIAttrGet');
+    pointer(OCIAttrSet) := GetProcedureAddress(OCILibraryHandle,'OCIAttrSet');
+    pointer(OCISvcCtxToLda) := GetProcedureAddress(OCILibraryHandle,'OCISvcCtxToLda');
+    pointer(OCILdaToSvcCtx) := GetProcedureAddress(OCILibraryHandle,'OCILdaToSvcCtx');
+    pointer(OCIResultSetToStmt) := GetProcedureAddress(OCILibraryHandle,'OCIResultSetToStmt');
+    pointer(OCIFileClose) := GetProcedureAddress(OCILibraryHandle,'OCIFileClose');
+    pointer(OCISharedLibInit) := GetProcedureAddress(OCILibraryHandle,'OCISharedLibInit');
+    pointer(OCIFileExists) := GetProcedureAddress(OCILibraryHandle,'OCIFileExists');
+    pointer(OCIFileFlush) := GetProcedureAddress(OCILibraryHandle,'OCIFileFlush');
+    pointer(OCIFileGetLength) := GetProcedureAddress(OCILibraryHandle,'OCIFileGetLength');
+    pointer(OCIFileInit) := GetProcedureAddress(OCILibraryHandle,'OCIFileInit');
+    pointer(OCIFileOpen) := GetProcedureAddress(OCILibraryHandle,'OCIFileOpen');
+    pointer(OCIFileRead) := GetProcedureAddress(OCILibraryHandle,'OCIFileRead');
+    pointer(OCIFileSeek) := GetProcedureAddress(OCILibraryHandle,'OCIFileSeek');
+    pointer(OCIFileTerm) := GetProcedureAddress(OCILibraryHandle,'OCIFileTerm');
+    pointer(OCIFileWrite) := GetProcedureAddress(OCILibraryHandle,'OCIFileWrite');
+{$ifdef ORAXB8_DEFINED}
+    pointer(OCILobCopy2) := GetProcedureAddress(OCILibraryHandle,'OCILobCopy2');
+    pointer(OCILobErase2) := GetProcedureAddress(OCILibraryHandle,'OCILobErase2');
+    pointer(OCILobGetLength2) := GetProcedureAddress(OCILibraryHandle,'OCILobGetLength2');
+    pointer(OCILobLoadFromFile2) := GetProcedureAddress(OCILibraryHandle,'OCILobLoadFromFile2');
+    pointer(OCILobRead2) := GetProcedureAddress(OCILibraryHandle,'OCILobRead2');
+    pointer(OCILobArrayRead) := GetProcedureAddress(OCILibraryHandle,'OCILobArrayRead');
+    pointer(OCILobTrim2) := GetProcedureAddress(OCILibraryHandle,'OCILobTrim2');
+    pointer(OCILobWrite2) := GetProcedureAddress(OCILibraryHandle,'OCILobWrite2');
+    pointer(OCILobArrayWrite) := GetProcedureAddress(OCILibraryHandle,'OCILobArrayWrite');
+    pointer(OCILobWriteAppend2) := GetProcedureAddress(OCILibraryHandle,'OCILobWriteAppend2');
+    pointer(OCILobGetStorageLimit) := GetProcedureAddress(OCILibraryHandle,'OCILobGetStorageLimit');
+{$endif}
+    pointer(OCISecurityInitialize) := GetProcedureAddress(OCILibraryHandle,'OCISecurityInitialize');
+    pointer(OCISecurityTerminate) := GetProcedureAddress(OCILibraryHandle,'OCISecurityTerminate');
+    pointer(OCISecurityOpenWallet) := GetProcedureAddress(OCILibraryHandle,'OCISecurityOpenWallet');
+    pointer(OCISecurityCloseWallet) := GetProcedureAddress(OCILibraryHandle,'OCISecurityCloseWallet');
+    pointer(OCISecurityCreateWallet) := GetProcedureAddress(OCILibraryHandle,'OCISecurityCreateWallet');
+    pointer(OCISecurityDestroyWallet) := GetProcedureAddress(OCILibraryHandle,'OCISecurityDestroyWallet');
+    pointer(OCISecurityStorePersona) := GetProcedureAddress(OCILibraryHandle,'OCISecurityStorePersona');
+    pointer(OCISecurityOpenPersona) := GetProcedureAddress(OCILibraryHandle,'OCISecurityOpenPersona');
+    pointer(OCISecurityClosePersona) := GetProcedureAddress(OCILibraryHandle,'OCISecurityClosePersona');
+    pointer(OCISecurityRemovePersona) := GetProcedureAddress(OCILibraryHandle,'OCISecurityRemovePersona');
+    pointer(OCISecurityCreatePersona) := GetProcedureAddress(OCILibraryHandle,'OCISecurityCreatePersona');
+    pointer(OCISecuritySetProtection) := GetProcedureAddress(OCILibraryHandle,'OCISecuritySetProtection');
+    pointer(OCISecurityGetProtection) := GetProcedureAddress(OCILibraryHandle,'OCISecurityGetProtection');
+    pointer(OCISecurityRemoveIdentity) := GetProcedureAddress(OCILibraryHandle,'OCISecurityRemoveIdentity');
+    pointer(OCISecurityCreateIdentity) := GetProcedureAddress(OCILibraryHandle,'OCISecurityCreateIdentity');
+    pointer(OCISecurityAbortIdentity) := GetProcedureAddress(OCILibraryHandle,'OCISecurityAbortIdentity');
+    pointer(OCISecurityFreeIdentity) := GetProcedureAddress(OCILibraryHandle,'OCISecurityFreeIdentity');
+    pointer(OCISecurityStoreTrustedIdentity) := GetProcedureAddress(OCILibraryHandle,'OCISecurityStoreTrustedIdentity');
+    pointer(OCISecuritySign) := GetProcedureAddress(OCILibraryHandle,'OCISecuritySign');
+    pointer(OCISecuritySignExpansion) := GetProcedureAddress(OCILibraryHandle,'OCISecuritySignExpansion');
+    pointer(OCISecurityVerify) := GetProcedureAddress(OCILibraryHandle,'OCISecurityVerify');
+    pointer(OCISecurityValidate) := GetProcedureAddress(OCILibraryHandle,'OCISecurityValidate');
+    pointer(OCISecuritySignDetached) := GetProcedureAddress(OCILibraryHandle,'OCISecuritySignDetached');
+    pointer(OCISecuritySignDetExpansion) := GetProcedureAddress(OCILibraryHandle,'OCISecuritySignDetExpansion');
+    pointer(OCISecurityVerifyDetached) := GetProcedureAddress(OCILibraryHandle,'OCISecurityVerifyDetached');
+    pointer(OCISecurity_PKEncrypt) := GetProcedureAddress(OCILibraryHandle,'OCISecurity_PKEncrypt');
+    pointer(OCISecurityPKEncryptExpansion) := GetProcedureAddress(OCILibraryHandle,'OCISecurityPKEncryptExpansion');
+    pointer(OCISecurityPKDecrypt) := GetProcedureAddress(OCILibraryHandle,'OCISecurityPKDecrypt');
+    pointer(OCISecurityEncrypt) := GetProcedureAddress(OCILibraryHandle,'OCISecurityEncrypt');
+    pointer(OCISecurityEncryptExpansion) := GetProcedureAddress(OCILibraryHandle,'OCISecurityEncryptExpansion');
+    pointer(OCISecurityDecrypt) := GetProcedureAddress(OCILibraryHandle,'OCISecurityDecrypt');
+    pointer(OCISecurityEnvelope) := GetProcedureAddress(OCILibraryHandle,'OCISecurityEnvelope');
+    pointer(OCISecurityDeEnvelope) := GetProcedureAddress(OCILibraryHandle,'OCISecurityDeEnvelope');
+    pointer(OCISecurityKeyedHash) := GetProcedureAddress(OCILibraryHandle,'OCISecurityKeyedHash');
+    pointer(OCISecurityKeyedHashExpansion) := GetProcedureAddress(OCILibraryHandle,'OCISecurityKeyedHashExpansion');
+    pointer(OCISecurityHash) := GetProcedureAddress(OCILibraryHandle,'OCISecurityHash');
+    pointer(OCISecurityHashExpansion) := GetProcedureAddress(OCILibraryHandle,'OCISecurityHashExpansion');
+    pointer(OCISecuritySeedRandom) := GetProcedureAddress(OCILibraryHandle,'OCISecuritySeedRandom');
+    pointer(OCISecurityRandomBytes) := GetProcedureAddress(OCILibraryHandle,'OCISecurityRandomBytes');
+    pointer(OCISecurityRandomNumber) := GetProcedureAddress(OCILibraryHandle,'OCISecurityRandomNumber');
+    pointer(OCISecurityInitBlock) := GetProcedureAddress(OCILibraryHandle,'OCISecurityInitBlock');
+    pointer(OCISecurityReuseBlock) := GetProcedureAddress(OCILibraryHandle,'OCISecurityReuseBlock');
+    pointer(OCISecurityPurgeBlock) := GetProcedureAddress(OCILibraryHandle,'OCISecurityPurgeBlock');
+    pointer(OCISecuritySetBlock) := GetProcedureAddress(OCILibraryHandle,'OCISecuritySetBlock');
+    pointer(OCISecurityGetIdentity) := GetProcedureAddress(OCILibraryHandle,'OCISecurityGetIdentity');
+    pointer(OCIAQEnq) := GetProcedureAddress(OCILibraryHandle,'OCIAQEnq');
+    pointer(OCIAQDeq) := GetProcedureAddress(OCILibraryHandle,'OCIAQDeq');
+    pointer(OCIAQEnqArray) := GetProcedureAddress(OCILibraryHandle,'OCIAQEnqArray');
+    pointer(OCIAQDeqArray) := GetProcedureAddress(OCILibraryHandle,'OCIAQDeqArray');
+    pointer(OCIAQListen) := GetProcedureAddress(OCILibraryHandle,'OCIAQListen');
+    pointer(OCIAQListen2) := GetProcedureAddress(OCILibraryHandle,'OCIAQListen2');
+    pointer(OCIExtractInit) := GetProcedureAddress(OCILibraryHandle,'OCIExtractInit');
+    pointer(OCIExtractTerm) := GetProcedureAddress(OCILibraryHandle,'OCIExtractTerm');
+    pointer(OCIExtractReset) := GetProcedureAddress(OCILibraryHandle,'OCIExtractReset');
+    pointer(OCIExtractSetNumKeys) := GetProcedureAddress(OCILibraryHandle,'OCIExtractSetNumKeys');
+    pointer(OCIExtractSetKey) := GetProcedureAddress(OCILibraryHandle,'OCIExtractSetKey');
+    pointer(OCIExtractFromFile) := GetProcedureAddress(OCILibraryHandle,'OCIExtractFromFile');
+    pointer(OCIExtractFromStr) := GetProcedureAddress(OCILibraryHandle,'OCIExtractFromStr');
+    pointer(OCIExtractToInt) := GetProcedureAddress(OCILibraryHandle,'OCIExtractToInt');
+    pointer(OCIExtractToBool) := GetProcedureAddress(OCILibraryHandle,'OCIExtractToBool');
+    pointer(OCIExtractToStr) := GetProcedureAddress(OCILibraryHandle,'OCIExtractToStr');
+    pointer(OCIExtractToOCINum) := GetProcedureAddress(OCILibraryHandle,'OCIExtractToOCINum');
+    pointer(OCIExtractToList) := GetProcedureAddress(OCILibraryHandle,'OCIExtractToList');
+    pointer(OCIExtractFromList) := GetProcedureAddress(OCILibraryHandle,'OCIExtractFromList');
+    pointer(OCIMemoryAlloc) := GetProcedureAddress(OCILibraryHandle,'OCIMemoryAlloc');
+    pointer(OCIMemoryResize) := GetProcedureAddress(OCILibraryHandle,'OCIMemoryResize');
+    pointer(OCIMemoryFree) := GetProcedureAddress(OCILibraryHandle,'OCIMemoryFree');
+    pointer(OCIContextSetValue) := GetProcedureAddress(OCILibraryHandle,'OCIContextSetValue');
+    pointer(OCIContextGetValue) := GetProcedureAddress(OCILibraryHandle,'OCIContextGetValue');
+    pointer(OCIContextClearValue) := GetProcedureAddress(OCILibraryHandle,'OCIContextClearValue');
+    pointer(OCIContextGenerateKey) := GetProcedureAddress(OCILibraryHandle,'OCIContextGenerateKey');
+    pointer(OCIMemorySetCurrentIDs) := GetProcedureAddress(OCILibraryHandle,'OCIMemorySetCurrentIDs');
+    pointer(OCIPicklerTdsCtxInit) := GetProcedureAddress(OCILibraryHandle,'OCIPicklerTdsCtxInit');
+    pointer(OCIPicklerTdsCtxFree) := GetProcedureAddress(OCILibraryHandle,'OCIPicklerTdsCtxFree');
+    pointer(OCIPicklerTdsInit) := GetProcedureAddress(OCILibraryHandle,'OCIPicklerTdsInit');
+    pointer(OCIPicklerTdsFree) := GetProcedureAddress(OCILibraryHandle,'OCIPicklerTdsFree');
+    pointer(OCIPicklerTdsCreateElementNumber) := GetProcedureAddress(OCILibraryHandle,'OCIPicklerTdsCreateElementNumber');
+    pointer(OCIPicklerTdsCreateElementChar) := GetProcedureAddress(OCILibraryHandle,'OCIPicklerTdsCreateElementChar');
+    pointer(OCIPicklerTdsCreateElementVarchar) := GetProcedureAddress(OCILibraryHandle,'OCIPicklerTdsCreateElementVarchar');
+    pointer(OCIPicklerTdsCreateElementRaw) := GetProcedureAddress(OCILibraryHandle,'OCIPicklerTdsCreateElementRaw');
+    pointer(OCIPicklerTdsCreateElement) := GetProcedureAddress(OCILibraryHandle,'OCIPicklerTdsCreateElement');
+    pointer(OCIPicklerTdsAddAttr) := GetProcedureAddress(OCILibraryHandle,'OCIPicklerTdsAddAttr');
+    pointer(OCIPicklerTdsGenerate) := GetProcedureAddress(OCILibraryHandle,'OCIPicklerTdsGenerate');
+    pointer(OCIPicklerTdsGetAttr) := GetProcedureAddress(OCILibraryHandle,'OCIPicklerTdsGetAttr');
+    pointer(OCIPicklerFdoInit) := GetProcedureAddress(OCILibraryHandle,'OCIPicklerFdoInit');
+    pointer(OCIPicklerFdoFree) := GetProcedureAddress(OCILibraryHandle,'OCIPicklerFdoFree');
+    pointer(OCIPicklerImageInit) := GetProcedureAddress(OCILibraryHandle,'OCIPicklerImageInit');
+    pointer(OCIPicklerImageFree) := GetProcedureAddress(OCILibraryHandle,'OCIPicklerImageFree');
+    pointer(OCIPicklerImageAddScalar) := GetProcedureAddress(OCILibraryHandle,'OCIPicklerImageAddScalar');
+    pointer(OCIPicklerImageAddNullScalar) := GetProcedureAddress(OCILibraryHandle,'OCIPicklerImageAddNullScalar');
+    pointer(OCIPicklerImageGenerate) := GetProcedureAddress(OCILibraryHandle,'OCIPicklerImageGenerate');
+    pointer(OCIPicklerImageGetScalarSize) := GetProcedureAddress(OCILibraryHandle,'OCIPicklerImageGetScalarSize');
+    pointer(OCIPicklerImageGetScalar) := GetProcedureAddress(OCILibraryHandle,'OCIPicklerImageGetScalar');
+    pointer(OCIPicklerImageCollBegin) := GetProcedureAddress(OCILibraryHandle,'OCIPicklerImageCollBegin');
+    pointer(OCIPicklerImageCollAddScalar) := GetProcedureAddress(OCILibraryHandle,'OCIPicklerImageCollAddScalar');
+    pointer(OCIPicklerImageCollEnd) := GetProcedureAddress(OCILibraryHandle,'OCIPicklerImageCollEnd');
+    pointer(OCIPicklerImageCollBeginScan) := GetProcedureAddress(OCILibraryHandle,'OCIPicklerImageCollBeginScan');
+    pointer(OCIPicklerImageCollGetScalarSize) := GetProcedureAddress(OCILibraryHandle,'OCIPicklerImageCollGetScalarSize');
+    pointer(OCIPicklerImageCollGetScalar) := GetProcedureAddress(OCILibraryHandle,'OCIPicklerImageCollGetScalar');
+    pointer(OCIAnyDataGetType) := GetProcedureAddress(OCILibraryHandle,'OCIAnyDataGetType');
+    pointer(OCIAnyDataIsNull) := GetProcedureAddress(OCILibraryHandle,'OCIAnyDataIsNull');
+    pointer(OCIAnyDataConvert) := GetProcedureAddress(OCILibraryHandle,'OCIAnyDataConvert');
+    pointer(OCIAnyDataBeginCreate) := GetProcedureAddress(OCILibraryHandle,'OCIAnyDataBeginCreate');
+    pointer(OCIAnyDataDestroy) := GetProcedureAddress(OCILibraryHandle,'OCIAnyDataDestroy');
+    pointer(OCIAnyDataAttrSet) := GetProcedureAddress(OCILibraryHandle,'OCIAnyDataAttrSet');
+    pointer(OCIAnyDataCollAddElem) := GetProcedureAddress(OCILibraryHandle,'OCIAnyDataCollAddElem');
+    pointer(OCIAnyDataEndCreate) := GetProcedureAddress(OCILibraryHandle,'OCIAnyDataEndCreate');
+    pointer(OCIAnyDataAccess) := GetProcedureAddress(OCILibraryHandle,'OCIAnyDataAccess');
+    pointer(OCIAnyDataGetCurrAttrNum) := GetProcedureAddress(OCILibraryHandle,'OCIAnyDataGetCurrAttrNum');
+    pointer(OCIAnyDataAttrGet) := GetProcedureAddress(OCILibraryHandle,'OCIAnyDataAttrGet');
+    pointer(OCIAnyDataCollGetElem) := GetProcedureAddress(OCILibraryHandle,'OCIAnyDataCollGetElem');
+    pointer(OCIAnyDataSetBeginCreate) := GetProcedureAddress(OCILibraryHandle,'OCIAnyDataSetBeginCreate');
+    pointer(OCIAnyDataSetDestroy) := GetProcedureAddress(OCILibraryHandle,'OCIAnyDataSetDestroy');
+    pointer(OCIAnyDataSetAddInstance) := GetProcedureAddress(OCILibraryHandle,'OCIAnyDataSetAddInstance');
+    pointer(OCIAnyDataSetEndCreate) := GetProcedureAddress(OCILibraryHandle,'OCIAnyDataSetEndCreate');
+    pointer(OCIAnyDataSetGetType) := GetProcedureAddress(OCILibraryHandle,'OCIAnyDataSetGetType');
+    pointer(OCIAnyDataSetGetCount) := GetProcedureAddress(OCILibraryHandle,'OCIAnyDataSetGetCount');
+    pointer(OCIAnyDataSetGetInstance) := GetProcedureAddress(OCILibraryHandle,'OCIAnyDataSetGetInstance');
+    pointer(OCIFormatInit) := GetProcedureAddress(OCILibraryHandle,'OCIFormatInit');
+    pointer(OCIFormatString) := GetProcedureAddress(OCILibraryHandle,'OCIFormatString');
+    pointer(OCIFormatTerm) := GetProcedureAddress(OCILibraryHandle,'OCIFormatTerm');
+    pointer(OCIFormatTUb1) := GetProcedureAddress(OCILibraryHandle,'OCIFormatTUb1');
+    pointer(OCIFormatTUb2) := GetProcedureAddress(OCILibraryHandle,'OCIFormatTUb2');
+    pointer(OCIFormatTUb4) := GetProcedureAddress(OCILibraryHandle,'OCIFormatTUb4');
+    pointer(OCIFormatTUword) := GetProcedureAddress(OCILibraryHandle,'OCIFormatTUword');
+    pointer(OCIFormatTUbig_ora) := GetProcedureAddress(OCILibraryHandle,'OCIFormatTUbig_ora');
+    pointer(OCIFormatTSb1) := GetProcedureAddress(OCILibraryHandle,'OCIFormatTSb1');
+    pointer(OCIFormatTSb2) := GetProcedureAddress(OCILibraryHandle,'OCIFormatTSb2');
+    pointer(OCIFormatTSb4) := GetProcedureAddress(OCILibraryHandle,'OCIFormatTSb4');
+    pointer(OCIFormatTSword) := GetProcedureAddress(OCILibraryHandle,'OCIFormatTSword');
+    pointer(OCIFormatTSbig_ora) := GetProcedureAddress(OCILibraryHandle,'OCIFormatTSbig_ora');
+    pointer(OCIFormatTEb1) := GetProcedureAddress(OCILibraryHandle,'OCIFormatTEb1');
+    pointer(OCIFormatTEb2) := GetProcedureAddress(OCILibraryHandle,'OCIFormatTEb2');
+    pointer(OCIFormatTEb4) := GetProcedureAddress(OCILibraryHandle,'OCIFormatTEb4');
+    pointer(OCIFormatTEword) := GetProcedureAddress(OCILibraryHandle,'OCIFormatTEword');
+    pointer(OCIFormatTChar) := GetProcedureAddress(OCILibraryHandle,'OCIFormatTChar');
+    pointer(OCIFormatTText) := GetProcedureAddress(OCILibraryHandle,'OCIFormatTText');
+    pointer(OCIFormatTDouble) := GetProcedureAddress(OCILibraryHandle,'OCIFormatTDouble');
+    pointer(OCIFormatTDvoid) := GetProcedureAddress(OCILibraryHandle,'OCIFormatTDvoid');
+    pointer(OCIFormatTEnd) := GetProcedureAddress(OCILibraryHandle,'OCIFormatTEnd');
+    pointer(xaosvch) := GetProcedureAddress(OCILibraryHandle,'xaosvch');
+    pointer(xaoSvcCtx) := GetProcedureAddress(OCILibraryHandle,'xaoSvcCtx');
+    pointer(xaoEnv) := GetProcedureAddress(OCILibraryHandle,'xaoEnv');
+    pointer(xaosterr) := GetProcedureAddress(OCILibraryHandle,'xaosterr');
+    pointer(OCINlsGetInfo) := GetProcedureAddress(OCILibraryHandle,'OCINlsGetInfo');
+    pointer(OCINlsNumericInfoGet) := GetProcedureAddress(OCILibraryHandle,'OCINlsNumericInfoGet');
+    pointer(OCINlsCharSetNameToId) := GetProcedureAddress(OCILibraryHandle,'OCINlsCharSetNameToId');
+    pointer(OCIThreadProcessInit) := GetProcedureAddress(OCILibraryHandle,'OCIThreadProcessInit');
+    pointer(OCIThreadInit) := GetProcedureAddress(OCILibraryHandle,'OCIThreadInit');
+    pointer(OCIThreadTerm) := GetProcedureAddress(OCILibraryHandle,'OCIThreadTerm');
+    pointer(OCIThreadIsMulti) := GetProcedureAddress(OCILibraryHandle,'OCIThreadIsMulti');
+    pointer(OCIThreadMutexInit) := GetProcedureAddress(OCILibraryHandle,'OCIThreadMutexInit');
+    pointer(OCIThreadMutexDestroy) := GetProcedureAddress(OCILibraryHandle,'OCIThreadMutexDestroy');
+    pointer(OCIThreadMutexAcquire) := GetProcedureAddress(OCILibraryHandle,'OCIThreadMutexAcquire');
+    pointer(OCIThreadMutexRelease) := GetProcedureAddress(OCILibraryHandle,'OCIThreadMutexRelease');
+    pointer(OCIThreadKeyInit) := GetProcedureAddress(OCILibraryHandle,'OCIThreadKeyInit');
+    pointer(OCIThreadKeyDestroy) := GetProcedureAddress(OCILibraryHandle,'OCIThreadKeyDestroy');
+    pointer(OCIThreadKeyGet) := GetProcedureAddress(OCILibraryHandle,'OCIThreadKeyGet');
+    pointer(OCIThreadKeySet) := GetProcedureAddress(OCILibraryHandle,'OCIThreadKeySet');
+    pointer(OCIThreadIdInit) := GetProcedureAddress(OCILibraryHandle,'OCIThreadIdInit');
+    pointer(OCIThreadIdDestroy) := GetProcedureAddress(OCILibraryHandle,'OCIThreadIdDestroy');
+    pointer(OCIThreadIdSet) := GetProcedureAddress(OCILibraryHandle,'OCIThreadIdSet');
+    pointer(OCIThreadIdSetNull) := GetProcedureAddress(OCILibraryHandle,'OCIThreadIdSetNull');
+    pointer(OCIThreadIdGet) := GetProcedureAddress(OCILibraryHandle,'OCIThreadIdGet');
+    pointer(OCIThreadIdSame) := GetProcedureAddress(OCILibraryHandle,'OCIThreadIdSame');
+    pointer(OCIThreadIdNull) := GetProcedureAddress(OCILibraryHandle,'OCIThreadIdNull');
+    pointer(OCIThreadHndInit) := GetProcedureAddress(OCILibraryHandle,'OCIThreadHndInit');
+    pointer(OCIThreadHndDestroy) := GetProcedureAddress(OCILibraryHandle,'OCIThreadHndDestroy');
+    pointer(OCIThreadCreate) := GetProcedureAddress(OCILibraryHandle,'OCIThreadCreate');
+    pointer(OCIThreadJoin) := GetProcedureAddress(OCILibraryHandle,'OCIThreadJoin');
+    pointer(OCIThreadClose) := GetProcedureAddress(OCILibraryHandle,'OCIThreadClose');
+    pointer(OCIThreadHandleGet) := GetProcedureAddress(OCILibraryHandle,'OCIThreadHandleGet');
+    pointer(OCISubscriptionRegister) := GetProcedureAddress(OCILibraryHandle,'OCISubscriptionRegister');
+    pointer(OCISubscriptionPost) := GetProcedureAddress(OCILibraryHandle,'OCISubscriptionPost');
+    pointer(OCISubscriptionUnRegister) := GetProcedureAddress(OCILibraryHandle,'OCISubscriptionUnRegister');
+    pointer(OCISubscriptionDisable) := GetProcedureAddress(OCILibraryHandle,'OCISubscriptionDisable');
+    pointer(OCISubscriptionEnable) := GetProcedureAddress(OCILibraryHandle,'OCISubscriptionEnable');
+    pointer(OCIDateTimeGetTime) := GetProcedureAddress(OCILibraryHandle,'OCIDateTimeGetTime');
+    pointer(OCIDateTimeGetDate) := GetProcedureAddress(OCILibraryHandle,'OCIDateTimeGetDate');
+    pointer(OCIDateTimeGetTimeZoneOffset) := GetProcedureAddress(OCILibraryHandle,'OCIDateTimeGetTimeZoneOffset');
+    pointer(OCIDateTimeConstruct) := GetProcedureAddress(OCILibraryHandle,'OCIDateTimeConstruct');
+    pointer(OCIDateTimeSysTimeStamp) := GetProcedureAddress(OCILibraryHandle,'OCIDateTimeSysTimeStamp');
+    pointer(OCIDateTimeAssign) := GetProcedureAddress(OCILibraryHandle,'OCIDateTimeAssign');
+    pointer(OCIDateTimeToText) := GetProcedureAddress(OCILibraryHandle,'OCIDateTimeToText');
+    pointer(OCIDateTimeFromText) := GetProcedureAddress(OCILibraryHandle,'OCIDateTimeFromText');
+    pointer(OCIDateTimeCompare) := GetProcedureAddress(OCILibraryHandle,'OCIDateTimeCompare');
+    pointer(OCIDateTimeCheck) := GetProcedureAddress(OCILibraryHandle,'OCIDateTimeCheck');
+    pointer(OCIDateTimeConvert) := GetProcedureAddress(OCILibraryHandle,'OCIDateTimeConvert');
+    pointer(OCIDateTimeSubtract) := GetProcedureAddress(OCILibraryHandle,'OCIDateTimeSubtract');
+    pointer(OCIDateTimeIntervalAdd) := GetProcedureAddress(OCILibraryHandle,'OCIDateTimeIntervalAdd');
+    pointer(OCIDateTimeIntervalSub) := GetProcedureAddress(OCILibraryHandle,'OCIDateTimeIntervalSub');
+    pointer(OCIIntervalSubtract) := GetProcedureAddress(OCILibraryHandle,'OCIIntervalSubtract');
+    pointer(OCIIntervalAdd) := GetProcedureAddress(OCILibraryHandle,'OCIIntervalAdd');
+    pointer(OCIIntervalMultiply) := GetProcedureAddress(OCILibraryHandle,'OCIIntervalMultiply');
+    pointer(OCIIntervalDivide) := GetProcedureAddress(OCILibraryHandle,'OCIIntervalDivide');
+    pointer(OCIIntervalCompare) := GetProcedureAddress(OCILibraryHandle,'OCIIntervalCompare');
+    pointer(OCIIntervalFromNumber) := GetProcedureAddress(OCILibraryHandle,'OCIIntervalFromNumber');
+    pointer(OCIIntervalFromText) := GetProcedureAddress(OCILibraryHandle,'OCIIntervalFromText');
+    pointer(OCIIntervalToText) := GetProcedureAddress(OCILibraryHandle,'OCIIntervalToText');
+    pointer(OCIIntervalToNumber) := GetProcedureAddress(OCILibraryHandle,'OCIIntervalToNumber');
+    pointer(OCIIntervalCheck) := GetProcedureAddress(OCILibraryHandle,'OCIIntervalCheck');
+    pointer(OCIIntervalAssign) := GetProcedureAddress(OCILibraryHandle,'OCIIntervalAssign');
+    pointer(OCIIntervalSetYearMonth) := GetProcedureAddress(OCILibraryHandle,'OCIIntervalSetYearMonth');
+    pointer(OCIIntervalGetYearMonth) := GetProcedureAddress(OCILibraryHandle,'OCIIntervalGetYearMonth');
+    pointer(OCIIntervalSetDaySecond) := GetProcedureAddress(OCILibraryHandle,'OCIIntervalSetDaySecond');
+    pointer(OCIIntervalGetDaySecond) := GetProcedureAddress(OCILibraryHandle,'OCIIntervalGetDaySecond');
+    pointer(OCIDateTimeToArray) := GetProcedureAddress(OCILibraryHandle,'OCIDateTimeToArray');
+    pointer(OCIDateTimeFromArray) := GetProcedureAddress(OCILibraryHandle,'OCIDateTimeFromArray');
+    pointer(OCIDateTimeGetTimeZoneName) := GetProcedureAddress(OCILibraryHandle,'OCIDateTimeGetTimeZoneName');
+    pointer(OCIIntervalFromTZ) := GetProcedureAddress(OCILibraryHandle,'OCIIntervalFromTZ');
+    pointer(OCIConnectionPoolCreate) := GetProcedureAddress(OCILibraryHandle,'OCIConnectionPoolCreate');
+    pointer(OCIConnectionPoolDestroy) := GetProcedureAddress(OCILibraryHandle,'OCIConnectionPoolDestroy');
+    pointer(OCISessionPoolCreate) := GetProcedureAddress(OCILibraryHandle,'OCISessionPoolCreate');
+    pointer(OCISessionPoolDestroy) := GetProcedureAddress(OCILibraryHandle,'OCISessionPoolDestroy');
+    pointer(OCISessionGet) := GetProcedureAddress(OCILibraryHandle,'OCISessionGet');
+    pointer(OCISessionRelease) := GetProcedureAddress(OCILibraryHandle,'OCISessionRelease');
+    pointer(OCIAppCtxSet) := GetProcedureAddress(OCILibraryHandle,'OCIAppCtxSet');
+    pointer(OCIAppCtxClearAll) := GetProcedureAddress(OCILibraryHandle,'OCIAppCtxClearAll');
+    pointer(OCIPing) := GetProcedureAddress(OCILibraryHandle,'OCIPing');
+    pointer(OCIKerbAttrSet) := GetProcedureAddress(OCILibraryHandle,'OCIKerbAttrSet');
+    pointer(OCIDBStartup) := GetProcedureAddress(OCILibraryHandle,'OCIDBStartup');
+    pointer(OCIDBShutdown) := GetProcedureAddress(OCILibraryHandle,'OCIDBShutdown');
+    pointer(OCIClientVersion) := GetProcedureAddress(OCILibraryHandle,'OCIClientVersion');
+    pointer(OCIInitEventHandle) := GetProcedureAddress(OCILibraryHandle,'OCIInitEventHandle');
+
+    end;
+end;
+
+Procedure ReleaseOCI;
+
+begin
+  if RefCount > 0 then dec(RefCount);
+  if RefCount = 0 then
+    begin
+    if not UnloadLibrary(OCILibraryHandle) then inc(RefCount);
+    end;
+end;
+
+{$ENDIF}
+
+
+end.

+ 8 - 0
packages/base/oracle/oci.pp

@@ -0,0 +1,8 @@
+unit oci;
+
+{$UNDEF LinkDynamically}
+
+{$i oci.inc}
+
+end.
+

+ 183 - 0
packages/base/oracle/oci1.inc

@@ -0,0 +1,183 @@
+
+{
+  Automatically converted by H2Pas 1.0.0 from oci1.h
+  The following command line parameters were used:
+    -p
+    -D
+    -l
+    jojo.so
+    oci1.h
+}
+
+{$PACKRECORDS C}
+
+  {
+   * $Header: oci1.h 02-dec-97.19:29:14 skabraha Exp $
+    }
+  { Copyright (c) Oracle Corporation 1997, 1998. All Rights Reserved.  }  { NOTE:  See 'header_template.doc' in the 'doc' dve under the 'forms' 
+        directory for the header file template that includes instructions. 
+   }
+  { 
+     NAME 
+       oci1.h - Cartridge Service definitions
+  
+     DESCRIPTION 
+       <short description of component this file declares/defines> 
+  
+     RELATED DOCUMENTS 
+   
+     INSPECTION STATUS 
+       Inspection date: 
+       Inspection status: 
+       Estimated increasing cost defects per page: 
+       Rule sets: 
+   
+     ACCEPTANCE REVIEW STATUS 
+       Review date: 
+       Review status: 
+       Reviewers: 
+   
+     PUBLIC FUNCTION(S) 
+       <list of external functions declared/defined - with one-line descriptions>
+  
+     PRIVATE FUNCTION(S)
+       <list of static functions defined in .c file - with one-line descriptions>
+  
+     EXAMPLES
+  
+     NOTES
+       <other useful comments, qualifications, etc.>
+  
+     MODIFIED   (MM/DD/YY)
+     nramakri    01/16/98 - remove #ifdef NEVER clause
+     ewaugh      12/18/97 - Turn type wrappers into functions.
+     skabraha    12/02/97 - Adding data structures & constants for OCIFile
+     rhwu        12/02/97 - OCI Thread
+     nramakri    12/15/97 - move to core4
+     ewaugh      12/11/97 - add OCIFormat package constants
+     ssamu       12/10/97 - do not include s.h
+     nramakri    11/19/97 - add OCIExtract definitions
+     ssamu       11/14/97 - creation
+  
+   }
+  {---------------------------------------------------------------------------
+                       PUBLIC TYPES AND CONSTANTS
+    --------------------------------------------------------------------------- }
+  { Constants required by the OCIFormat package.  }
+  {
+  #define OCIFormatUb1(variable)      OCIFormatTUb1(),      &(variable)
+  #define OCIFormatUb2(variable)      OCIFormatTUb2(),      &(variable)
+  #define OCIFormatUb4(variable)      OCIFormatTUb4(),      &(variable)
+  #define OCIFormatUword(variable)    OCIFormatTUword(),    &(variable)
+  #define OCIFormatUbig_ora(variable) OCIFormatTUbig_ora(), &(variable)
+  #define OCIFormatSb1(variable)      OCIFormatTSb1(),      &(variable)
+  #define OCIFormatSb2(variable)      OCIFormatTSb2(),      &(variable)
+  #define OCIFormatSb4(variable)      OCIFormatTSb4(),      &(variable)
+  #define OCIFormatSword(variable)    OCIFormatTSword(),    &(variable)
+  #define OCIFormatSbig_ora(variable) OCIFormatTSbig_ora(), &(variable)
+  #define OCIFormatEb1(variable)      OCIFormatTEb1(),      &(variable)
+  #define OCIFormatEb2(variable)      OCIFormatTEb2(),      &(variable)
+  #define OCIFormatEb4(variable)      OCIFormatTEb4(),      &(variable)
+  #define OCIFormatEword(variable)    OCIFormatTEword(),    &(variable)
+  #define OCIFormatChar(variable)     OCIFormatTChar(),     &(variable)
+  #define OCIFormatText(variable)     OCIFormatTText(),      (variable)
+  #define OCIFormatDouble(variable)   OCIFormatTDouble(),   &(variable)
+  #define OCIFormatDvoid(variable)    OCIFormatTDvoid(),     (variable)
+  #define OCIFormatEnd                OCIFormatTEnd()
+   }
+
+  const
+     OCIFormatDP = 6;     
+  {----------------- Public Constants for OCIFile ------------------------- }
+  { flags for open. }
+  { flags for mode  }
+  { open for read only  }
+     OCI_FILE_READ_ONLY = 1;     
+  { open for write only  }
+     OCI_FILE_WRITE_ONLY = 2;     
+  { open for read & write  }
+     OCI_FILE_READ_WRITE = 3;     
+  { flags for create  }
+  { the file should exist  }
+     OCI_FILE_EXIST = 0;     
+  { create if the file doesn't exist  }
+     OCI_FILE_CREATE = 1;     
+  { the file should not exist  }
+     OCI_FILE_EXCL = 2;     
+  { create if the file doesn't exist, 
+                                            else truncate file the file to 0  }
+     OCI_FILE_TRUNCATE = 4;     
+  { open the file in append mode  }
+     OCI_FILE_APPEND = 8;     
+  { flags for seek  }
+  { seek from the beginning of the file  }
+     OCI_FILE_SEEK_BEGINNING = 1;     
+  { seek from the current position  }
+     OCI_FILE_SEEK_CURRENT = 2;     
+  { seek from the end of the file  }
+     OCI_FILE_SEEK_END = 3;     
+  { seek forward		 }
+     OCI_FILE_FORWARD = 1;     
+  { seek backward		 }
+     OCI_FILE_BACKWARD = 2;     
+  { file type  }
+  { binary file  }
+     OCI_FILE_BIN = 0;     
+  { text file  }
+     OCI_FILE_TEXT = 1;     
+  { standard i/p  }
+     OCI_FILE_STDIN = 2;     
+  { standard o/p  }
+     OCI_FILE_STDOUT = 3;     
+  { standard error  }
+     OCI_FILE_STDERR = 4;     
+  { Represents an open file  }
+  type
+    POCIFileObject = pointer;
+
+  {--------------------- OCI Thread Object Definitions------------------------ }
+    POCIThreadContext = pointer;  // OCIThread Context
+    POCIThreadMutex = pointer;    // OCIThread Mutual Exclusion Lock
+    POCIThreadKey = pointer;      // OCIThread Key for Thread-Specific Data
+    POCIThreadID = pointer;       // OCIThread Thread ID
+    POCIThreadHandle = pointer;   // OCIThread Thread Handle
+  {-------------------- OCI Thread Callback Function Pointers ---------------- }
+  { OCIThread Key Destructor Function Type  }
+
+     OCIThreadKeyDestFunc = procedure ;cdecl;
+  { Flags passed into OCIExtractFromXXX routines to direct processing          }
+  { matching is case sensitive      }
+
+  const
+     OCI_EXTRACT_CASE_SENSITIVE = $1;     
+  { unique abbreviations for keys
+                                                are allowed                     }
+     OCI_EXTRACT_UNIQUE_ABBREVS = $2;     
+  { if multiple values for a key
+                                                exist, this determines if the 
+                                                new value should be appended 
+                                                to (or replace) the current 
+                                                list of values                  }
+     OCI_EXTRACT_APPEND_VALUES = $4;     
+  { Constants passed into OCIExtractSetKey routine  }
+  { key can accept multiple values  }
+     OCI_EXTRACT_MULTIPLE = $8;     
+  { key type is boolean             }
+     OCI_EXTRACT_TYPE_BOOLEAN = 1;     
+  { key type is string              }
+     OCI_EXTRACT_TYPE_STRING = 2;     
+  { key type is integer             }
+     OCI_EXTRACT_TYPE_INTEGER = 3;     
+  { key type is ocinum              }
+     OCI_EXTRACT_TYPE_OCINUM = 4;     
+  {---------------------------------------------------------------------------
+                       PRIVATE TYPES AND CONSTANTS
+    --------------------------------------------------------------------------- }
+  {---------------------------------------------------------------------------
+                             PUBLIC FUNCTIONS
+    --------------------------------------------------------------------------- }
+  {---------------------------------------------------------------------------
+                            PRIVATE FUNCTIONS
+    --------------------------------------------------------------------------- }
+
+

+ 10997 - 0
packages/base/oracle/ociap.inc

@@ -0,0 +1,10997 @@
+
+{
+  Automatically converted by H2Pas 1.0.0 from ociap.h
+  The following command line parameters were used:
+    -p
+    -D
+    -l
+    jojo.so
+    ociap.h
+}
+
+  Type
+//  Pboolean  = ^boolean;
+//  Ppdvoid  = ^Pdvoid;
+
+  PPub4 = ^Pub4;
+  PPub2 = ^Pub2;
+  
+  size_t = ptrint;
+  psize_t = ^ptrint;
+{  PLda_Def  = ^Lda_Def;
+  PnzttBufferBlock  = ^nzttBufferBlock;
+  PnzttIdentity  = ^nzttIdentity;
+  PnzttIdentityDesc  = ^nzttIdentityDesc;
+  PnzttPersona  = ^nzttPersona;
+  PnzttPersonaDesc  = ^nzttPersonaDesc;
+  PnzttProtInfo  = ^nzttProtInfo;
+  Pnztttdufmt  = ^nztttdufmt;
+  PnzttWallet  = ^nzttWallet;
+  POCIAdmin  = ^OCIAdmin;
+  POCIAnyData  = ^OCIAnyData;
+  POCIAnyDataSet  = ^OCIAnyDataSet;
+  POCIAQAgent  = ^OCIAQAgent;
+  POCIAQDeqOptions  = ^OCIAQDeqOptions;
+  POCIAQEnqOptions  = ^OCIAQEnqOptions;
+  POCIAQLisMsgProps  = ^OCIAQLisMsgProps;
+  POCIAQListenOpts  = ^OCIAQListenOpts;
+  POCIAQMsgProperties  = ^OCIAQMsgProperties;
+  POCIAuthInfo  = ^OCIAuthInfo;
+  POCIBind  = ^OCIBind;
+  POCICPool  = ^OCICPool;
+  POCIDateTime  = ^OCIDateTime;
+  POCIDefine  = ^OCIDefine;
+  POCIDescribe  = ^OCIDescribe;
+  POCIEnv  = ^OCIEnv;
+  POCIError  = ^OCIError;
+  POCIEvent  = ^OCIEvent;
+  POCIFileObject  = ^OCIFileObject;
+  POCIFocbkStruct  = ^OCIFocbkStruct;
+  POCIInd  = ^OCIInd;
+  POCIInterval  = ^OCIInterval;
+  POCILobLocator  = ^OCILobLocator;
+  POCIMsg  = ^OCIMsg;
+  POCINumber  = ^OCINumber;
+  POCIPicklerFdo  = ^OCIPicklerFdo;
+  POCIPicklerImage  = ^OCIPicklerImage;
+  POCIPicklerTds  = ^OCIPicklerTds;
+  POCIPicklerTdsCtx  = ^OCIPicklerTdsCtx;
+//  POCIPicklerTdsElement  = ^OCIPicklerTdsElement;
+  POCIRaw  = ^OCIRaw;
+  POCIResult  = ^OCIResult;
+  POCIRowid  = ^OCIRowid;
+  POCISecurity  = ^OCISecurity;
+  POCIServer  = ^OCIServer;
+  POCISession  = ^OCISession;
+  POCISnapshot  = ^OCISnapshot;
+  POCISPool  = ^OCISPool;
+  POCIStmt  = ^OCIStmt;
+  POCISubscription  = ^OCISubscription;
+  POCISvcCtx  = ^OCISvcCtx;
+  POCIThreadHandle  = ^OCIThreadHandle;
+  POCIThreadId  = ^OCIThreadId;
+  POCIThreadKey  = ^OCIThreadKey;
+  POCIThreadMutex  = ^OCIThreadMutex;
+  POCITrans  = ^OCITrans;
+  POCIType  = ^OCIType;
+  POCITypeCode  = ^OCITypeCode;
+  POCIUcb  = ^OCIUcb;
+  POCIUserCallback  = ^OCIUserCallback;
+//  POCIWchar  = ^OCIWchar;
+  POraText  = ^OraText;
+  Poraub8  = ^oraub8;
+  Psb1  = ^sb1;
+  Psb2  = ^sb2;
+  Psb4  = ^sb4;
+  Psbig_ora  = ^sbig_ora;
+  Psize_t  = ^size_t;
+  Psword  = ^sword;
+  Ptext  = ^text;
+  Pub1  = ^ub1;
+  Pub2  = ^ub2;
+  Pub4  = ^ub4;
+  Pubig_ora  = ^ubig_ora;
+  Puword  = ^uword;
+}
+
+{$PACKRECORDS C}
+
+  {
+   * $Header: ociap.h 11-aug-2004.18:52:42 rvissapr Exp $
+    }
+  { Copyright (c) 1996, 2004, Oracle. All rights reserved.   }
+  { NOTE:  See 'header_template.doc' in the 'doc' dve under the 'forms' 
+        directory for the header file template that includes instructions. 
+   }
+  { 
+     NAME 
+       ociap.h - Oracle Call Interface - Ansi Prototypes
+  
+     DESCRIPTION 
+       <short description of component this file declares/defines> 
+  
+     RELATED DOCUMENTS 
+   
+     INSPECTION STATUS 
+       Inspection date: 
+       Inspection status: 
+       Estimated increasing cost defects per page: 
+       Rule sets: 
+   
+     ACCEPTANCE REVIEW STATUS 
+       Review date: 
+       Review status: 
+       Reviewers: 
+   
+     PUBLIC FUNCTION(S) 
+       <list of external functions declared/defined - with one-line descriptions>
+  
+     PRIVATE FUNCTION(S)
+       <list of static functions defined in .c file - with one-line descriptions>
+  
+     EXAMPLES
+  
+     NOTES
+       <other useful comments, qualifications, etc.>
+  
+     MODIFIED   (MM/DD/YY)
+  
+      nbhatt   06/17/04 - merge conflicts 
+      nbhatt   05/24/04 - merge conflicts 
+     weiwang     05/06/04 - add OCIAQListen2 
+     rvissapr    06/21/04 - add OCIAppCtx API 
+     debanerj    05/17/04 - 13064: LOB array Read and Write
+     aahluwal    06/02/04 - [OCI Events]: add OCIInitEventHandle
+     nikeda      05/28/04 - grabtrans 'nikeda_oci_events_copy' 
+     nikeda      05/13/04 - [OCI Events] Rename HACBK->EVTCBK, HACTX->EVTCTX 
+     nikeda      05/10/04 - [OCI Events] code review changes 
+     aahluwal    04/09/04 - [OCI Events]: add OCIHAServerHandleGet
+     nikeda      03/18/04 - [OCI Events] New Server Handle Callback 
+     dfrumkin    12/04/03 - Add OCIDBStartup, OCIDBShutdown 
+     jciminsk    12/12/03 - merge from RDBMS_MAIN_SOLARIS_031209 
+     sgollapu    06/26/03 - Change OCIPing prototype
+     sgollapu    05/05/03 - Add OCIPing
+     debanerj    01/16/03 - Bug 2753018: Lob Locator parameter for 
+                            OCILobGetStorageLimit
+     rpingte     05/06/04 - add OCIClientVersion
+     debanerj    08/26/03 - 6003: Lob interface changes
+     sgollapu    06/23/03 - Add OCIPing
+     debanerj    01/16/03 - Bug 2753018: Lob Locator parameter for 
+                            OCILobGetStorageLimit
+     tkeefe      02/17/03 - bug-2773794: Add new interface for setting Kerb attrs
+     ataracha    01/03/03 - Move OCIXMLType functions to ocixml.h
+     akatti      11/28/02 - [2521361]:add OCIRowidToChar prototype
+     chliang     10/23/02 - add OCIFetchRowCallback
+     cparampa    10/13/02 - Fix the prototype of OCIAQListen(ansi prototype)
+     chliang     10/12/02 - add OCIBindRowCallback
+     debanerj    09/30/02 - Unlimited size LOB 6003
+     thoang      09/25/02 - Add csid to XMLType create functions
+     thoang      04/19/02 - Add OCIXMLTypeGetNS
+     aahluwal    08/09/02 - adding OCIAQDeqArray
+     aahluwal    06/03/02 - bug 2360115
+     skabraha    04/16/02 - fix compiler warnings
+     sichandr    02/12/02 - fix OCIXMLTypeExists
+     gayyappa    02/01/02 - fix 2210776 : change Dom to DOM 
+     sichandr    10/24/01 - OCISvcCtx for XMLType create routines
+     schandir    09/14/01 - Add prototypes for Stmt Caching
+     abande      09/04/01 - Add Prototypes for Session Pooling Methods
+     stakeda     09/12/01 - add OCINlsCharSetConvert
+     whe         08/28/01 - add OCIEnvNlsCreate
+     wzhang      08/22/01 - Add OCINlsCharSetNameToId.
+     whe         10/05/01 - add prototype for OCIXMLType functions
+     mdmehta     04/06/01 - Bug 1683763, OCIDateTimeToText: buf_size to ub4*
+     schandir    12/12/00 - modify the ociconnectionpoolcreate() interface.
+     porangas    12/04/00 - Forward merge bug#974710 to 9i
+     rpingte     11/29/00 - Fix bug# 1485795.
+     gtarora     11/30/00 - fix comment for OCILobIsTemporary
+     akatti      11/07/00 - [1198379]:add OCIRowidToChar
+     bpalaval    10/15/00 - Forward merge 892654.
+     kmohan      09/18/00 - add OCILogon2
+     etucker     07/28/00 - add OCIIntervalFromTZ
+     vjayaram    07/18/00 - add connection pooling changes
+     etucker     07/13/00 - add dls apis for oci
+     hmasaki     07/05/00 - fix 1230846: forward merge into 8.2
+     mbastawa    06/05/00 - add OCIStmtFetch2
+     rxgovind    06/07/00 - update OCIAnyData interfaces
+     rxgovind    05/04/00 - add OCIAnyDataSet interfaces
+     rkasamse    05/01/00 - remove attrno from OCIAnyDataAttrGet
+     rkasamse    03/13/00 - add prototype s for OCCIAnyData
+     slari       09/01/99 - remove OCIEnvCallback
+     slari       08/23/99 - add OCIUcb in user callback functions
+     dsaha       07/07/99 - Add OCIFEnvCreate for forms
+     vyanaman    06/21/99 - Change OCI DateTime/Interval APIs.
+     esoyleme    07/01/99 - expose MTS performance enhancements                  
+     whe         06/14/99 - bug727872:add CONST to match definitions
+     kkarun      02/23/99 - Fix OCIDateTime APIs
+     jiyang      12/07/98 - Add comments for OCI_NLS_DUAL_CURRENCY
+     aroy        12/01/98 - add OCIEnvCreate
+     slari       11/23/98 - use ORASTDARG
+     slari       11/21/98 - replace ellipsis by arglist in OCIUserCallback
+     thchang     10/20/98 - correct comment on OCILobCreateTemporary
+     slari       09/08/98 - allow envh to receive error info also in CallbackReg/
+     kkarun      09/02/98 - Change const to CONST
+     aroy        08/04/98 - add OCITerminate calls                               
+     nramakri    06/25/98 - remove CONST from some OCIPickler APIs
+     jiyang      06/22/98 - Fix a lint error
+     nmallava    06/08/98 - ociistemporary -> envhp
+     jhasenbe    05/27/98 - Remove definitions for U-Calls (Unicode)
+     nmallava    05/18/98 - add comments
+     sgollapu    05/19/98 - Change text to OraText
+     aroy        04/20/98 - merge forward 8.0.5 -> 8.1.3
+     nbhatt      05/14/98 -  aq listen call
+     lchidamb    03/02/98 - Client Notification prototypes
+     vyanaman    04/19/98 - System Timestamp
+     kkarun      04/17/98 - Add more Interval functions
+     vyanaman    04/17/98 - Fix min (proc error)
+     vyanaman    04/16/98 - Add get/set TZ
+     kkarun      04/13/98 - Add Datetime prototypes
+     rkasamse    04/13/98 - change OCIEnv* to dvoid* for context/memory cart serv
+     rkasamse    04/15/98 - chage pickler cart interface
+     slari       03/20/98 - change proto of OCIUserCallback
+     slari       02/17/98 - add OCIUserCallback
+     jiyang      04/02/98 - Accept both env and user handles for NLS
+     rkasamse    03/20/98 - remove prototypes for OCIMemoryDuration* functions.
+     tsaulys     03/20/98 - use environment or session handle
+     nmallava    04/09/98 - OCILobLocatorAssign
+     nmallava    04/07/98 - lobgetchunksize and writeappend apis
+     jhasenbe    04/06/98 - Add new interfaces for Unicode support
+     nmallava    03/17/98 - add interfaces
+     nmallava    03/16/98 - add open/close apis
+     nmallava    03/10/98 - add temporary lobs apis
+     sgollapu    07/10/97 - Add OCIReset
+     sgollapu    02/09/98 - OCI non-blocking
+     nramakri    01/16/98 - remove #ifdef NEVER clause for OCIExtract
+     rmurthy     01/08/98 - OCIContextGenerateKey: change ub1 to ub4
+     ewaugh      12/18/97 - Turn type wrappers into functions.
+     skabraha    12/02/97 - adding OCIFile functions
+     rhwu        12/02/97 - add OCI Thread
+     nramakri    12/15/97 - move to core4
+     nramakri    12/11/97 - modify OCIExtract prototype
+     ewaugh      12/10/97 - add OCIFormat prototypes
+     nmallava    12/17/97 - Add ilob open and close apis
+     rkasamse    12/03/97 - Change some of the function names for pickler cartrid
+     nramakri    11/12/97 - add OCIExtract prototypes
+     rkasamse    11/21/97 - add prototypes for memory cartridge services and cont
+     rkasamse    11/03/97 - Add pickler cartridge interfaces.
+     jiyang      11/11/97 - Add NLS service for cartridge
+     tanguyen    08/19/97 -
+     cxcheng     07/30/97 - replace OCISvcCtx with OCISvcCtx
+     schandra    06/25/97 - AQ OCI interface
+     bnainani    07/21/97 - add prototypes for Oracle XA extensions
+     esoyleme    05/13/97 - move failover callback prototype
+     skmishra    05/06/97 - stdc compiler fixes
+     skmishra    04/24/97 - C++ Compatibility changes
+     skotsovo    04/21/97 - make lob parameter names consistent
+     rwhitman    04/16/97 - Fix LOB prototypes - Olint OCI 8.0.3
+     ramkrish    04/15/97 - Add free flag to OCILobFlushBuffer
+     dchatter    04/10/97 - add nzt.h inclusion
+     cxcheng     04/09/97 - change objnamp from CONST text* to dvoid*
+     cxcheng     04/08/97 - fix prototype of OCIDescribeAny()
+     skotsovo    03/31/97 - remove OCILobLocatorSize
+     skotsovo    03/27/97 - add OCILobLoadFromFile
+     bcchang     02/18/97 - Fix syntax error
+     dchatter    01/13/97 - fix comments on LOB calls
+     aroy        01/10/97 - remove ocilobfilecreate delete
+     sgollapu    12/27/96 - Correct OCILogon prototype
+     dchatter    01/04/97 - comments to describe the functions
+     sgollapu    11/25/96 - Change OCILobFileIsExistent
+     schandra    11/18/96 - Remove xa.h include
+     sgollapu    11/09/96 - Change prototype of OCIDescribeAny
+     dchatter    10/31/96 - delete CONST from lob write cb fn
+     dchatter    10/30/96 - more changes
+     dchatter    10/26/96 - lob/file long name corrections
+     slari       10/16/96 - delete unused calls
+     rwessman    10/29/96 - Fixed OCISecurityGetIdentity prototype
+     bcchang     10/25/96 - Fix syntax error
+     sgollapu    10/22/96 - Add OCILogon and OCILogoff
+     rwessman    10/16/96 - Added cryptographic and digital signature functions
+     sgollapu    10/10/96 - Add ocibdp and ocibdn
+     rxgovind    10/07/96 - add oci file calls
+     skotsovo    10/01/96 - move orl lob fnts to oci
+     skotsovo    09/20/96 - in OCILobGetLength(), remove the 'isnull' parameter.
+     aroy        08/29/96 - change prototype for Nchar Lob support
+     dchatter    08/21/96 - OCIResultSetToStmt prototype change
+     sthakur     08/14/96 - add OCIParamSet
+     schandra    07/26/96 - TX OCI return values - sb4->sword
+     aroy        07/17/96 - terminology change: OCILobLocator => OCILobLocator
+     dchatter    07/01/96 - create ANSI prototypes
+     dchatter    07/01/96 - Creation
+  
+   }
+{$ifndef OCIAP_ORACLE}
+{$define OCIAP_ORACLE}  
+{$ifndef ORASTDARG}
+{ $include <stdarg.h>}
+{$define ORASTDARG}  
+{$endif}
+{$ifndef OCIDFN}
+{ $include <ocidfn.h>}
+{$endif}
+{$include nzt.inc}
+  { NZT_ORACLE  }
+{$ifndef ORT_ORACLE}
+{ $include <ort.h>}
+{$endif}
+  {---------------------------------------------------------------------------
+                       PUBLIC TYPES AND CONSTANTS
+    --------------------------------------------------------------------------- }
+  {---------------------------------------------------------------------------
+                       PRIVATE TYPES AND CONSTANTS
+    --------------------------------------------------------------------------- }
+  {---------------------------------------------------------------------------
+                             PUBLIC FUNCTIONS
+    --------------------------------------------------------------------------- }
+  {****************************************************************************
+                                DESCRIPTION
+  ******************************************************************************
+  Note: the descriptions of the functions are alphabetically arranged. Please 
+  maintain the arrangement when adding a new function description. The actual 
+  prototypes are below this comment section and donot follow any alphabetical 
+  ordering. 
+  
+  
+  --------------------------------OCIAttrGet------------------------------------
+  
+  OCIAttrGet()
+  Name
+  OCI Attribute Get
+  Purpose
+  This call is used to get a particular attribute of a handle. 
+  Syntax
+  sword OCIAttrGet ( CONST dvoid    *trgthndlp,
+                   ub4            trghndltyp,
+                   dvoid          *attributep,
+                   ub4            *sizep,
+                   ub4            attrtype,
+                   OCIError       *errhp );
+  Comments
+  This call is used to get a particular attribute of a handle.
+  See Appendix B,  "Handle Attributes",  for a list of handle types and their 
+  readable attributes.
+  Parameters
+  trgthndlp (IN) - is the pointer to a handle type. 
+  trghndltyp (IN) - is the handle type. 
+  attributep (OUT) - is a pointer to the storage for an attribute value. The 
+  attribute value is filled in. 
+  sizep (OUT) - is the size of the attribute value. 
+  This can be passed in as NULL for most parameters as the size is well known. 
+  For text* parameters, a pointer to a ub4 must be passed in to get the length 
+  of the string. 
+  attrtype (IN) - is the type of attribute.
+  errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
+  diagnostic information in the event of an error.
+  Related Functions
+  OCIAttrSet()
+  
+  --------------------------------OCIAttrSet------------------------------------
+  
+  
+  OCIAttrSet()
+  Name
+  OCI Attribute Set
+  Purpose
+  This call is used to set a particular attribute of a handle or a descriptor. 
+  Syntax
+  sword OCIAttrSet ( dvoid       *trgthndlp,
+                   ub4         trghndltyp,
+                   dvoid       *attributep,
+                   ub4         size,
+                   ub4         attrtype,
+                   OCIError    *errhp );
+  Comments
+  This call is used to set a particular attribute of a handle or a descriptor. 
+  See Appendix B for a list of handle types and their writeable attributes.
+  Parameters
+  trghndlp (IN/OUT) - the pointer to a handle type whose attribute gets 
+  modified. 
+  trghndltyp (IN/OUT) - is the handle type. 
+  attributep (IN) - a pointer to an attribute value. 
+  The attribute value is copied into the target handle. If the attribute value 
+  is a pointer, then only the pointer is copied, not the contents of the pointer.
+  size (IN) - is the size of an attribute value. This can be passed in as 0 for 
+  most attributes as the size is already known by the OCI library. For text*
+  attributes, a ub4 must be passed in set to the length of the string. 
+  attrtype (IN) - the type of attribute being set.
+  errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
+  diagnostic information in the event of an error. 
+  Related Functions
+  OCIAttrGet()
+  
+  
+  
+  --------------------------------OCIBindArrayOfStruct--------------------------
+  
+  
+  
+  OCIBindArrayOfStruct()
+  Name
+  OCI Bind for Array of Structures
+  Purpose
+  This call sets up the skip parameters for a static array bind.
+  Syntax
+  sword OCIBindArrayOfStruct ( OCIBind     *bindp,
+                             OCIError    *errhp,
+                             ub4         pvskip, 
+                             ub4         indskip, 
+                             ub4         alskip, 
+                             ub4         rcskip );
+  Comments
+  This call sets up the skip parameters necessary for a static array bind.
+  This call follows a call to OCIBindByName() or OCIBindByPos(). The bind 
+  handle returned by that initial bind call is used as a parameter for the 
+  OCIBindArrayOfStruct() call.
+  For information about skip parameters, see the section "Arrays of Structures" 
+  on page 4-16.
+  Parameters
+  bindp (IN) - the handle to a bind structure. 
+  errhp (IN) - an error handle which can be passed to OCIErrorGet() for 
+  diagnostic information in the event of an error.
+  pvskip (IN) - skip parameter for the next data value. 
+  indskip (IN) - skip parameter for the next indicator value or structure. 
+  alskip (IN) - skip parameter for the next actual length value. 
+  rcskip (IN) - skip parameter for the next column-level return code value. 
+  Related Functions
+  OCIAttrGet()
+  
+  
+  --------------------------------OCIBindByName---------------------------------
+  
+  OCIBindByName()
+  Name
+  OCI Bind by Name
+  Purpose
+  Creates an association between a program variable and a placeholder in a SQL 
+  statement or PL/SQL block.
+  Syntax
+  sword OCIBindByName (
+                OCIStmt       *stmtp, 
+                OCIBind       **bindp,
+                OCIError      *errhp,
+                CONST OraText    *placeholder,
+                sb4           placeh_len,
+                dvoid         *valuep,
+                sb4           value_sz,
+                ub2           dty,
+                dvoid         *indp,
+                ub2           *alenp,
+                ub2           *rcodep,
+                ub4           maxarr_len,
+                ub4           *curelep, 
+                ub4           mode ); 
+  Description
+  This call is used to perform a basic bind operation. The bind creates an 
+  association between the address of a program variable and a placeholder in a 
+  SQL statement or PL/SQL block. The bind call also specifies the type of data 
+  which is being bound, and may also indicate the method by which data will be 
+  provided at runtime.
+  This function also implicitly allocates the bind handle indicated by the bindp 
+  parameter.
+  Data in an OCI application can be bound to placeholders statically or 
+  dynamically. Binding is static when all the IN bind data and the OUT bind 
+  buffers are well-defined just before the execute. Binding is dynamic when the 
+  IN bind data and the OUT bind buffers are provided by the application on 
+  demand at execute time to the client library. Dynamic binding is indicated by 
+  setting the mode parameter of this call to OCI_DATA_AT_EXEC.
+  Related Functions: For more information about dynamic binding, see 
+  the section "Runtime Data Allocation and Piecewise Operations" on 
+  page 5-16.
+  Both OCIBindByName() and OCIBindByPos() take as a parameter a bind handle, 
+  which is implicitly allocated by the bind call A separate bind handle is 
+  allocated for each placeholder the application is binding.
+  Additional bind calls may be required to specify particular attributes 
+  necessary when binding certain data types or handling input data in certain 
+  ways:
+  If arrays of structures are being utilized, OCIBindArrayOfStruct() must 
+  be called to set up the necessary skip parameters.
+  If data is being provided dynamically at runtime, and the application 
+  will be using user-defined callback functions, OCIBindDynamic() must 
+  be called to register the callbacks.
+  If a named data type is being bound, OCIBindObject() must be called to 
+  specify additional necessary information.
+  Parameters
+  stmth (IN/OUT) - the statement handle to the SQL or PL/SQL statement 
+  being processed.
+  bindp (IN/OUT) - a pointer to a pointer to a bind handle which is implicitly 
+  allocated by this call.  The bind handle  maintains all the bind information 
+  for this particular input value. The handle is feed implicitly when the 
+  statement handle is deallocated.
+  errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
+  diagnostic information in the event of an error. 
+  placeholder (IN) - the placeholder attributes are specified by name if 
+  ocibindn() is being called.
+  placeh_len (IN) - the length of the placeholder name specified in placeholder.
+  valuep (IN/OUT) - a pointer to a data value or an array of data values of the 
+  type specified in the dty parameter. An array of data values can be specified 
+  for mapping into a PL/SQL table or for providing data for SQL multiple-row 
+  operations. When an array of bind values is provided, this is called an array 
+  bind in OCI terms. Additional attributes of the array bind (not bind to a 
+  column of ARRAY type) are set up in OCIBindArrayOfStruct() call. 
+  For a REF, named data type  bind, the valuep parameter is used only for IN 
+  bind data. The pointers to OUT buffers are set in the pgvpp parameter 
+  initialized by OCIBindObject(). For named data type and REF binds, the bind 
+  values are unpickled into the Object Cache. The OCI object navigational calls 
+  can then be used to navigate the objects and the refs in the Object Cache.
+  If the OCI_DATA_AT_EXEC mode is specified in the mode parameter, valuep 
+  is ignored for all data types. OCIBindArrayOfStruct() cannot be used and 
+  OCIBindDynamic() must be invoked to provide callback functions if desired. 
+  value_sz (IN) - the size of a data value. In the case of an array bind, this is
+  the maximum size of any element possible with the actual sizes being specified 
+  in the alenp parameter. 
+  If the OCI_DATA_AT_EXEC mode is specified, valuesz defines the maximum 
+  size of the data that can be ever provided at runtime for data types other than
+  named data types or REFs. 
+  dty (IN) - the data type of the value(s) being bound. Named data types 
+  (SQLT_NTY) and REFs (SQLT_REF) are valid only if the application has been 
+  initialized in object mode. For named data types, or REFs, additional calls 
+  must be made with the bind handle to set up the datatype-specific attributes.
+  indp (IN/OUT) - pointer to an indicator variable or array. For scalar data 
+  types, this is a pointer to sb2 or an array of sb2s. For named data types, 
+  this pointer is ignored and the actual pointer to the indicator structure or 
+  an array of indicator structures is initialized by OCIBindObject(). 
+  Ignored for dynamic binds.
+  See the section "Indicator Variables" on page 2-43 for more information about 
+  indicator variables.
+  alenp (IN/OUT) - pointer to array of actual lengths of array elements. Each 
+  element in alenp is the length of the data in the corresponding element in the 
+  bind value array before and after the execute. This parameter is ignored for 
+  dynamic binds.
+  rcodep (OUT) - pointer to array of column level return codes. This parameter 
+  is ignored for dynamic binds.
+  maxarr_len (IN) - the maximum possible number of elements of type dty in a 
+  PL/SQL binds. This parameter is not required for non-PL/SQL binds. If 
+  maxarr_len is non-zero, then either OCIBindDynamic() or 
+  OCIBindArrayOfStruct() can be invoked to set up additional bind attributes. 
+  curelep(IN/OUT) - a pointer to the actual number of elements. This parameter 
+  is only required for PL/SQL binds.
+  mode (IN) - the valid modes for this parameter are:
+  OCI_DEFAULT. This is default mode.
+  OCI_DATA_AT_EXEC. When this mode is selected, the value_sz 
+  parameter defines the maximum size of the data that can be ever 
+  provided at runtime. The application must be ready to provide the OCI 
+  library runtime IN data buffers at any time and any number of times. 
+  Runtime data is provided in one of the two ways:
+  callbacks using a user-defined function which must be registered 
+  with a subsequent call to OCIBindDynamic(). 
+  a polling mechanism using calls supplied by the OCI. This mode 
+  is assumed if no callbacks are defined.
+  For more information about using the OCI_DATA_AT_EXEC mode, see 
+  the section "Runtime Data Allocation and Piecewise Operations" on 
+  page 5-16.
+  When the allocated buffers are not required any more, they should be 
+  freed by the client. 
+  Related Functions
+  OCIBindDynamic(), OCIBindObject(), OCIBindArrayOfStruct(), OCIAttrGet()
+  
+  
+  
+  -------------------------------OCIBindByPos-----------------------------------
+  
+  
+  OCIBindByPos()
+  Name
+  OCI Bind by Position
+  Purpose
+  Creates an association between a program variable and a placeholder in a SQL 
+  statement or PL/SQL block.
+  Syntax
+  sword OCIBindByPos ( 
+                OCIStmt      *stmtp, 
+                OCIBind      **bindp,
+                OCIError     *errhp,
+                ub4          position,
+                dvoid        *valuep,
+                sb4          value_sz,
+                ub2          dty,
+                dvoid        *indp,
+                ub2          *alenp,
+                ub2          *rcodep,
+                ub4          maxarr_len,
+                ub4          *curelep, 
+                ub4          mode);
+  
+  Description
+  This call is used to perform a basic bind operation. The bind creates an 
+  association between the address of a program variable and a placeholder in a 
+  SQL statement or PL/SQL block. The bind call also specifies the type of data 
+  which is being bound, and may also indicate the method by which data will be 
+  provided at runtime.
+  This function also implicitly allocates the bind handle indicated by the bindp 
+  parameter.
+  Data in an OCI application can be bound to placeholders statically or 
+  dynamically. Binding is static when all the IN bind data and the OUT bind 
+  buffers are well-defined just before the execute. Binding is dynamic when the 
+  IN bind data and the OUT bind buffers are provided by the application on 
+  demand at execute time to the client library. Dynamic binding is indicated by 
+  setting the mode parameter of this call to OCI_DATA_AT_EXEC.
+  Related Functions: For more information about dynamic binding, see 
+  the section "Runtime Data Allocation and Piecewise Operations" on 
+  page 5-16
+  Both OCIBindByName() and OCIBindByPos() take as a parameter a bind handle, 
+  which is implicitly allocated by the bind call A separate bind handle is 
+  allocated for each placeholder the application is binding.
+  Additional bind calls may be required to specify particular attributes 
+  necessary when binding certain data types or handling input data in certain 
+  ways:
+  If arrays of structures are being utilized, OCIBindArrayOfStruct() must 
+  be called to set up the necessary skip parameters.
+  If data is being provided dynamically at runtime, and the application 
+  will be using user-defined callback functions, OCIBindDynamic() must 
+  be called to register the callbacks.
+  If a named data type is being bound, OCIBindObject() must be called to 
+  specify additional necessary information.
+  Parameters
+  stmth (IN/OUT) - the statement handle to the SQL or PL/SQL statement 
+  being processed.
+  bindp (IN/OUT) - a pointer to a pointer to a bind handle which is implicitly 
+  allocated by this call.  The bind handle  maintains all the bind information 
+  for this particular input value. The handle is feed implicitly when the 
+  statement handle is deallocated.
+  errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
+  diagnostic information in the event of an error. 
+  position (IN) - the placeholder attributes are specified by position if 
+  ocibindp() is being called.
+  valuep (IN/OUT) - a pointer to a data value or an array of data values of the 
+  type specified in the dty parameter. An array of data values can be specified 
+  for mapping into a PL/SQL table or for providing data for SQL multiple-row 
+  operations. When an array of bind values is provided, this is called an array 
+  bind in OCI terms. Additional attributes of the array bind (not bind to a 
+  column of ARRAY type) are set up in OCIBindArrayOfStruct() call. 
+  For a REF, named data type  bind, the valuep parameter is used only for IN 
+  bind data. The pointers to OUT buffers are set in the pgvpp parameter 
+  initialized by OCIBindObject(). For named data type and REF binds, the bind 
+  values are unpickled into the Object Cache. The OCI object navigational calls 
+  can then be used to navigate the objects and the refs in the Object Cache.
+  If the OCI_DATA_AT_EXEC mode is specified in the mode parameter, valuep 
+  is ignored for all data types. OCIBindArrayOfStruct() cannot be used and 
+  OCIBindDynamic() must be invoked to provide callback functions if desired. 
+  value_sz (IN) - the size of a data value. In the case of an array bind, this is
+  the maximum size of any element possible with the actual sizes being specified
+  in the alenp parameter. 
+  If the OCI_DATA_AT_EXEC mode is specified, valuesz defines the maximum 
+  size of the data that can be ever provided at runtime for data types other than
+  named data types or REFs. 
+  dty (IN) - the data type of the value(s) being bound. Named data types 
+  (SQLT_NTY) and REFs (SQLT_REF) are valid only if the application has been 
+  initialized in object mode. For named data types, or REFs, additional calls 
+  must be made with the bind handle to set up the datatype-specific attributes.
+  indp (IN/OUT) - pointer to an indicator variable or array. For scalar data 
+  types, this is a pointer to sb2 or an array of sb2s. For named data types, 
+  this pointer is ignored and the actual pointer to the indicator structure or 
+  an array of indicator structures is initialized by OCIBindObject(). Ignored 
+  for dynamic binds.
+  See the section "Indicator Variables" on page 2-43 for more information about 
+  indicator variables.
+  alenp (IN/OUT) - pointer to array of actual lengths of array elements. Each 
+  element in alenp is the length of the data in the corresponding element in the 
+  bind value array before and after the execute. This parameter is ignored for 
+  dynamic binds.
+  rcodep (OUT) - pointer to array of column level return codes. This parameter 
+  is ignored for dynamic binds.
+  maxarr_len (IN) - the maximum possible number of elements of type dty in a 
+  PL/SQL binds. This parameter is not required for non-PL/SQL binds. If 
+  maxarr_len is non-zero, then either OCIBindDynamic() or 
+  OCIBindArrayOfStruct() can be invoked to set up additional bind attributes. 
+  curelep(IN/OUT) - a pointer to the actual number of elements. This parameter 
+  is only required for PL/SQL binds.
+  mode (IN) - the valid modes for this parameter are:
+  OCI_DEFAULT. This is default mode.
+  OCI_DATA_AT_EXEC. When this mode is selected, the value_sz 
+  parameter defines the maximum size of the data that can be ever 
+  provided at runtime. The application must be ready to provide the OCI 
+  library runtime IN data buffers at any time and any number of times. 
+  Runtime data is provided in one of the two ways:
+  callbacks using a user-defined function which must be registered 
+  with a subsequent call to OCIBindDynamic() . 
+  a polling mechanism using calls supplied by the OCI. This mode 
+  is assumed if no callbacks are defined.
+  For more information about using the OCI_DATA_AT_EXEC mode, see 
+  the section "Runtime Data Allocation and Piecewise Operations" on 
+  page 5-16.
+  When the allocated buffers are not required any more, they should be 
+  freed by the client. 
+  Related Functions
+  OCIBindDynamic(), OCIBindObject(), OCIBindArrayOfStruct(), OCIAttrGet()
+  
+  
+  
+  -------------------------------OCIBindDynamic---------------------------------
+  
+  OCIBindDynamic()
+  Name
+  OCI Bind Dynamic Attributes
+  Purpose
+  This call is used to register user callbacks for dynamic data allocation. 
+  Syntax
+  sword OCIBindDynamic( OCIBind     *bindp,
+                      OCIError    *errhp,
+                      dvoid       *ictxp, 
+                      OCICallbackInBind         (icbfp)(
+                                  dvoid            *ictxp,
+                                  OCIBind          *bindp,
+                                  ub4              iter, 
+                                  ub4              index, 
+                                  dvoid            **bufpp,
+                                  ub4              *alenp,
+                                  ub1              *piecep, 
+                                  dvoid            **indp ),
+                      dvoid       *octxp,
+                      OCICallbackOutBind         (ocbfp)(
+                                  dvoid            *octxp,
+                                  OCIBind          *bindp,
+                                  ub4              iter, 
+                                  ub4              index, 
+                                  dvoid            **bufp, 
+                                  ub4              **alenpp,
+                                  ub1              *piecep,
+                                  dvoid            **indpp, 
+                                  ub2              **rcodepp)   );
+  Comments
+  This call is used to register user-defined callback functions for providing 
+  data for an UPDATE or INSERT if OCI_DATA_AT_EXEC mode was specified in a 
+  previous call to OCIBindByName() or OCIBindByPos(). 
+  The callback function pointers must return OCI_CONTINUE if it the call is 
+  successful. Any return code other than OCI_CONTINUE signals that the client 
+  wishes to abort processing immediately.
+  For more information about the OCI_DATA_AT_EXEC mode, see the section 
+  "Runtime Data Allocation and Piecewise Operations" on page 5-16.
+  Parameters
+  bindp (IN/OUT) - a bind handle returned by a call to OCIBindByName() or 
+  OCIBindByPos(). 
+  errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
+  diagnostic information in the event of an error. 
+  ictxp (IN) - the context pointer required by the call back function icbfp. 
+  icbfp (IN) - the callback function which returns a pointer to the IN bind 
+  value or piece at run time. The callback takes in the following parameters. 
+  ictxp (IN/OUT) - the context pointer for this callback function. 
+  bindp (IN) - the bind handle passed in to uniquely identify this bind 
+  variable. 
+  iter (IN) - 1-based execute iteration value. 
+  index (IN) - index of the current array, for an array bind. 1 based not 
+  greater than curele parameter of the bind call. 
+  index (IN) - index of the current array, for an array bind. This parameter 
+  is 1-based, and may not be greater than curele parameter of the bind call. 
+  bufpp (OUT) - the pointer to the buffer. 
+  piecep (OUT) - which piece of the bind value. This can be one of the 
+  following values - OCI_ONE_PIECE, OCI_FIRST_PIECE, 
+  OCI_NEXT_PIECE and OCI_LAST_PIECE.
+  indp (OUT) - contains the indicator value. This is apointer to either an 
+  sb2 value or a pointer to an indicator structure for binding named data 
+  types. 
+  indszp (OUT) - contains the indicator value size. A pointer containing 
+  the size of either an sb2 or an indicator structure pointer. 
+  octxp (IN) - the context pointer required by the callback function ocbfp. 
+  ocbfp (IN) - the callback function which returns a pointer to the OUT bind 
+  value or piece at run time. The callback takes in the following parameters. 
+  octxp (IN/OUT) - the context pointer for this call back function. 
+  bindp (IN) - the bind handle passed in to uniquely identify this bind 
+  variable. 
+  iter (IN) - 1-based execute iteration value. 
+  index (IN) - index of the current array, for an array bind. This parameter 
+  is 1-based, and must not be greater than curele parameter of the bind call. 
+  bufpp (OUT) - a pointer to a buffer to write the bind value/piece. 
+  buflp (OUT) - returns the buffer size. 
+  alenpp (OUT) - a pointer to a storage for OCI to fill in the size of the bind 
+  value/piece after it has been read. 
+  piecep (IN/OUT) - which piece of the bind value. It will be set by the 
+  library to be one of the following values - OCI_ONE_PIECE or 
+  OCI_NEXT_PIECE. The callback function can leave it unchanged or set 
+  it to OCI_FIRST_PIECE or OCI_LAST_PIECE. By default - 
+  OCI_ONE_PIECE. 
+  indpp (OUT) - returns a pointer to contain the indicator value which 
+  either an sb2 value or a pointer to an indicator structure for named data 
+  types. 
+  indszpp (OUT) - returns a pointer to return the size of the indicator 
+  value which is either size of an sb2 or size of an indicator structure. 
+  rcodepp (OUT) - returns a pointer to contains the return code. 
+  Related Functions
+  OCIAttrGet()
+  
+  
+  ---------------------------------OCIBindObject--------------------------------
+  
+  
+  OCIBindObject()
+  Name
+  OCI Bind Object
+  Purpose
+  This function sets up additional attributes which are required for a named 
+  data type (object)  bind.
+  Syntax
+  sword OCIBindObject ( OCIBind          *bindp,
+                      OCIError         *errhp, 
+                      CONST OCIType    *type,
+                      dvoid            **pgvpp, 
+                      ub4              *pvszsp, 
+                      dvoid            **indpp, 
+                      ub4              *indszp, );
+  Comments
+  This function sets up additional attributes which binding a named data type 
+  or a REF. An error will be returned if this function is called when the OCI 
+  environment has been initialized in non-object mode. 
+  This call takes as a paramter a type descriptor object (TDO) of datatype 
+  OCIType for the named data type being defined.  The TDO can be retrieved 
+  with a call to OCITypeByName().
+  If the OCI_DATA_AT_EXEC mode was specified in ocibindn() or ocibindp(), the 
+  pointers to the IN buffers are obtained either using the callback icbfp 
+  registered in the OCIBindDynamic() call or by the OCIStmtSetPieceInfo() call. 
+  The buffers are dynamically allocated for the OUT data and the pointers to 
+  these buffers are returned either by calling ocbfp() registered by the 
+  OCIBindDynamic() or by setting the pointer to the buffer in the buffer passed 
+  in by OCIStmtSetPieceInfo() called when OCIStmtExecute() returned 
+  OCI_NEED_DATA. The memory of these client library- allocated buffers must be 
+  freed when not in use anymore by using the OCIObjectFreee() call.
+  Parameters
+  bindp ( IN/OUT) - the bind handle returned by the call to OCIBindByName() 
+  or OCIBindByPos(). 
+  errhp ( IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
+  diagnostic information in the event of an error.
+  type ( IN) - points to the TDO which describes the type of the program 
+  variable being bound. Retrieved by calling OCITypeByName().
+  pgvpp ( IN/OUT) - points to a pointer to the program variable buffer. For an 
+  array, pgvpp points to an array of pointers. When the bind variable is also an 
+  OUT variable, the OUT Named Data Type value or REF is allocated 
+  (unpickled) in the Object Cache, and a pointer to the value or REF is returned,
+  At the end of execute, when all OUT values have been received, pgvpp points 
+  to an array of pointer(s) to these newly allocated named data types in the 
+  object cache. 
+  pgvpp is ignored if the OCI_DATA_AT_EXEC mode is set. Then the Named 
+  Data Type buffers are requested at runtime. For static array binds, skip 
+  factors may be specified using the OCIBindArrayOfStruct() call. The skip 
+  factors are used to compute the address of the next pointer to the value, the 
+  indicator structure and their sizes.
+  pvszsp ( IN/OUT) - points to the size of the program variable. The size of the 
+  named data type is not required on input. For an array, pvszsp is an array of 
+  ub4s. On return, for OUT bind variables, this points to size(s) of the Named 
+  Data Types and REFs received. pvszsp is ignored if the OCI_DATA_AT_EXEC 
+  mode is set. Then the size of the buffer is taken at runtime.
+  indpp ( IN/OUT) - points to a pointer to the program variable buffer 
+  containing the parallel indicator structure. For an array, points to an array 
+  of pointers. When the bind variable is also an OUT bind variable, memory is 
+  allocated in the object cache, to store the unpickled OUT indicator values. At 
+  the end of the execute when all OUT values have been received, indpp points 
+  to the pointer(s) to these newly allocated indicator structure(s). 
+  indpp is ignored if the OCI_DATA_AT_EXEC mode is set. Then the indicator 
+  is requested at runtime.
+  indszp ( IN/OUT) - points to the size of the IN indicator structure program 
+  variable. For an array, it is an array of sb2s. On return for OUT bind 
+  variables, this points to size(s) of the received OUT indicator structures.
+  indszp is ignored if the OCI_DATA_AT_EXEC mode is set. Then the indicator 
+  size is requested at runtime.
+  Related Functions
+  OCIAttrGet()
+  
+  
+  
+  ----------------------------------OCIBreak------------------------------------
+  
+  
+  OCIBreak()
+  Name
+  OCI Break
+  Purpose
+  This call performs an immediate (asynchronous) abort of any currently 
+  executing OCI function that is associated with a server .
+  Syntax
+  sword OCIBreak ( dvoid      *hndlp,
+                   OCIError   *errhp);
+  Comments
+  This call performs an immediate (asynchronous) abort of any currently 
+  executing OCI function that is associated with a server. It is normally used 
+  to stop a long-running OCI call being processed on the server.
+  This call can take either the service context handle or the server context 
+  handle as a parameter to identify the function to be aborted.
+  Parameters
+  hndlp (IN) - the service context handle or the server context handle.
+  errhp (IN) - an error handle which can be passed to OCIErrorGet() for 
+  diagnostic information in the event of an error.
+  Related Functions
+  
+  -----------------------------OCIConnectionPoolCreate --------------------------
+  Name:
+  OCIConnectionPoolCreate
+  
+  Purpose:
+  Creates the connections in the pool
+  
+  Syntax:
+  OCIConnectionPoolCreate (OCIEnv *envhp, OCIError *errhp, OCICPool *poolhp,
+                           OraText **poolName, sb4 *poolNameLen, 
+                           CONST Oratext *dblink, sb4 dblinkLen,
+                           ub4 connMin, ub4 connMax, ub4 connIncr,
+                           CONST OraText *poolUsername, sb4 poolUserLen,
+                           CONST OraText *poolPassword, sb4 poolPassLen, 
+                           ub4 mode)
+  Comments:
+  This call is used to create a connection pool. conn_min connections
+  to the database are started on calling OCIConnectionPoolCreate.
+  
+  Parameters:
+  envhp (IN/OUT)  - A pointer to the environment where the Conencton Pool
+                    is to be created
+  errhp (IN/OUT)  - An error handle which can be passed to OCIErrorGet().
+  poolhp (IN/OUT) - An uninitialiazed pool handle.
+  poolName (OUT) - The connection pool name. 
+  poolNameLen (OUT) - The length of the connection pool name 
+  dblink (IN/OUT) - Specifies the database(server) to connect. This will also
+                    be used as the default pool name.
+  dblinkLen (IN)  - The length of the string pointed to by dblink.
+  connMin (IN)    - Specifies the minimum number of connections in the
+                    Connection Pool at any instant.
+                    connMin number of connections are started when
+                    OCIConnectionPoolCreate() is called.
+  connMax (IN)    - Specifies the maximum number of connections that can be
+                    opened to the database. Once this value is reached, no
+                    more connections are opened.
+  connIncr (IN)   - Allows application to set the next increment for
+                    connections to be opened to the database if the current
+                    number of connections are less than conn_max.
+  poolUsername (IN/OUT) - Connection pooling requires an implicit proxy
+                           session and this attribute provides a username
+                           for that session.
+  poolUserLen (IN) - This represents the length of pool_username.
+  poolPassword (IN/OUT) - The password for the parameter pool_username passed
+                          above.
+  poolPassLen (IN) - This represents the length of pool_password.
+  
+  mode (IN) - The modes supported are OCI_DEFAULT and 
+  OCI_CPOOL_REINITIALIZE 
+  
+  Related Functions
+  OCIConnectionPoolDestroy()
+  
+  ---------------------------------------------------------------------------
+  
+  ----------------------------OCIConnectionPoolDestroy-------------------------
+  Name:
+  OCIConnectionPoolDestroy
+  
+  Purpose:
+  Terminates the connections in the pool
+  
+  Syntax:
+  OCIConnectionPoolDestroy (OCICPool *poolhp, OCIError *errhp, ub4 mode)
+  
+  Comments:
+  On calling OCIConnectionPoolDestroy, all the open connections in the pool
+  are closed and the pool is destroyed.
+  
+  Parameters:
+  poolhp (IN/OUT) - An initialiazed pool handle.
+  errhp (IN/OUT)  - An error handle which can be passed to OCIErrorGet().
+  mode (IN)       - Currently, OCIConnectionPoolDestroy() will support only
+                    the OCI_DEFAULT mode.
+  
+  Related Functions:
+  OCIConnectionPoolCreate()
+  
+  -----------------------------------------------------------------------------
+  ----------------------------OCISessionPoolCreate-----------------------------
+  Name: 
+  OCISessionPoolCreate
+  
+  Purpose:
+  Creates the sessions in the session pool.
+  
+  Syntax:
+  sword OCISessionPoolCreate (OCIEnv *envhp, OCIError *errhp, OCISpool *spoolhp, 
+                        OraText **poolName, ub4 *poolNameLen, 
+                        CONST OraText *connStr, ub4 connStrLen,
+                        ub4 sessMin, ub4 sessMax, ub4 sessIncr,
+                        OraText *userid,  ub4 useridLen,
+                        OraText *password, ub4 passwordLen,
+                        ub4 mode)
+  
+  Comments:
+  When OCISessionPoolCreate is called, a session pool is initialized for
+  the associated environment and the database specified by the
+  connStr parameter. This pool is named uniquely and the name
+  is returned to the user in the poolname parameter.
+  
+  Parameters:
+  envhp (IN/OUT) - A pointer to the environment handle in which the session
+                   pool needs to be created.
+  errhp (IN/OUT) - An error handle which can be passed to OCIErrorGet().
+  spoolhp (IN/OUT) - A pointer to the session pool handle that is created.
+  poolName (OUT) - Session pool name returned to the user.
+  poolNameLen (OUT) - Length of the PoolName
+  connStr (IN) - The TNS alias of the database to connect to.
+  connStrLen (IN) - Length of the connStr.
+  sessMin (IN) - Specifies the minimum number of sessions in the Session Pool.
+                 These are the number of sessions opened in the beginning, if
+                 in Homogeneous mode. Else, the parameter is ignored.
+  sessMax (IN) - Specifies the maximum number of sessions in the Session Pool.
+                 Once this value is reached, no more sessions are opened,
+                 unless the OCI_ATTR_SPOOL_FORCEGET is set.
+  userid (IN) - Specifies the userid with which to start up the sessions.
+  useridLen (IN) - Length of userid.
+  password (IN) - Specifies the password for the corresponding userid.
+  passwordLen (IN) - Specifies the length of the password
+  mode(IN) - May be OCI_DEFAULT, OCI_SPC_SPOOL_REINITIALIZE, or
+             OCI_SPC_SPOOL_HOMOGENEOUS.
+  
+  Returns:
+  SUCCESS - If pool could be allocated and created successfully.
+  ERROR - If above conditions could not be met.
+  
+  Related Functions:
+  OCISessionPoolDestroy()
+  -----------------------------------------------------------------------------
+  -----------------------------OCISessionPoolDestroy---------------------------
+  Name:
+  OCISessionPoolDestroy
+  
+  Purpose:
+  Terminates all the sessions in the session pool.
+  
+  Syntax:
+  sword OCISessionPoolDestroy (OCISPool *spoolhp, OCIError *errhp, ub4 mode)
+  
+  Comments:
+  spoolhp (IN/OUT) - The pool handle of the session pool to be destroyed.
+  errhp (IN/OUT) - An error handle which can be passed to OCIErrorGet().
+  mode (IN) - Currently only OCI_DEFAULT mode is supported.
+  
+  Returns:
+  SUCCESS - All the sessions could be closed.
+  ERROR - If the above condition is not met.
+  
+  Related Functions:
+  OCISessionPoolCreate()
+  -----------------------------------------------------------------------------
+  -------------------------------OCISessionGet---------------------------------
+  Name:
+  OCISessionGet
+  
+  Purpose:
+  Get a session. This could be from a session pool, connection pool or
+  a new standalone session.
+  
+  Syntax:
+  sword OCISessionGet(OCIenv *envhp, OCIError *errhp, OCISvcCtx **svchp,
+                      OCIAuthInfo *authhp,
+                      OraText *poolName, ub4 poolName_len,
+                      CONST OraText *tagInfo, ub4 tagInfo_len,
+                      OraText **retTagInfo, ub4 *retTagInfo_len,
+                      boolean *found,
+                      ub4 mode)
+  
+  Comments:
+  envhp (IN/OUT) - OCI environment handle.
+  errhp (IN/OUT) - OCI error handle to be passed to OCIErrorGet().
+  svchp (IN/OUT) - Address of an OCI service context pointer. This will be
+                   filled with a server and session handle, attached to the
+                   pool.
+  authhp (IN/OUT) - OCI Authentication Information handle.
+  poolName (IN) - This indicates the session/connection pool to get the
+                  session/connection from in the OCI_SPOOL/OCI_CPOOL mode.
+                  In the OCI_DEFAULT mode it refers to the connect string.
+  poolName_len (IN) - length of poolName.
+  tagInfo (IN) - indicates the tag of the session that the user wants. If the
+                     user wants a default session, he must specify a NULL here.
+                     Only used for Session Pooling.
+  tagInfo_len (IN) - the length of tagInfo.
+  retTagInfo (OUT) - This indicates the type of session that is returned to
+                     the user. Only used for Session Pooling.
+  retTagInfo_len (OUT) - the length of retTagInfo.
+  found (OUT) - set to true if the user gets a session he had requested, else
+                set to false. Only used for Session Pooling.
+  mode (IN) - The supported modes are OCI_DEFAULT, OCI_CRED_PROXY and
+              OCI_GET_SPOOL_MATCHANY, OCI_SPOOL and OCI_CPOOL. OCI_SPOOL and
+              OCI_CPOOL are mutually exclusive.
+  
+  Returns:
+  SUCCESS -  if a session was successfully returned into svchp.
+  SUCCESS_WITH_INFO - if a session was successfully returned into svchp and the
+                      total number of sessions > maxsessions. Only valid for
+                      Session Pooling.
+  ERROR - If a session could not be retrieved.
+  
+  Related Functions:
+  OCISessionRelease()
+  -----------------------------------------------------------------------------
+  ---------------------------OCISessionRelease---------------------------------
+  Name:
+  OCISessionRelease
+  
+  Purpose:
+  Release the session.
+  
+  Syntax:
+  sword OCISessionRelease ( OCISvcCtx *svchp, OCIError *errhp,
+                            OraText *tag, ub4 tag_len,
+                            ub4 mode);
+  
+  Comments:
+  svchp (IN/OUT) - The service context associated with the session/connection.
+  errhp (IN/OUT) - OCI error handle to be passed to OCIErrorGet().
+  tag (IN) - Only used for Session Pooling.
+             This parameter will be ignored unless mode OCI_RLS_SPOOL_RETAG is
+             specified. In this case, the session is labelled with this tag and
+             returned to the pool. If this is NULL, then the session is untagged.
+  tag_len (IN) - Length of the tag. This is ignored unless mode 
+                 OCI_RLS_SPOOL_RETAG is set.
+  mode (IN) - The supported modes are OCI_DEFAULT, OCI_RLS_SPOOL_DROPSESS,
+              OCI_RLS_SPOOL_RETAG. The last 2 are only valid for Session Pooling.
+              When OCI_RLS_SPOOL_DROPSESS is specified, the session
+              will be removed from the session pool. If OCI_RLS_SPOOL_RETAG 
+              is set, the tag on the session will be altered. If this mode is 
+              not set, the tag and tag_len parameters will be ignored.
+  
+  Returns:
+  ERROR - If the session could not be released successfully.
+  SUCCESS - In all other cases.
+  
+  Related Functions:
+  OCISessionGet().
+  -----------------------------------------------------------------------------
+  ------------------------------OCIDateTimeAssign --------------------------
+  sword OCIDateTimeAssign(dvoid *hndl, OCIError *err, CONST OCIDateTime *from, 
+                          OCIDateTime *to);
+  NAME: OCIDateTimeAssign - OCIDateTime Assignment
+  PARAMETERS:
+  hndl (IN) - Session/Env handle.
+  err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+  from (IN) - datetime to be assigned
+  to (OUT) - lhs of assignment
+  DESCRIPTION:
+          Performs date assignment. The type of the output will be same as that
+          of input
+  
+  ------------------------------OCIDateTimeCheck----------------------------
+  sword OCIDateTimeCheck(dvoid *hndl, OCIError *err, CONST OCIDateTime *date, 
+                   ub4 *valid );
+  NAME: OCIDateTimeCheck - OCIDateTime CHecK if the given date is valid
+  PARAMETERS:
+  hndl (IN) - Session/Env handle. 
+  err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+  date (IN) - date to be checked
+  valid (OUT) -  returns zero for a valid date, otherwise 
+                  the ORed combination of all error bits specified below:
+     Macro name                   Bit number      Error
+     ----------                   ----------      -----
+     OCI_DATE_INVALID_DAY         0x1             Bad day
+     OCI_DATE_DAY_BELOW_VALID     0x2             Bad DAy Low/high bit (1=low)
+     OCI_DATE_INVALID_MONTH       0x4             Bad MOnth
+     OCI_DATE_MONTH_BELOW_VALID   0x8             Bad MOnth Low/high bit (1=low)
+     OCI_DATE_INVALID_YEAR        0x10            Bad YeaR
+     OCI_DATE_YEAR_BELOW_VALID    0x20            Bad YeaR Low/high bit (1=low)
+     OCI_DATE_INVALID_HOUR        0x40            Bad HouR
+     OCI_DATE_HOUR_BELOW_VALID    0x80            Bad HouR Low/high bit (1=low)
+     OCI_DATE_INVALID_MINUTE      0x100           Bad MiNute
+     OCI_DATE_MINUTE_BELOW_VALID  0x200           Bad MiNute Low/high bit (1=low)
+     OCI_DATE_INVALID_SECOND      0x400           Bad SeCond
+     OCI_DATE_SECOND_BELOW_VALID  0x800           bad second Low/high bit (1=low)
+     OCI_DATE_DAY_MISSING_FROM_1582 0x1000        Day is one of those "missing"
+                                                  from 1582
+     OCI_DATE_YEAR_ZERO           0x2000          Year may not equal zero
+     OCI_DATE_INVALID_TIMEZONE    0x4000          Bad Timezone
+     OCI_DATE_INVALID_FORMAT      0x8000          Bad date format input
+  
+     So, for example, if the date passed in was 2/0/1990 25:61:10 in
+     (month/day/year hours:minutes:seconds format), the error returned
+     would be OCI_DATE_INVALID_DAY | OCI_DATE_DAY_BELOW_VALID |
+     OCI_DATE_INVALID_HOUR | OCI_DATE_INVALID_MINUTE
+  
+  DESCRIPTION:
+          Check if the given date is valid.
+  RETURNS:
+          OCI_SUCCESS if the function completes successfully.
+          OCI_INVALID_HANDLE if 'err' is NULL.
+          OCI_ERROR if
+            'date' and 'valid' pointers are NULL pointers
+  
+  ------------------------------- OCIDateTimeCompare----------------------------
+  sword OCIDateTimeCompare(dvoid *hndl, OCIError *err, CONST OCIDateTime *date1, 
+                       CONST OCIDateTime *date2,  sword *result );
+  NAME: OCIDateTimeCompare - OCIDateTime CoMPare dates
+  PARAMETERS:
+  hndl (IN) - Session/Env handle. 
+  err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+  date1, date2 (IN) - dates to be compared
+  result (OUT) - comparison result, 0 if equal, -1 if date1 < date2, 
+                  1 if date1 > date2
+  DESCRIPTION:
+  The function OCIDateCompare compares two dates. It returns -1 if 
+  date1 is smaller than date2, 0 if they are equal, and 1 if date1 is 
+  greater than date2.
+  RETURNS:
+         OCI_SUCCESS if the function completes successfully.
+          OCI_INVALID_HANDLE if 'err' is NULL.
+          OCI_ERROR if
+            invalid date
+            input dates are not mutually comparable
+  
+  ------------------------------OCIDateTimeConvert----------------------
+  sword OCIDateTimeConvert(dvoid *hndl, OCIError *err, OCIDateTime *indate, 
+                                  OCIDateTime *outdate);
+  NAME: OCIDateTimeConvert - Conversion between different DATETIME types
+  PARAMETERS:
+  hndl (IN) - Session/Env handle. 
+  err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+  indate (IN) - pointer to input date
+  outdate (OUT) - pointer to output datetime 
+  DESCRIPTION: Converts one datetime type to another. The result type is
+         the type of the 'outdate' descriptor.
+  RETURNS:
+          OCI_SUCCESS if the function completes successfully.
+          OCI_INVALID_HANDLE if 'err' is NULL.
+          OCI_ERROR if
+              conversion not possible.
+     
+  ---------------------------- OCIDateTimeFromText-----------------------
+  sword OCIDateTimeFromText(dvoid *hndl, OCIError *err, CONST OraText *date_str, 
+               size_t d_str_length, CONST OraText *fmt, ub1 fmt_length,
+               CONST OraText *lang_name, size_t lang_length, OCIDateTime *date );
+  NAME: OCIDateTimeFromText - OCIDateTime convert String FROM Date
+  PARAMETERS:
+  hndl (IN) - Session/Env handle. If Session Handle is passed, the 
+                      conversion takes place in session NLS_LANGUAGE and
+                      session NLS_CALENDAR, otherwise the default is used.
+  err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+  date_str (IN) - input string to be converted to Oracle date
+  d_str_length (IN) - size of the input string, if the length is -1
+                  then 'date_str' is treated as a null terminated  string
+  fmt (IN) - conversion format; if 'fmt' is a null pointer, then
+                  the string is expected to be in the default format for
+                  the datetime type.
+  fmt_length (IN) - length of the 'fmt' parameter
+  lang_name (IN) - language in which the names and abbreviations of
+                  days and months are specified, if null i.e. (OraText *)0,
+                  the default language of session is used, 
+  lang_length (IN) - length of the 'lang_name' parameter
+  date (OUT) - given string converted to date
+  DESCRIPTION:
+          Converts the given string to Oracle datetime type set in the 
+          OCIDateTime descriptor according to the specified format. Refer to 
+          "TO_DATE" conversion function described in "Oracle SQL Language 
+          Reference Manual" for a description of format.
+  RETURNS:
+          OCI_SUCCESS if the function completes successfully.
+          OCI_INVALID_HANDLE if 'err' is NULL.
+          OCI_ERROR if
+            invalid format
+            unknown language
+            invalid input string
+  
+  --------------------------- OCIDateTimeGetDate-------------------------
+  sword OCIDateTimeGetDate(dvoid *hndl, OCIError *err,  CONST OCIDateTime *date, 
+                             sb2 *year, ub1 *month, ub1 *day );
+  NAME: OCIDateTimeGetDate - OCIDateTime Get Date (year, month, day)  
+                                  portion of DATETIME. 
+  PARAMETERS:
+  hndl (IN) - Session/Env handle. 
+  err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+  datetime (IN) - Pointer to OCIDateTime 
+  year      (OUT) - year value
+  month     (OUT) - month value
+  day       (OUT) - day value
+  
+  --------------------------- OCIDateTimeGetTime ------------------------
+  sword OCIDateTimeGetTime(dvoid *hndl, OCIError *err, OCIDateTime *datetime,
+                   ub1 *hour, ub1 *minute, ub1 *sec, ub4 *fsec);
+  NAME: OCIDateTimeGetTime - OCIDateTime Get Time (hour, min, second, 
+                          fractional second)  of DATETIME. 
+  PARAMETERS:
+  hndl (IN) - Session/Env handle. 
+  err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+  datetime (IN) - Pointer to OCIDateTime 
+  hour      (OUT) - hour value
+  minute       (OUT) - minute value
+  sec       (OUT) - second value
+  fsec      (OUT) - Fractional Second value
+  
+  --------------------------- OCIDateTimeGetTimeZoneOffset ----------------------
+  sword OCIDateTimeGetTimeZoneOffset(dvoid *hndl,OCIError *err,CONST 
+                OCIDateTime *datetime,sb1 *hour,sb1  *minute);
+  
+  NAME: OCIDateTimeGetTimeZoneOffset - OCIDateTime Get TimeZone (hour, minute)  
+                           portion of DATETIME. 
+  PARAMETERS:
+  hndl (IN) - Session/Env handle. 
+  err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+  datetime (IN) - Pointer to OCIDateTime 
+  hour      (OUT) - TimeZone Hour value
+  minute     (OUT) - TimeZone Minute value
+  
+  --------------------------- OCIDateTimeSysTimeStamp---------------------
+  sword OCIDateTimeSysTimeStamp(dvoid *hndl, OCIError *err, 
+                OCIDateTime *sys_date );
+   
+  NAME: OCIDateTimeSysTimeStamp - Returns system date/time as a TimeStamp with 
+                        timezone
+  PARAMETERS:
+  hndl (IN) - Session/Env handle. 
+  err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+  sys_date (OUT) - Pointer to output timestamp
+   
+  DESCRIPTION: 
+          Gets the system current date and time as a timestamp with timezone
+  RETURNS:
+          OCI_SUCCESS if the function completes successfully.
+          OCI_INVALID_HANDLE if 'err' is NULL.
+  
+  
+  ------------------------------OCIDateTimeIntervalAdd----------------------
+  sword OCIDateTimeIntervalAdd(dvoid *hndl, OCIError *err, OCIDateTime *datetime,
+           OCIInterval *inter, OCIDateTime *outdatetime);
+  NAME: OCIDateTimeIntervalAdd - Adds an interval to datetime
+  PARAMETERS:
+  hndl (IN) - Session/Env handle.
+  err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+  datetime (IN) - pointer to input datetime
+  inter    (IN) - pointer to interval 
+  outdatetime (IN) - pointer to output datetime. The output datetime 
+                                  will be of same type as input datetime
+  DESCRIPTION: 
+          Adds an interval to a datetime to produce a resulting datetime
+  RETURNS:
+          OCI_SUCCESS if the function completes successfully.
+          OCI_INVALID_HANDLE if 'err' is NULL.
+          OCI_ERROR if:
+                  resulting date is before Jan 1, -4713
+                  resulting date is after Dec 31, 9999
+  
+  ------------------------------OCIDateTimeIntervalSub----------------------
+  sword OCIDateTimeIntervalSub(dvoid *hndl, OCIError *err, OCIDateTime *datetime,
+                OCIInterval *inter, OCIDateTime *outdatetime);
+  NAME: OCIDateTimeIntervalSub - Subtracts an interval from a datetime
+  PARAMETERS:
+  hndl (IN) - Session/Env handle. 
+  err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+  datetime (IN) - pointer to input datetime
+  inter    (IN) - pointer to interval 
+  outdatetime (IN) - pointer to output datetime. The output datetime 
+                                  will be of same type as input datetime
+  DESCRIPTION: 
+          Subtracts an interval from a datetime and stores the result in a
+          datetime
+  RETURNS:
+          OCI_SUCCESS if the function completes successfully.
+          OCI_INVALID_HANDLE if 'err' is NULL.
+          OCI_ERROR if:
+                  resulting date is before Jan 1, -4713
+                  resulting date is after Dec 31, 9999
+  
+  --------------------------- OCIDateTimeConstruct-------------------------
+  sword OCIDateTimeConstruct(dvoid  *hndl,OCIError *err,OCIDateTime *datetime,
+                 sb2 year,ub1 month,ub1 day,ub1 hour,ub1 min,ub1 sec,ub4 fsec,
+                 OraText  *timezone,size_t timezone_length);
+  
+  NAME: OCIDateTimeConstruct - Construct an OCIDateTime. Only the relevant
+         fields for the OCIDateTime descriptor types are used.
+  PARAMETERS:
+          hndl (IN) - Session/Env handle. 
+          err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+          datetime (IN) - Pointer to OCIDateTime 
+          year      (IN) - year value
+          month     (IN) - month value
+          day       (IN) - day value        
+          hour      (IN) - hour value
+          min       (IN) - minute value
+          sec       (IN) - second value
+          fsec      (IN) - Fractional Second value
+          timezone  (IN) - Timezone string
+          timezone_length(IN) - Length of timezone string
+  
+  DESCRIPTION:
+         Constructs a DateTime descriptor. The type of the datetime is the
+         type of the OCIDateTime descriptor. Only the relevant fields based
+         on the type are used. For Types with timezone, the date and time
+         fields are assumed to be in the local time of the specified timezone.
+         If timezone is not specified, then session default timezone is
+         assumed.
+  RETURNS:
+          OCI_SUCCESS if the function completes successfully.
+          OCI_ERROR if datetime is not valid.
+  
+  ------------------------------OCIDateTimeSubtract-----------------------
+  sword OCIDateTimeSubtract(dvoid *hndl, OCIError *err, OCIDateTime *indate1, 
+                  OCIDateTime *indate2, OCIInterval *inter);
+  NAME: OCIDateTimeSubtract - subtracts two datetimes to return an interval
+  PARAMETERS:
+  hndl (IN) - Session/Env handle. 
+  err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+  indate1(IN) - pointer to subtrahend
+  indate2(IN) - pointer to minuend
+  inter  (OUT) - pointer to output interval
+  DESCRIPTION: 
+          Takes two datetimes as input and stores their difference in an 
+          interval. The type of the interval is the type of the 'inter'
+          descriptor.
+  RETURNS:
+          OCI_SUCCESS if the function completes successfully.
+          OCI_INVALID_HANDLE if 'err' is NULL.
+          OCI_ERROR if
+             datetimes are not comparable.
+  
+  --------------------------- OCIDateTimeToText--------------------------
+  sword OCIDateTimeToText(dvoid *hndl, OCIError *err, CONST OCIDateTime *date, 
+                          CONST OraText *fmt, ub1 fmt_length, ub1 fsprec, 
+                          CONST OraText *lang_name, size_t lang_length, 
+                          ub4 *buf_size, OraText *buf );
+  NAME: OCIDateTimeToText - OCIDateTime convert date TO String 
+  PARAMETERS:
+  hndl (IN) - Session/Env handle. If Session Handle is passed, the 
+                      conversion takes place in session NLS_LANGUAGE and
+                      session NLS_CALENDAR, otherwise the default is used.
+  err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+  date (IN) - Oracle datetime to be converted
+  fmt (IN) - conversion format, if null string pointer (OraText*)0, then
+                  the date is converted to a character string in the
+                  default format for that type.
+  fmt_length (IN) - length of the 'fmt' parameter
+  fsprec (IN) - specifies the fractional second precision in which the
+                 fractional seconds is returned.
+  lang_name (IN) - specifies the language in which the names and 
+                  abbreviations of months and days are returned;
+                  default language of session is used if 'lang_name' 
+                  is null i.e. (OraText *)0
+  lang_length (IN) - length of the 'nls_params' parameter
+  buf_size (IN/OUT) - size of the buffer; size of the resulting string
+                  is returned via this parameter
+  buf (OUT) - buffer into which the converted string is placed
+  DESCRIPTION:
+          Converts the given date to a string according to the specified format.
+          Refer to "TO_DATE" conversion function described in
+          "Oracle SQL Language Reference Manual" for a description of format
+          and NLS arguments. The converted null-terminated date string is
+          stored in the buffer 'buf'.
+  RETURNS:
+          OCI_SUCCESS if the function completes successfully.
+          OCI_INVALID_HANDLE if 'err' is NULL.
+          OCI_ERROR if
+            buffer too small
+            invalid format
+            unknown language
+            overflow error
+  
+  ----------------------------OCIDateTimeGetTimeZoneName------------------------
+  sword OCIDateTimeGetTimeZoneName(dvoid *hndl, 
+                                   OCIError *err,
+                                   CONST OCIDateTime *datetime,
+                                   ub1 *buf,
+                                   ub4 *buflen);
+  NAME OCIDateTimeGetTimeZoneName - OCI DateTime Get the Time Zone Name
+  PARAMETERS:
+  hndl (IN)      - Session/Env handle.
+  err (IN/OUT)   - error handle. If there is an error, it is
+                   recorded in 'err' and this function returns OCI_ERROR.
+                   The error recorded in 'err' can be retrieved by calling
+                   OCIErrorGet().
+  datetime (IN)   - Pointer to an OCIDateTime.
+  buf (OUT)       - User allocated storage for name string.
+  buflen (IN/OUT) - length of buf on input, length of name on out
+  DESCRIPTION:
+          Returns either the timezone region name or the absolute hour and minute
+          offset. If the DateTime was created with a region id then the region 
+          name will be returned in the buf.  If the region id is zero, then the 
+          hour and minute offset is returned as "[-]HH:MM".
+  RETURNS:
+         OCI_SUCCESS if the function completes successfully.
+         OCI_INVALID_HANDLE if 'err' is NULL.
+         OCI_ERROR if
+           buffer too small
+           error retrieving timezone data
+           invalid region 
+           invalid LdiDateTime type
+  
+  ---------------------------------OCIDateTimeToArray----------------------------
+  sword OCIDateTimeToArray(dvoid *hndl, 
+                           OCIError *err,
+                           CONST OCIDateTime *datetime,
+                           CONST OCIInterval *reftz,
+                           ub1 *outarray,
+                           ub4 *len
+                           ub1 *fsprec);
+  NAME OCIDateTimeToArray - OCI DateTime convert To Array format
+  PARAMETERS:
+  hndl (IN)      - Session/Env handle.
+  err (IN/OUT)   - error handle. If there is an error, it is
+                   recorded in 'err' and this function returns OCI_ERROR.
+                   The error recorded in 'err' can be retrieved by calling
+                   OCIErrorGet().
+  datetime (IN)   - Pointer to OCIDateTime to be converted.
+  outarray (OUT)  - Result array storage
+  len (OUT)        - pointer to  length of outarray.
+  fsprec (IN)     - Number of fractional seconds digits.
+  DESCRIPTION:
+          Returns an array representing the input DateTime descriptor.
+  RETURNS:
+         OCI_SUCCESS if the function completes successfully.
+         OCI_INVALID_HANDLE if 'err' is NULL.
+         OCI_ERROR if
+           buffer too small
+           error retrieving timezone data
+           invalid region 
+           invalid LdiDateTime type
+  
+  --------------------------------OCIDateTimeFromArray---------------------------
+  sword OCIDateTimeFromArray(dvoid *hndl, 
+                           OCIError *err,
+                           ub1 *inarray,
+                           ub4 len
+                           ub1 type
+                           OCIDateTime *datetime,
+                           OCIInterval *reftz,
+                           ub1 fsprec);
+  NAME OCIDateTimeFromArray - OCI DateTime convert From Array format
+  PARAMETERS:
+  hndl (IN)      - Session/Env handle.
+  err (IN/OUT)   - error handle. If there is an error, it is
+                   recorded in 'err' and this function returns OCI_ERROR.
+                   The error recorded in 'err' can be retrieved by calling
+                   OCIErrorGet().
+  inarray (IN)   - Pointer to input array representtion of DateTime
+  len (IN)       - len of inarray.
+  type (IN)      - One of SQLT_DATE, SQLT_TIME, SQLT_TIME_TZ, SQLT_TIMESTAMP,
+                   SQLT_TIMESTAMP_TZ, or SQLT_TIMESTAMP_LTZ.
+  datetime (OUT) - Pointer to the result OCIDateTime.
+  reftz (IN)     - timezone interval used with SQLT_TIMESTAMP_LTZ.
+  fsprec (IN)    - fractionl seconds digits of precision (0-9).
+  DESCRIPTION:
+          Returns a pointer to an OCIDateTime of type type converted from 
+          the inarray.
+  RETURNS:
+         OCI_SUCCESS if the function completes successfully.
+         OCI_INVALID_HANDLE if 'err' is NULL.
+         OCI_ERROR if
+           buffer too small
+           error retrieving timezone data
+           invalid region 
+           invalid LdiDateTime type
+  
+  ----------------------------------OCIRowidToChar-----------------------------
+  Name
+  OCIRowidToChar
+  
+  Purpose
+  Converts physical/logical (universal) ROWID to chracter extended (Base 64) 
+  representation into user provided buffer outbfp of length outbflp. After 
+  execution outbflp contains amount of bytes converted.In case of truncation 
+  error, outbflp contains required size to make this conversion successful
+  and returns ORA-1405.
+  
+  Syntax
+  sword OCIRowidToChar( OCIRowid *rowidDesc, 
+                        OraText *outbfp, 
+                        ub2 *outbflp, 
+                        OCIError *errhp)
+  
+  Comments
+  After this conversion, ROWID in character format can be bound using
+  OCIBindByPos or OCIBindByName call and used to query a row at a
+  desired ROWID. 
+  
+  Parameters
+  rowidDesc (IN)   - rowid DESCriptor which is allocated from OCIDescritorAlloc
+                     and populated by a prior SQL statement execution
+  outbfp (OUT)     - pointer to the buffer where converted rowid in character 
+                     representation is stored after successful execution.
+  outbflp (IN/OUT) - pointer to output buffer length variable.
+                     Before execution (IN mode) *outbflp contains the size of
+                     outbfp, after execution (OUT mode) *outbflp contains amount
+                     of bytes converted. In an event of truncation during 
+                     conversion *outbflp contains the required length to make
+                     conversion successful.
+  errhp (IN/OUT)   - an error handle which can be passed to OCIErrorGet() for
+                     diagnostic information in the event of an error.
+  
+  ------------------------------OCIDefineArrayOfStruct--------------------------
+  
+  
+  OCIDefineArrayOfStruct()
+  Name
+  OCI Define for Array of Structures
+  Purpose
+  This call specifies additional attributes necessary for a static array define.
+  Syntax
+  sword OCIDefineArrayOfStruct ( OCIDefine   *defnp,
+                               OCIError    *errhp,
+                               ub4         pvskip, 
+                               ub4         indskip, 
+                               ub4         rlskip,
+                               ub4         rcskip );
+  Comments
+  This call specifies additional attributes necessary for an array define, 
+  used in an array of structures (multi-row, multi-column) fetch.
+  For more information about skip parameters, see the section "Skip Parameters" 
+  on page 4-17.
+  Parameters
+  defnp (IN) - the handle to the define structure which was returned by a call 
+  to OCIDefineByPos().
+  errhp (IN) - an error handle which can be passed to OCIErrorGet() for 
+  diagnostic information in the event of an error.
+  pvskip (IN) - skip parameter for the next data value.
+  indskip (IN) - skip parameter for the next indicator location. 
+  rlskip (IN) - skip parameter for the next return length value.
+  rcskip (IN) - skip parameter for the next return code.
+  Related Functions
+  OCIAttrGet()
+  
+  
+  
+  
+  
+  OCIDefineByPos()
+  Name
+  OCI Define By Position
+  Purpose
+  Associates an item in a select-list with the type and output data buffer. 
+  Syntax
+  sb4 OCIDefineByPos ( 
+                OCIStmt     *stmtp, 
+                OCIDefine   **defnp,
+                OCIError    *errhp,
+                ub4         position,
+                dvoid       *valuep,
+                sb4         value_sz,
+                ub2         dty,
+                dvoid       *indp,
+                ub2         *rlenp,
+                ub2         *rcodep,
+                ub4         mode );
+  Comments
+  This call defines an output buffer which will receive data retreived from 
+  Oracle. The define is a local step which is necessary when a SELECT statement 
+  returns data to your OCI application.
+  This call also implicitly allocates the define handle for the select-list item.
+  Defining attributes of a column for a fetch is done in one or more calls. The 
+  first call is to OCIDefineByPos(), which defines the minimal attributes 
+  required to specify the fetch. 
+  This call takes as a parameter a define handle, which must have been 
+  previously allocated with a call to OCIHandleAlloc().
+  Following the call to OCIDefineByPos() additional define calls may be 
+  necessary for certain data types or fetch modes:
+  A call to OCIDefineArrayOfStruct() is necessary to set up skip parameters 
+  for an array fetch of multiple columns.
+  A call to OCIDefineObject() is necessary to set up the appropriate 
+  attributes of a named data type fetch. In this case the data buffer pointer 
+  in ocidefn() is ignored.
+  Both OCIDefineArrayOfStruct() and OCIDefineObject() must be called 
+  after ocidefn() in order to fetch multiple rows with a column of named 
+  data types.
+  For a LOB define, the buffer pointer must be a lob locator of type 
+  OCILobLocator , allocated by the OCIDescAlloc() call. LOB locators, and not 
+  LOB values, are always returned for a LOB column. LOB values can then be 
+  fetched using OCI LOB calls on the fetched locator.
+  For NCHAR (fixed and varying length), the buffer pointer must point to an 
+  array of bytes sufficient for holding the required NCHAR characters. 
+  Nested table columns are defined and fetched like any other named data type. 
+  If the mode parameter is this call is set to OCI_DYNAMIC_FETCH, the client 
+  application can fetch data dynamically at runtime.
+  Runtime data can be provided in one of two ways:
+  callbacks using a user-defined function which must be registered with a 
+  subsequent call to OCIDefineDynamic(). When the client library needs a 
+  buffer to return the fetched data, the callback will be invoked and the 
+  runtime buffers provided will return a piece or the whole data. 
+  a polling mechanism using calls supplied by the OCI. This mode is 
+  assumed if no callbacks are defined. In this case, the fetch call returns the 
+  OCI_NEED_DATA error code, and a piecewise polling method is used 
+  to provide the data.
+  Related Functions: For more information about using the 
+  OCI_DYNAMIC_FETCH mode, see the section "Runtime Data 
+  Allocation and Piecewise Operations" on page 5-16 of Volume 1..
+  For more information about the define step, see the section "Defining" 
+  on page 2-30.
+  Parameters
+  stmtp (IN) - a handle to the requested SQL query operation.
+  defnp (IN/OUT) - a pointer to a pointer to a define handle which is implicitly 
+  allocated by this call.  This handle is used to  store the define information 
+  for this column.
+  errhp (IN) - an error handle which can be passed to OCIErrorGet() for 
+  diagnostic information in the event of an error.
+  position (IN) - the position of this value in the select list. Positions are 
+  1-based and are numbered from left to right. For example, in the SELECT 
+  statement
+  SELECT empno, ssn, mgrno FROM employees;
+  empno is at position 1, ssn is at position 2, and mgrno is at position 3.
+  valuep (IN/OUT) - a pointer to a buffer or an array of buffers of the type 
+  specified in the dty parameter. A number of buffers can be specified when 
+  results for more than one row are desired in a single fetch call.
+  value_sz (IN) - the size of each valuep buffer in bytes. If the data is stored 
+  internally in VARCHAR2 format, the number of characters desired, if different 
+  from the buffer size in bytes, may be additionally specified by the using 
+  OCIAttrSet(). 
+  In an NLS conversion environment, a truncation error will be generated if the 
+  number of bytes specified is insufficient to handle the number of characters 
+  desired.
+  dty (IN) - the data type. Named data type (SQLT_NTY) and REF (SQLT_REF) 
+  are valid only if the environment has been intialized with in object mode. 
+  indp - pointer to an indicator variable or array. For scalar data types, 
+  pointer to sb2 or an array of sb2s. Ignored for named data types. For named 
+  data types, a pointer to a named data type indicator structure or an array of 
+  named data type indicator structures is associated by a subsequent 
+  OCIDefineObject() call. 
+  See the section "Indicator Variables" on page 2-43 for more information about 
+  indicator variables.
+  rlenp (IN/OUT) - pointer to array of length of data fetched. Each element in 
+  rlenp is the length of the data in the corresponding element in the row after 
+  the fetch. 
+  rcodep (OUT) - pointer to array of column-level return codes
+  mode (IN) - the valid modes are:
+  OCI_DEFAULT. This is the default mode.
+  OCI_DYNAMIC_FETCH. For applications requiring dynamically 
+  allocated data at the time of fetch, this mode must be used. The user may 
+  additionally call OCIDefineDynamic() to set up a callback function that 
+  will be invoked to receive the dynamically allocated buffers and to set 
+  up the memory allocate/free callbacks and the context for the callbacks. 
+  valuep and value_sz are ignored in this mode. 
+  Related Functions
+  OCIDefineArrayOfStruct(), OCIDefineDynamic(), OCIDefineObject()
+  
+  
+  
+  
+  OCIDefineDynamic()
+  Name
+  OCI Define Dynamic Fetch Attributes
+  Purpose
+  This call is used to set the additional attributes required if the 
+  OCI_DYNAMIC_FETCH mode was selected in OCIDefineByPos(). 
+  Syntax
+  sword OCIDefineDynamic( OCIDefine   *defnp,
+                        OCIError    *errhp,
+                        dvoid       *octxp, 
+                        OCICallbackDefine (ocbfp)(
+                                    dvoid             *octxp,
+                                    OCIDefine         *defnp,
+                                    ub4               iter, 
+                                    dvoid             **bufpp,
+                                    ub4               **alenpp,
+                                    ub1               *piecep,
+                                    dvoid             **indpp,
+                                    ub2               **rcodep)  );
+  Comments
+  This call is used to set the additional attributes required if the 
+  OCI_DYNAMIC_FETCH mode has been selected in a call to 
+  OCIDefineByPos(). 
+  When the OCI_DYNAMIC_FETCH mode is selected, buffers will be 
+  dynamically allocated for REF, and named data type, values to receive the 
+  data. The pointers to these buffers will be returned. 
+  If OCI_DYNAMIC_FETCH mode was selected, and the call to 
+  OCIDefineDynamic() is skipped, then the application can fetch data piecewise 
+  using OCI calls.
+  For more information about OCI_DYNAMIC_FETCH mode, see the section 
+  "Runtime Data Allocation and Piecewise Operations" on page 5-16.
+  Parameters
+  defnp (IN/OUT) - the handle to a define structure returned by a call to 
+  OCIDefineByPos().
+  errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
+  diagnostic information in the event of an error. 
+  octxp (IN) - points to a context for the callback function. 
+  ocbfp (IN) - points to a callback function. This is invoked at runtime to get 
+  a pointer to the buffer into which the fetched data or a piece of it will be 
+  retreived. The callback also specifies the indicator, the return code and the 
+  lengths of the data piece and indicator. The callback has the following 
+  parameters:
+  octxp (IN) - a context pointer passed as an argument to all the callback 
+  functions.
+  defnp (IN) - the define handle.
+  iter (IN) - which row of this current fetch.
+  bufpp (OUT) - returns a pointer to a buffer to store the column value, ie. 
+  *bufp points to some appropriate storage for the column value.
+  alenpp (OUT) - returns a pointer to the length of the buffer. *alenpp 
+  contains the size of the buffer after return from callback. Gets set to 
+  actual data size after fetch.
+  piecep (IN/OUT) - returns a piece value, as follows:
+  The IN value can be OCI_ONE_PIECE, OCI_FIRST_PIECE or 
+  OCI_NEXT_PIECE.
+  The OUT value can be OCI_ONE_PIECE if the IN value was 
+  OCI_ONE_PIECE.
+  The OUT value can be OCI_ONE_PIECE or OCI_FIRST_PIECE if 
+  the IN value was OCI_FIRST_PIECE.
+  The OUT value can only be OCI_NEXT_PIECE or 
+  OCI_LAST_PIECE if the IN value was OCI_NEXT_PIECE. 
+  indpp (IN) - indicator variable pointer
+  rcodep (IN) - return code variable pointer
+  Related Functions
+  OCIAttrGet()
+  OCIDefineObject()
+  
+  
+  
+  
+  OCIDefineObject()
+  Name
+  OCI Define Named Data Type attributes
+  Purpose
+  Sets up additional attributes necessary for a Named Data Type define.
+  Syntax
+  sword OCIDefineObject ( OCIDefine       *defnp,
+                        OCIError        *errhp,
+                        CONST OCIType   *type,
+                        dvoid           **pgvpp, 
+                        ub4             *pvszsp, 
+                        dvoid           **indpp, 
+                        ub4             *indszp );
+  Comments
+  This call sets up additional attributes necessary for a Named Data Type define.
+  An error will be returned if this function is called when the OCI environment 
+  has been initialized in non-Object mode.
+  This call takes as a paramter a type descriptor object (TDO) of datatype 
+  OCIType for the named data type being defined.  The TDO can be retrieved 
+  with a call to OCITypeByName().
+  See the description of OCIInitialize() on page 13 - 43 for more information 
+  about initializing the OCI process environment.
+  Parameters
+  defnp (IN/OUT) - a define handle previously allocated in a call to 
+  OCIDefineByPos(). 
+  errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
+  diagnostic information in the event of an error.
+  type (IN, optional) - points to the Type Descriptor Object (TDO) which 
+  describes the type of the program variable. Only used for program variables 
+  of type SQLT_NTY. This parameter is optional, and may be passed as NULL 
+  if it is not being used.
+  pgvpp (IN/OUT) - points to a pointer to a program variable buffer. For an 
+  array, pgvpp points to an array of pointers. Memory for the fetched named data 
+  type instance(s) is dynamically allocated in the object cache. At the end of 
+  the fetch when all the values have been received, pgvpp points to the 
+  pointer(s) to these newly allocated named data type instance(s). The 
+  application must call OCIObjectMarkDel() to deallocate the named data type 
+  instance(s) when they are no longer needed. 
+  pvszsp (IN/OUT) - points to the size of the program variable. For an array, it 
+  is an array of ub4s. On return points to the size(s) of unpickled fetched 
+  values.
+  indpp (IN/OUT) - points to a pointer to the program variable buffer 
+  containing the parallel indicator structure. For an array, points to an array 
+  of pointers. Memory is allocated to store the indicator structures in the 
+  object cache. At the end of the fetch when all values have been received, 
+  indpp points to the pointer(s) to these newly allocated indicator structure(s).
+  indszp (IN/OUT) - points to the size(s) of the indicator structure program 
+  variable. For an array, it is an array of ub4s. On return points to the size(s)
+  of the unpickled fetched indicator values.
+  Related Functions
+  OCIAttrGet()
+  
+  
+  
+  OCIDescAlloc()
+  Name
+  OCI Get DESCriptor or lob locator
+  Purpose
+  Allocates storage to hold certain data types. The descriptors can be used as 
+  bind or define variables.
+  Syntax
+  sword OCIDescAlloc ( CONST dvoid   *parenth,
+                     dvoid         **descpp, 
+                     ub4           type,
+                     size_t        xtramem_sz,
+                     dvoid         **usrmempp);
+  Comments
+  Returns a pointer to an allocated and initialized structure, corresponding to 
+  the type specified in type. A non-NULL descriptor or LOB locator is returned 
+  on success. No diagnostics are available on error.
+  This call returns OCI_SUCCESS if successful, or OCI_INVALID_HANDLE if 
+  an out-of-memory error occurs. 
+  Parameters
+  parenth (IN) - an environment handle. 
+  descpp (OUT) - returns a descriptor or LOB locator of desired type. 
+  type (IN) - specifies the type of descriptor or LOB locator to be allocated. 
+  The specific types are:
+  OCI_DTYPE_SNAP - specifies generation of snapshot descriptor of C 
+  type - OCISnapshot
+  OCI_DTYPE_LOB - specifies generation of a LOB data type locator of C 
+  type - OCILobLocator
+  OCI_DTYPE_RSET - specifies generation of a descriptor of C type 
+  OCIResult that references a result set (a number of rows as a result of a 
+  query). This descriptor is bound to a bind variable of data type 
+  SQLT_RSET (result set). The descriptor has to be converted into a 
+  statement handle using a function - OCIResultSetToStmt() - which can 
+  then be passed to OCIDefineByPos() and OCIStmtFetch() to retrieve the 
+  rows of the result set.
+  OCI_DTYPE_ROWID - specifies generation of a ROWID descriptor of C 
+  type OCIRowid.
+  OCI_DTYPE_COMPLEXOBJECTCOMP - specifies generation of a 
+  complex object retrieval descriptor of C type 
+  OCIComplexObjectComp.
+  xtramemsz (IN) - specifies an amount of user memory to be allocated for use 
+  by the application. 
+  usrmempp (OUT) - returns a pointer to the user memory of size xtramemsz 
+  allocated by the call for the user. 
+  Related Functions
+  OCIDescFree()
+  
+  
+  
+  
+  OCIDescFree()
+  Name
+  OCI Free DESCriptor
+  Purpose
+  Deallocates a previously allocated descriptor.
+  Syntax
+  sword OCIDescFree ( dvoid    *descp,
+                    ub4      type);
+  Comments
+  This call frees up storage associated with the descriptor, corresponding to the
+  type specified in type. Returns OCI_SUCCESS or OCI_INVALID_HANDLE. 
+  All descriptors must be explicitly deallocated. OCI will not deallocate a 
+  descriptor if the environment handle is deallocated.
+  Parameters
+  descp (IN) - an allocated descriptor. 
+  type (IN) - specifies the type of storage to be freed. The specific types are: 
+  OCI_DTYPE_SNAP - snapshot descriptor
+  OCI_DTYPE_LOB - a LOB data type descriptor
+  OCI_DTYPE_RSET - a descriptor that references a result set (a number 
+  of rows as a result of a query).
+  OCI_DTYPE_ROWID - a ROWID descriptor
+  OCI_DTYPE_COMPLEXOBJECTCOMP - a complex object retrieval 
+  descriptor
+  Related Functions
+  OCIDescAlloc()
+  
+  
+  
+  OCIDescribeAny()
+  Name
+  OCI DeSCribe Any
+  Purpose
+  Describes existing schema objects.
+  Syntax
+  sword OCIDescribeAny ( OCISvcCtx     *svchp,
+                       OCIError      *errhp,
+                       dvoid         *objptr,
+                       ub4           objnm_len,
+                       ub1           objptr_typ,
+                       ub1           info_level,
+                       ub1           objtype,
+                       OCIDesc       *dschp );
+  Comments
+  This is a generic describe call that describes existing schema objects: tables,
+  views, synonyms, procedures, functions, packages, sequences, and types. As a 
+  result of this call, the describe handle is populated with the object-specific 
+  attributes which can be obtained through an OCIAttrGet() call.
+  An OCIParamGet() on the describe handle returns a parameter descriptor for a 
+  specified position. Parameter positions begin with 1. Calling OCIAttrGet() on 
+  the parameter descriptor returns the specific attributes of a stored procedure 
+  or function parameter or a table column descriptor as the case may be. 
+  These subsequent calls do not need an extra round trip to the server because 
+  the entire schema object description cached on the client side by 
+  OCIDescribeAny(). Calling OCIAttrGet() on the describe handle can also return 
+  the total number of positions.
+  See the section "Describing" on page 2-33 for more information about describe 
+  operations.
+  Parameters
+  TO BE UPDATED
+  svchp (IN/OUT) - a service context handle.
+  errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
+  diagnostic information in the event of an error.
+  objptr (IN) - the name of the object (a null-terminated string) to be 
+  described. Only procedure or function names are valid when connected to an 
+  Oracle7 Server.
+  objptr_len (IN) - the length of the string. Must be non-zero.
+  objptr_typ (IN) - Must be OCI_OTYPE_NAME, OCI_OTYPE_REF, or OCI_OTYPE_PTR.
+  info_level (IN) - reserved for future extensions. Pass OCI_DEFAULT.
+  objtype (IN/OUT) - object type.
+  dschp (IN/OUT) - a describe handle that is populated with describe 
+  information about the object after the call.
+  Related Functions
+  OCIAttrGet()
+  
+  
+  
+  OCIEnvCreate()
+  Name
+  OCI ENVironment CREATE
+  Purpose
+  This function creates and initializes an environment for the rest of
+  the OCI functions to work under.  This call is a replacement for both
+  the OCIInitialize and OCIEnvInit calls.
+  Syntax
+  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 );
+   
+  Comments
+  This call creates an environment for all the OCI calls using the modes
+  specified by the user. This call can be used instead of the two calls
+  OCIInitialize and OCIEnvInit. This function 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. 
+  
+  This call should be invoked before anny other OCI call and should be used
+  instead of the OCIInitialize and OCIEnvInit calls. This is the recommended
+  call, although OCIInitialize and OCIEnvInit calls will still be supported
+  for backward compatibility. 
+   
+  envpp (OUT) - a pointer to a handle to the environment. 
+  mode (IN) - specifies initialization of the mode. The valid modes are:
+  OCI_DEFAULT - default mode.
+  OCI_THREADED - threaded environment. In this mode, internal data 
+  structures are protected from concurrent accesses by multiple threads. 
+  OCI_OBJECT - will use navigational object interface. 
+  ctxp (IN) - user defined context for the memory call back routines. 
+  malocfp (IN) - user-defined memory allocation function. If mode is 
+  OCI_THREADED, this memory allocation routine must be thread safe.
+  ctxp - context pointer for the user-defined memory allocation function.
+  size - size of memory to be allocated by the user-defined memory 
+  allocation function
+  ralocfp (IN) - user-defined memory re-allocation function. If mode is 
+  OCI_THREADED, this memory allocation routine must be thread safe.
+  ctxp - context pointer for the user-defined memory reallocation 
+  function.
+  memp - pointer to memory block
+  newsize - new size of memory to be allocated
+  mfreefp (IN) - user-defined memory free function. If mode is 
+  OCI_THREADED, this memory free routine must be thread safe.
+  ctxp - context pointer for the user-defined memory free function.
+  memptr - pointer to memory to be freed
+  xtramemsz (IN) - specifies the amount of user memory to be allocated. 
+  usrmempp (OUT) - returns a pointer to the user memory of size xtramemsz 
+  allocated by the call for the user.
+  
+  Example
+  
+  Related Functions
+  OCIInitialize, OCIEnvInit
+  
+  OCIEnvNlsCreate()
+  Name
+  OCI ENVironment CREATE with NLS info
+  Purpose
+  This function does almost everything OCIEnvCreate does, plus enabling setting
+  of charset and ncharset programmatically, except OCI_UTF16 mode.
+  Syntax
+  sword OCIEnvNlsCreate(OCIEnv        **envhpp,
+                        ub4           mode,
+                        dvoid         *ctxp,
+                        dvoid         *(*malocfp)
+                                      (dvoid *ctxp,
+                                          size_t size),
+                        dvoid         *(*ralocfp)
+                                      (dvoid *ctxp,
+                                         dvoid *memptr,
+                                         size_t newsize),
+                        void          (*mfreefp)
+                                      (dvoid *ctxp,
+                                         dvoid *memptr),
+                        size_t        xtramemsz,
+                        dvoid         **usrmempp,
+                        ub2           charset,
+                        ub2           ncharset)
+  Comments
+  The charset and ncharset must be both zero or non-zero.
+  The parameters have the same meaning as the ones in OCIEnvCreate().
+  When charset or ncharset is non-zero, the corresponding character set will
+  be used to replace the ones specified in NLS_LANG or NLS_NCHAR. Moreover,
+  OCI_UTF16ID is allowed to be set as charset and ncharset.
+  On the other hand, OCI_UTF16 mode is deprecated with this function. 
+  Applications can achieve the same effects by setting 
+  both charset and ncharset as OCI_UTF16ID.
+  
+  
+  OCIEnvInit()
+  Name
+  OCI INITialize environment
+  Purpose
+  This call initializes the OCI environment handle.
+  Syntax
+  sword OCIEnvInit ( OCIEnv    **envp,
+                   ub4       mode,
+                   size_t    xtramemsz,
+                   dvoid     **usrmempp );
+  Comments
+  Initializes the OCI environment handle. No changes are done on an initialized 
+  handle. If OCI_ERROR or OCI_SUCCESS_WITH_INFO is returned, the 
+  environment handle can be used to obtain ORACLE specific errors and 
+  diagnostics.
+  This call is processed locally, without a server round-trip.
+  Parameters
+  envpp (OUT) - a pointer to a handle to the environment. 
+  mode (IN) - specifies initialization of an environment mode. The only valid 
+  mode is OCI_DEFAULT for default mode
+  xtramemsz (IN) - specifies the amount of user memory to be allocated. 
+  usrmempp (OUT) - returns a pointer to the user memory of size xtramemsz 
+  allocated by the call for the user.
+  Example
+  See the description of OCISessionBegin() on page 13-84 for an example showing 
+  the use of OCIEnvInit(). 
+  Related Functions
+  
+  
+  
+  
+  OCIErrorGet()
+  Name
+  OCI Get Diagnostic Record
+  Purpose
+  Returns an error message in the buffer provided and an ORACLE error.
+  Syntax
+  sword OCIErrorGet ( dvoid      *hndlp, 
+                    ub4        recordno,
+                    OraText       *sqlstate,
+                    ub4        *errcodep, 
+                    OraText       *bufp,
+                    ub4        bufsiz,
+                    ub4        type );
+  Comments
+  Returns an error message in the buffer provided and an ORACLE error. 
+  Currently does not support SQL state. This call can be called a multiple 
+  number of times if there are more than one diagnostic record for an error.
+  The error handle is originally allocated with a call to OCIHandleAlloc().
+  Parameters
+  hndlp (IN) - the error handle, in most cases, or the environment handle (for 
+  errors on OCIEnvInit(), OCIHandleAlloc()).
+  recordno (IN) - indicates the status record from which the application seeks 
+  info. Starts from 1. 
+  sqlstate (OUT) - Not supported in Version 8.0.
+  errcodep (OUT) - an ORACLE Error is returned.
+  bufp (OUT) - the error message text is returned.
+  bufsiz (IN) - the size of the buffer provide to get the error message.
+  type (IN) - the type of the handle.
+  Related Functions
+  OCIHandleAlloc()
+  
+  OCIExtractInit
+  Name
+  OCI Extract Initialize 
+  Purpose
+  This function initializes the parameter manager. 
+  Syntax
+  sword OCIExtractInit(dvoid *hndl, OCIError *err);
+  Comments
+  It must be called before calling any other parameter manager routine. The NLS 
+  information is stored inside the parameter manager context and used in 
+  subsequent calls to OCIExtract routines.
+  Returns OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR
+  Parameters
+  hndl (IN/OUT) - The OCI environment or session handle.
+  err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in 
+                 err and this function returns OCI_ERROR. Diagnostic information 
+                 can be obtained by calling OCIErrorGet().
+  Related Functions
+  OCIExtractTerm()
+  
+  OCIExtractTerm
+  Name
+  OCI Extract Terminate
+  Purpose
+  This function releases all dynamically allocated storage and may perform 
+  other internal bookkeeping functions.
+  Syntax
+  sword OCIExtractTerm(dvoid *hndl, OCIError *err);
+  Comments
+  It must be called when the parameter manager is no longer being used.
+  Returns OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR
+  Parameters
+  hndl (IN/OUT) - The OCI environment or session handle.
+  err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in 
+                 err and this function returns OCI_ERROR. Diagnostic information 
+                 can be obtained by calling OCIErrorGet().
+  Related Functions
+  OCIExtractInit()
+  
+  OCIExtractReset
+  Name
+  OCI Extract Reset
+  Purpose
+  The memory currently used for parameter storage, key definition storage, and 
+  parameter value lists is freed and the structure is reinitialized.
+  Syntax
+  sword OCIExtractReset(dvoid *hndl, OCIError *err);
+  Comments
+  Returns OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR
+  Parameters
+  hndl (IN/OUT) - The OCI environment or session handle.
+  err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in 
+                 err and this function returns OCI_ERROR. Diagnostic information 
+                 can be obtained by calling OCIErrorGet().
+  Related Functions
+  
+  OCIExtractSetNumKeys
+  Name
+  OCI Extract Set Number of Keys
+  Purpose
+  Informs the parameter manager of the number of keys that will be registered.
+  Syntax
+  sword OCIExtractSetNumKeys(dvoid *hndl, OCIError *err, uword numkeys);
+  Comments
+  This routine must be called prior to the first call of OCIExtractSetKey().  
+  Returns OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR
+  Parameters
+  hndl (IN/OUT) - The OCI environment or session handle.
+  err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in 
+                 err and this function returns OCI_ERROR. Diagnostic information 
+                 can be obtained by calling OCIErrorGet().
+  numkeys (IN) - The number of keys that will be registered with 
+                 OCIExtractSetKey().
+  Related Functions
+  OCIExtractSetKey()
+  
+  OCIExtractSetKey
+  Name
+  OCI Extract Set Key definition
+  Purpose
+  Registers information about a key with the parameter manager.
+  Syntax
+  sword OCIExtractSetKey(dvoid *hndl, OCIError *err, CONST OraText *name, 
+                         ub1 type, ub4 flag, CONST dvoid *defval,
+                         CONST sb4 *intrange, CONST OraText *CONST *strlist);
+  Comments
+  This routine must be called after calling OCIExtractSetKey() and before 
+  calling OCIExtractFromFile() or OCIExtractFromStr().  
+  Returns OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR
+  Parameters
+  hndl (IN/OUT) - The OCI environment or session handle.
+  err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in 
+                 err and this function returns OCI_ERROR. Diagnostic information 
+                 can be obtained by calling OCIErrorGet().
+  name (IN) - The name of the key.
+  type (IN) - The type of the key (OCI_EXTRACT_TYPE_INTEGER, 
+              OCI_EXTRACT_TYPE_OCINUM, OCI_EXTRACT_TYPE_STRING, or 
+              OCI_EXTRACT_TYPE_BOOLEAN).
+  flag (IN) - Set to OCI_EXTRACT_MULTIPLE if the key can take multiple values 
+              or 0 otherwise.
+  defval (IN) - Set to the default value for the key.  May be NULL if there is 
+                 no default.  A string default must be a (text*) type, an 
+                 integer default must be an (sb4*) type, and a boolean default 
+                 must be a (ub1*) type.
+  intrange (IN) - Starting and ending values for the allowable range of integer 
+                  values.  May be NULL if the key is not an integer type or if 
+                  all integer values are acceptable.
+  strlist (IN) - List of all acceptable text strings for the key.  May be NULL 
+                 if the key is not a string type or if all text values are 
+                 acceptable.
+  Related Functions
+  OCIExtractSetNumKeys()
+  
+  OCIExtractFromFile
+  Name
+  OCI Extract parameters From File
+  Purpose
+  The keys and their values in the given file are processed. 
+  Syntax
+  sword OCIExtractFromFile(dvoid *hndl, OCIError *err, ub4 flag, 
+                           OraText *filename);
+  Comments
+  Returns OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR
+  Parameters
+  hndl (IN/OUT) - The OCI environment or session handle.
+  err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in 
+                 err and this function returns OCI_ERROR. Diagnostic information 
+                 can be obtained by calling OCIErrorGet().
+  flag (IN) - Zero or has one or more of the following bits set: 
+             OCI_EXTRACT_CASE_SENSITIVE, OCI_EXTRACT_UNIQUE_ABBREVS, or 
+             OCI_EXTRACT_APPEND_VALUES. 
+  filename (IN) - Null-terminated filename string.
+  Related Functions
+  
+  OCIExtractFromStr
+  Name
+  OCI Extract parameters From String
+  Purpose
+  The keys and their values in the given string are processed. 
+  Syntax
+  sword OCIExtractFromStr(dvoid *hndl, OCIError *err, ub4 flag, OraText *input);
+  Comments
+  Returns OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR
+  Parameters
+  hndl (IN/OUT) - The OCI environment or session handle.
+  err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in 
+                 err and this function returns OCI_ERROR. Diagnostic information 
+                 can be obtained by calling OCIErrorGet().
+  flag (IN) - Zero or has one or more of the following bits set: 
+             OCI_EXTRACT_CASE_SENSITIVE, OCI_EXTRACT_UNIQUE_ABBREVS, or 
+             OCI_EXTRACT_APPEND_VALUES. 
+  input (IN) - Null-terminated input string.
+  Related Functions
+  
+  OCIExtractToInt
+  Name
+  OCI Extract To Integer
+  Purpose
+  Gets the integer value for the specified key.
+  Syntax
+  sword OCIExtractToInt(dvoid *hndl, OCIError *err, OraText *keyname, 
+                        uword valno, sb4 *retval);
+  Comments
+  The valno'th value (starting with 0) is returned.
+  Returns OCI_SUCCESS, OCI_INVALID_HANDLE, OCI_NO_DATA, or OCI_ERROR. 
+  OCI_NO_DATA means that there is no valno'th value for this key.
+  Parameters
+  hndl (IN) - The OCI environment or session handle.
+  err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in 
+                 err and this function returns OCI_ERROR. Diagnostic information 
+                 can be obtained by calling OCIErrorGet().
+  keyname (IN) - Key name.
+  valno (IN) - Which value to get for this key.
+  retval (OUT) - The actual integer value.
+  Related Functions
+  
+  OCIExtractToBool
+  Name
+  OCI Extract To Boolean
+  Purpose
+  Gets the boolean value for the specified key. 
+  Syntax
+  sword OCIExtractToBool(dvoid *hndl, OCIError *err, OraText *keyname, 
+                         uword valno, ub1 *retval);
+  Comments
+  The valno'th value (starting with 0) is returned.
+  Returns OCI_SUCCESS, OCI_INVALID_HANDLE, OCI_NO_DATA, or OCI_ERROR. 
+  OCI_NO_DATA means that there is no valno'th value for this key.
+  Parameters
+  hndl (IN) - The OCI environment or session handle.
+  err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in 
+                 err and this function returns OCI_ERROR. Diagnostic information 
+                 can be obtained by calling OCIErrorGet().
+  keyname (IN) - Key name.
+  valno (IN) - Which value to get for this key.
+  retval (OUT) - The actual boolean value.
+  Related Functions
+  
+  OCIExtractToStr
+  Name
+  OCI Extract To String
+  Purpose
+  Gets the string value for the specified key.
+  Syntax
+  sword OCIExtractToStr(dvoid *hndl, OCIError *err, OraText *keyname, 
+                        uword valno, OraText *retval, uword buflen);
+  Comments
+  The valno'th value (starting with 0) is returned.
+  Returns OCI_SUCCESS, OCI_INVALID_HANDLE, OCI_NO_DATA, or OCI_ERROR. 
+  OCI_NO_DATA means that there is no valno'th value for this key.
+  Parameters
+  hndl (IN) - The OCI environment or session handle.
+  err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in 
+                 err and this function returns OCI_ERROR. Diagnostic information 
+                 can be obtained by calling OCIErrorGet().
+  keyname (IN) - Key name.
+  valno (IN) - Which value to get for this key.
+  retval (OUT) - The actual null-terminated string value.
+  buflen (IN) - The length of the buffer for retval.
+  Related Functions
+  
+  Note: The following OCIExtract functions are unavailable in this release
+  
+  OCIExtractToOCINum
+  Name
+  OCI Extract To OCI Number
+  Purpose
+  Gets the OCINumber value for the specified key.
+  Syntax
+  sword OCIExtractToOCINum(dvoid *hndl, OCIError *err, OraText *keyname, 
+                           uword valno, OCINumber *retval);
+  Comments
+  The valno'th value (starting with 0) is returned.
+  Returns OCI_SUCCESS, OCI_INVALID_HANDLE, OCI_NO_DATA, or OCI_ERROR. 
+  OCI_NO_DATA means that there is no valno'th value for this key.
+  Parameters
+  hndl (IN) - The OCI environment or session handle.
+  err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in 
+                 err and this function returns OCI_ERROR. Diagnostic information 
+                 can be obtained by calling OCIErrorGet().
+  keyname (IN) - Key name.
+  valno (IN) - Which value to get for this key.
+  retval (OUT) - The actual OCINumber value.
+  Related Functions
+  
+  OCIExtractToList
+  Name
+  OCI Extract To parameter List
+  Purpose
+  Generates a list of parameters from the parameter structures that are stored 
+  in memory. 
+  Syntax
+  sword OCIExtractToList(dvoid *hndl, OCIError *err, uword *numkeys);
+  Comments
+  Must be called before OCIExtractValues() is called.
+  Returns OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR
+  Parameters
+  hndl (IN) - The OCI environment or session handle.
+  err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in 
+                 err and this function returns OCI_ERROR. Diagnostic information 
+                 can be obtained by calling OCIErrorGet().
+  numkeys (OUT) - Number of distinct keys stored in memory.
+  Related Functions
+  OCIExtractFromList()
+  
+  OCIExtractFromList
+  Name
+  OCI Extract From parameter List
+  Purpose
+  Generates a list of values for the a parameter in the parameter list.
+  Syntax
+  sword OCIExtractFromList(dvoid *hndl, OCIError *err, uword index, 
+                           OraText *name, ub1 *type, uword *numvals, 
+                           dvoid ***values);
+  Comments
+  Parameters are specified by an index. OCIExtractToList() must be called prior 
+  to calling this routine to generate the parameter list from the parameter 
+  structures that are stored in memory. 
+  Returns OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR
+  Parameters
+  hndl (IN) - The OCI environment or session handle.
+  err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in 
+                 err and this function returns OCI_ERROR. Diagnostic information 
+                 can be obtained by calling OCIErrorGet().
+  name (OUT) - Name of the key for the current parameter.
+  type (OUT) - Type of the current parameter (OCI_EXTRACT_TYPE_STRING, 
+               OCI_EXTRACT_TYPE_INTEGER, OCI_EXTRACT_TYPE_OCINUM, or 
+               OCI_EXTRACT_TYPE_BOOLEAN)
+  numvals (OUT) - Number of values for this parameter.
+  values (OUT) - The values for this parameter.
+  Related Functions
+  OCIExtractToList()
+  
+  
+  ************************  OCIFileClose() ***********************************
+   
+  Name
+   OCIFileClose - Oracle Call Interface FILE i/o CLOSE
+  
+  Purpose
+   Close a previously opened file.
+  
+  Syntax
+   sword OCIFileClose ( dvoid             *hndl, 
+                        OCIError          *err,
+                        OCIFileObject     *filep )
+  
+  Comments
+   This function will close a previously opened file. If the function succeeds
+   then OCI_SUCCESS will be returned, else OCI_ERROR. 
+   
+  Parameters
+   hndl  (IN) - the OCI environment or session handle.
+   err (OUT) - the OCI error handle
+   filep (IN) - the OCIFile file object
+  
+  Related Functions
+   OCIFileOpen.  
+  
+  
+  
+  ********************* OCIFileExists() **************************************
+  
+  Name
+   OCIFileExists - Oracle Call Interface FILE i/o EXIST
+  
+  Purpose
+   Check to see if the file exists.
+  
+  Syntax
+   sword OCIFileExists ( dvoid           *hndl, 
+                        OCIError         *err, 
+                        OraText          *filename,
+                        OraText          *path,
+                        ub1              *flag )
+  
+  Comments
+   This function will set the flag to TRUE if the file exists else it will
+   be set to FALSE.
+   The function will return OCI_ERROR if any error is encountered, else
+   it will return OCI_ERROR. 
+  
+  Parameters
+   hndl(IN) - OCI environment or session handle
+   err(OUT) - OCI error handle
+   filename(IN) - filename
+   path(IN) - path of the file
+   flag(OUT) - whether the file exists or not
+  
+  Related Functions.
+   None.
+       
+  
+   **************************** OCIFileFlush() ******************************
+  
+  
+  Name
+   OCIFileFlush - Oracle Call Interface File i/o FLUSH
+  
+  Purpose
+   Flush the buffers associated with the file to the disk.
+  
+  Syntax
+   sword OCIFileFlush ( dvoid             *hndl, 
+                        OCIError          *err,
+                        OCIFileObject     *filep )
+  
+  Comments
+   The function will return OCI_ERROR if any error is encountered, else
+   it will return OCI_ERROR.
+  
+  Parameters 
+   hndl (IN) - the OCI environment or session handle.
+   err (OUT) - the OCI error handle
+   filep (IN) - the OCIFile file object
+  
+  Related Functions
+   OCIFileOpen, OCIFileWrite
+  
+  
+  
+   *************************** OCIFileGetLength() ****************************
+  
+  Name
+   OCIFileGetLength - Oracle Call Interface FILE i/o GET file LENGTH
+  
+  Purpose
+   Get the length of a file.
+  
+  Syntax
+   OCIFileGetLength(dvoid           *hndl, 
+                    OCIError        *err,
+                    OraText         *filename,
+                    OraText         *path,
+                    ubig_ora        *lenp )
+  
+  Comments
+   The length of the file will be returned in lenp.
+   The function will return OCI_ERROR if any error is encountered, else
+   it will return OCI_ERROR.
+   
+  Parameters
+   hndl (IN) - the OCI environment or session handle.
+   err (OUT) - the OCI error handle.  If  there is an error, it is recorded 
+   in err and this function returns OCI_ERROR.  Diagnostic information can be 
+   obtained by calling OCIErrorGet().
+   filename (IN) - file name.
+   path (IN) - path of the file.
+   lenp (OUT) - On output, it is the length of the file in bytes.
+   is the number of bytes in the file.
+  
+  Related Functions
+   None.
+  
+  
+  
+  ******************************** OCIFileInit() *****************************
+     
+  Name
+   OCIFileInit - Oracle Call Interface FILE i/o INITialize
+  
+  Purpose
+   Initialize the OCI File I/O package and create the OCIFile context.
+  
+  Syntax
+   sword OCIFileInit ( dvoid *hndl, 
+                       OCIError *err)
+  
+  Comments
+   This function should be called before any of the OCIFile functions are
+   used.
+   The function will return OCI_ERROR if any error is encountered, else
+   it will return OCI_ERROR.
+   
+  Parameters
+   hndl(IN) - OCI environment or session handle.
+   err(OUT) - OCI error structure.
+  
+  Related Functions
+   OCIFileTerm
+       
+  
+  
+  ********************************* OCIFileOpen() *****************************
+  
+  Name
+   OCIFileOpen - Oracle Call Interface File i/o OPEN
+  
+  Purpose
+       Open a file.
+  
+  Syntax
+   sword OCIFileOpen ( dvoid               *hndl, 
+                       OCIError            *err,
+                       OCIFileObject      **filep,
+                       OraText             *filename,
+                       OraText             *path,
+                       ub4                  mode,
+                       ub4                  create, 
+                       ub4                  type )
+  
+  Comments
+   OCIFileOpen returns a handle to the open file in filep if the file is
+   successfully opened. 
+   If one wants to use the standard file objects (stdin, stdout & stderr)
+   then OCIFileOpen whould be called with the type filed containing the 
+   appropriate type (see the parameter type). If any of the standard files 
+   are specified then filename, path, mode and create are ignored.
+   The function will return OCI_ERROR if any error is encountered, else
+   it will return OCI_ERROR.
+  
+  Parameters
+   hndl (OUT) - the OCI environment or session handle.
+   err (OUT) - the OCI error handle.  If  there is an error, it is recorded 
+   in err and this function returns OCI_ERROR.  Diagnostic information can be 
+   obtained by calling OCIErrorGet().
+   filep (OUT) - the file object to be returned.
+   filename (IN) - file name (NULL terminated string).
+   path (IN) - path of the file (NULL terminated string).
+   mode - mode in which to open the file (valid modes are OCI_FILE_READONLY,
+   OCI_FILE_WRITEONLY, OCI_FILE_READ_WRITE).
+   create - should the file be created if it does not exist. Valid values
+   are: 
+       OCI_FILE_TRUNCATE - create a file regardless of whether or not it exists. 
+                          If the file already exists overwrite it.
+       OCI_FILE_EXIST - open it if it exists, else fail.
+       OCI_FILE_EXCL - fail if the file exists, else create.
+       OCI_FILE_CREATE - open the file if it exists, and create it if it doesn't.
+       OCI_FILE_APPEND - set the file pointer to the end of the file prior to 
+                        writing(this flag can be OR'ed with OCI_FILE_EXIST or
+                        OCI_FILE_CREATE).
+  type - file type. Valid values are OCI_FILE_TEXT, OCI_FILE_BIN, 
+         OCI_FILE_STDIN, OCI_FILE_STDOUT and OCI_FILE_STDERR.
+         If any of the standard files are specified then filename, path, mode
+         and create are ignored.
+  
+  Related Functions.
+   OCIFileClose
+  
+  
+  
+  ************************** OCIFileRead() ************************************
+     
+  Name
+   OCIFileRead - Oracle Call Interface FILE i/o READ
+  
+  Purpose
+   Read from a file into a buffer.
+  
+  Syntax
+   sword OCIFileRead ( dvoid            *hndl, 
+                       OCIError         *err,
+                       OCIFileObject    *filep,
+                       dvoid            *bufp,
+                       ub4               bufl,
+                       ub4              *bytesread )
+  
+  Comments
+   Upto bufl bytes from the file will be read into bufp. The user should
+   allocate memory for the buffer.
+   The number of bytes read would be in bytesread.
+   The function will return OCI_ERROR if any error is encountered, else
+   it will return OCI_ERROR.
+  
+  Parameters
+   hndl (IN) - the OCI environment or session handle.
+   err (OUT) - the OCI error handle.  If  there is an error, it is recorded 
+   in err and this function returns OCI_ERROR.  Diagnostic information can be 
+   obtained by calling OCIErrorGet().
+   filep (IN/OUT) - a File Object that uniquely references the file.
+   bufp (IN) - the pointer to a buffer into which the data will be read. The 
+   length of the allocated memory is assumed to be bufl. 
+   bufl - the length of the buffer in bytes. 
+   bytesread (OUT) - the number of bytes read.
+  
+  Related Functions
+   OCIFileOpen, OCIFileSeek, OCIFileWrite
+  
+  
+  
+  ****************************** OCIFileSeek() ******************************
+  
+  Name
+   OCIFileSeek - Oracle Call Interface FILE i/o SEEK
+  
+  Purpose
+   Perfom a seek to a byte position.
+  
+  Syntax
+   sword OCIFileSeek ( dvoid           *hndl, 
+                       OCIError        *err,  
+                       OCIFileObject   *filep,
+                       uword            origin,
+                       ubig_ora         offset,
+                       sb1              dir)
+  
+  Comments
+   The function will return OCI_ERROR if any error is encountered, else
+   it will return OCI_ERROR.
+  
+  Parameters
+   hndl (IN) - the OCI environment or session handle.
+   err (OUT) - the OCI error handle.  If  there is an error, it is recorded 
+   in err and this function returns OCI_ERROR.  Diagnostic information can be 
+   obtained by calling OCIErrorGet().
+   filep (IN/OUT) - a file handle that uniquely references the file.
+   origin - The starting point we want to seek from. NOTE: The starting 
+   point may be OCI_FILE_SEEK_BEGINNING (beginning), OCI_FILE_SEEK_CURRENT 
+   (current position), or OCI_FILE_SEEK_END (end of file). 
+   offset - The number of bytes from the origin we want to start reading from. 
+   dir - The direction we want to go from the origin. NOTE: The direction 
+   can be either OCI_FILE_FORWARD or OCI_FILE_BACKWARD. 
+   
+  Related Function
+   OCIFileOpen, OCIFileRead, OCIFileWrite
+  
+  
+  
+  *************************** OCIFileTerm() **********************************
+  
+  Name
+   OCIFileTerm - Oracle Call Interface FILE i/o TERMinate
+  
+  Purpose
+   Terminate the OCI File I/O package and destroy the OCI File context.
+  
+  Syntax
+   sword OCIFileTerm ( dvoid *hndl, 
+                       OCIError *err )
+  
+  Comments
+   After this function has been called no OCIFile function should be used.
+   The function will return OCI_ERROR if any error is encountered, else
+   it will return OCI_ERROR.
+   
+  Parameters
+   hndl(IN) - OCI environment or session handle.
+   err(OUT) - OCI error structure. 
+    
+  Related Functions 
+   OCIFileInit   
+   
+  
+  ********************************* OCIFileWrite() **************************** 
+  
+  Name 
+   OCIFileWrite - Oracle Call Interface FILE i/o WRITE
+  
+  Purpose
+    Write data from buffer into a file.
+  
+  Syntax
+   sword OCIFileWrite ( dvoid            *hndl, 
+                        OCIError         *err,  
+                        OCIFileObject    *filep,
+                        dvoid            *bufp, 
+                        ub4               buflen
+                        ub4              *byteswritten )
+  
+  Comments
+   The number of bytes written will be in *byteswritten.
+   The function will return OCI_ERROR if any error is encountered, else
+   it will return OCI_ERROR.
+  
+  Parameters
+   hndl (IN) - the OCI environment or session handle.
+   err (OUT) - the OCI error handle.  If  there is an error, it is recorded 
+   in err and this function returns OCI_ERROR.  Diagnostic information can be 
+   obtained by calling OCIErrorGet().
+   filep (IN/OUT) - a file handle that uniquely references the file.
+   bufp (IN) - the pointer to a buffer from which the data will be written. 
+   The length of the allocated memory is assumed to be the value passed
+   in bufl. 
+   bufl - the length of the buffer in bytes.
+   byteswritten (OUT) - the number of bytes written.
+   
+  Related Functions
+   OCIFileOpen, OCIFileSeek, OCIFileRead 
+  
+  
+  
+  
+  
+  OCIHandleAlloc() 
+  Name
+  OCI Get HaNDLe
+  Purpose
+  This call returns a pointer to an allocated and initialized handle.
+  Syntax
+  sword OCIHandleAlloc ( CONST dvoid   *parenth,
+                       dvoid         **hndlpp, 
+                       ub4           type, 
+                       size_t        xtramem_sz,
+                       dvoid         **usrmempp);
+  Comments
+  Returns a pointer to an allocated and initialized structure, corresponding to 
+  the type specified in type. A non-NULL handle is returned on success. Bind 
+  handle and define handles are allocated with respect to a statement handle. All
+  other handles are allocated with respect to an environment handle which is 
+  passed in as a parent handle.
+  No diagnostics are available on error. This call returns OCI_SUCCESS if 
+  successful, or OCI_INVALID_HANDLE if an out-of-memory error occurs.
+  Handles must be allocated using OCIHandleAlloc() before they can be passed 
+  into an OCI call.
+  Parameters
+  parenth (IN) - an environment or a statement handle. 
+  hndlpp (OUT) - returns a handle to a handle type. 
+  type (IN) - specifies the type of handle to be allocated. The specific types 
+  are: 
+  OCI_HTYPE_ERROR - specifies generation of an error report handle of 
+  C type OCIError
+  OCI_HTYPE_SVCCTX - specifies generation of a service context handle 
+  of C type OCISvcCtx
+  OCI_HTYPE_STMT - specifies generation of a statement (application 
+  request) handle of C type OCIStmt
+  OCI_HTYPE_BIND - specifies generation of a bind information handle 
+  of C type OCIBind
+  OCI_HTYPE_DEFINE - specifies generation of a column definition 
+  handle of C type OCIDefine
+  OCI_HTYPE_DESCRIBE  - specifies generation of a select list 
+  description handle of C type OCIDesc
+  OCI_HTYPE_SERVER - specifies generation of a server context handle 
+  of C type OCIServer
+  OCI_HTYPE_SESSION - specifies generation of an authentication 
+  context handle of C type OCISession
+  OCI_HTYPE_TRANS - specifies generation of a transaction context
+  handle of C type OCITrans
+  OCI_HTYPE_COMPLEXOBJECT - specifies generation of a complex 
+  object retrieval handle of C type OCIComplexObject
+  OCI_HTYPE_SECURITY - specifies generation of a security handle of C 
+  type OCISecurity
+  xtramem_sz (IN) - specifies an amount of user memory to be allocated.
+  usrmempp (OUT) - returns a pointer to the user memory of size xtramemsz 
+  allocated by the call for the user. 
+  Related Functions
+  OCIHandleFree()
+  
+  
+  
+  OCIHandleFree()
+  Name
+  OCI Free HaNDLe
+  Purpose
+  This call explicitly deallocates a handle.
+  Syntax
+  sword OCIHandleFree ( dvoid     *hndlp,
+                      ub4       type);
+  Comments
+  This call frees up storage associated with a handle, corresponding to the type 
+  specified in the type parameter.
+  This call returns either OCI_SUCCESS or OCI_INVALID_HANDLE.
+  All handles must be explicitly deallocated. OCI will not deallocate a child 
+  handle if the parent is deallocated.
+  Parameters
+  hndlp (IN) - an opaque pointer to some storage.
+  type (IN) - specifies the type of storage to be allocated. The specific types 
+  are:
+  OCI_HTYPE_ENV - an environment handle
+  OCI_HTYPE_ERROR - an error report handle
+  OCI_HTYPE_SVCCTX - a service context handle
+  OCI_HTYPE_STMT - a statement (application request) handle
+  OCI_HTYPE_BIND - a bind information handle
+  OCI_HTYPE_DEFINE - a column definition handle
+  OCI_HTYPE_DESCRIBE  - a select list description handle
+  OCI_HTYPE_SERVER - a server handle
+  OCI_HTYPE_SESSION - a user authentication handle
+  OCI_HTYPE_TRANS - a transaction handle
+  OCI_HTYPE_COMPLEXOBJECT - a complex object retrieval handle
+  OCI_HTYPE_SECURITY - a security handle
+  Related Functions
+  OCIHandleAlloc()
+  
+  
+  
+  
+  OCIInitialize()
+  Name
+  OCI Process Initialize
+  Purpose
+  Initializes the OCI process environment.
+  Syntax
+  sword OCIInitialize ( ub4           mode,
+                      CONST dvoid   *ctxp, 
+                      CONST dvoid   *(*malocfp) 
+                                    ( dvoid *ctxp,
+                                      size_t size ),
+                      CONST dvoid   *(*ralocfp)
+                                    ( dvoid *ctxp,
+                                      dvoid *memp,
+                                      size_t newsize ),
+                      CONST void    (*mfreefp)
+                                    ( dvoid *ctxp,
+                                      dvoid *memptr ));
+  Comments
+  This call initializes the OCI process environment.
+  OCIInitialize() must be invoked before any other OCI call. 
+  Parameters
+  mode (IN) - specifies initialization of the mode. The valid modes are:
+  OCI_DEFAULT - default mode.
+  OCI_THREADED - threaded environment. In this mode, internal data 
+  structures are protected from concurrent accesses by multiple threads. 
+  OCI_OBJECT - will use navigational object interface. 
+  ctxp (IN) - user defined context for the memory call back routines. 
+  malocfp (IN) - user-defined memory allocation function. If mode is 
+  OCI_THREADED, this memory allocation routine must be thread safe.
+  ctxp - context pointer for the user-defined memory allocation function.
+  size - size of memory to be allocated by the user-defined memory 
+  allocation function
+  ralocfp (IN) - user-defined memory re-allocation function. If mode is 
+  OCI_THREADED, this memory allocation routine must be thread safe.
+  ctxp - context pointer for the user-defined memory reallocation 
+  function.
+  memp - pointer to memory block
+  newsize - new size of memory to be allocated
+  mfreefp (IN) - user-defined memory free function. If mode is 
+  OCI_THREADED, this memory free routine must be thread safe.
+  ctxp - context pointer for the user-defined memory free function.
+  memptr - pointer to memory to be freed
+  Example
+  See the description of OCIStmtPrepare() on page 13-96 for an example showing 
+  the use of OCIInitialize().
+  Related Functions
+  
+  -------------------------------OCITerminate------------------------------------
+  
+  OCITerminate()
+  Name
+  OCI process Terminate
+  Purpose
+  Do cleanup before process termination
+  Syntax
+  sword OCITerminate (ub4 mode);
+  
+  Comments
+  This call performs  OCI related clean up before the OCI process terminates.
+  If the process is running in shared mode then the OCI process is disconnected
+  from the shared memory subsystem.
+  
+  OCITerminate() should be the last OCI call in any process.
+  
+  Parameters
+  mode (IN) - specifies different termination modes.
+  
+  OCI_DEFAULT - default mode.
+  
+  Example
+  
+  Related Functions
+  OCIInitialize()
+  
+  ------------------------ OCIAppCtxSet--------------------------------------
+  Name
+  OCI Application context Set
+  Purpose
+  Set an attribute and its value for a particular application context 
+       namespace
+  Syntax
+   (sword) OCIAppCtxSet((void *) sesshndl, (dvoid *)nsptr,(ub4) nsptrlen,
+                       (dvoid *)attrptr, (ub4) attrptrlen, (dvoid *)valueptr,
+                       (ub4) valueptrlen,  errhp, (ub4)mode);
+  
+  Comments
+  Please note that the information set on the session handle is sent to the server during the next OCIStatementExecute or OCISessionBegin.
+  
+  This information is cleared from the session handle, once the information 
+   has been sent over to the server,and should be setup again if needed.
+  
+  Parameters
+   sesshndl   (IN/OUT) - Pointer to a session handle
+   nsptr      (IN)     - Pointer to namespace string
+   nsptrlen   (IN)     - length of the nsptr
+   attrptr    (IN)     - Pointer to attribute string
+   attrptrlen (IN)     - length of the attrptr
+   valueptr   (IN)     - Pointer to value string
+   valueptrlen(IN)     - length of the valueptr
+   errhp      (OUT)    - Error from the API
+   mode       (IN)     - mode of operation (OCI_DEFAULT)
+  
+  Returns
+   error if any 
+  Example
+  
+  Related Functions
+     OCIAppCtxClearAll
+  
+  
+  ------------------------ OCIAppCtxClearAll---------------------------------
+  Name
+   OCI Application Context Clear all attributes in a namespace
+  Purpose
+   To clear the  values all attributes in a namespace
+  Syntax
+   (sword) OCIAppCtxClearAll((void *) sesshndl, (dvoid *)nsptr, (ub4) nsptrlen,
+                (OCIError *)errhp, (ub4)mode);
+  
+  Comments
+  This will clean up the context information on the server side during the next piggy-back to the server.
+  
+  Parameters
+   sesshndl (IN/OUT) - Pointer to a session handle
+   nsptr    (IN)     - Pointer to namespace string where the values of all
+                       attributes are cleared
+   nsptrlen (IN)     - length of the nsptr
+   errhp    (OUT)    - Error from the API 
+   mode     (IN)     - mode of operation (OCI_DEFAULT)
+  Example
+  
+  Returns
+   error if any
+  
+  Related Functions
+   OCIAppCtxSet
+  ---------------------- OCIIntervalAssign --------------------------------- 
+  sword OCIIntervalAssign(dvoid *hndl, OCIError *err, 
+                      CONST OCIInterval *inpinter, OCIInterval *outinter );
+  
+    DESCRIPTION
+      Copies one interval to another to create a replica
+    PARAMETERS
+       hndl (IN) - Session/Env handle.
+      err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+      (IN)  inpinter - Input Interval 
+      (OUT) outinter - Output Interval 
+    RETURNS
+       OCI_INVALID_HANDLE if 'err' is NULL.
+       OCI_SUCCESS otherwise
+  
+   ---------------------- OCIIntervalCheck ------------------------------------ 
+  sword OCIIntervalCheck(dvoid *hndl, OCIError *err, CONST OCIInterval *interval,
+                           ub4 *valid );
+  
+    DESCRIPTION
+      Checks the validity of an interval
+    PARAMETERS
+       hndl (IN) - Session/Env handle.
+      err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+      (IN)  interval - Interval to be checked 
+      (OUT) valid     - Zero if the interval is valid, else returns an Ored
+          combination of the following codes.
+  
+     Macro name                   Bit number      Error
+     ----------                   ----------      -----
+     OCI_INTER_INVALID_DAY         0x1           Bad day
+     OCI_INTER_DAY_BELOW_VALID     0x2           Bad DAy Low/high bit (1=low)
+     OCI_INTER_INVALID_MONTH       0x4           Bad MOnth
+     OCI_INTER_MONTH_BELOW_VALID   0x8           Bad MOnth Low/high bit (1=low)
+     OCI_INTER_INVALID_YEAR        0x10          Bad YeaR
+     OCI_INTER_YEAR_BELOW_VALID    0x20          Bad YeaR Low/high bit (1=low)
+     OCI_INTER_INVALID_HOUR        0x40          Bad HouR
+     OCI_INTER_HOUR_BELOW_VALID    0x80          Bad HouR Low/high bit (1=low)
+     OCI_INTER_INVALID_MINUTE      0x100         Bad MiNute
+     OCI_INTER_MINUTE_BELOW_VALID  0x200         Bad MiNute Low/high bit(1=low)
+     OCI_INTER_INVALID_SECOND      0x400         Bad SeCond
+     OCI_INTER_SECOND_BELOW_VALID  0x800         bad second Low/high bit(1=low)
+     OCI_INTER_INVALID_FRACSEC     0x1000        Bad Fractional second
+     OCI_INTER_FRACSEC_BELOW_VALID 0x2000        Bad fractional second Low/High
+  
+          
+    RETURNS
+      OCI_SUCCESS if interval is okay
+      OCI_INVALID_HANDLE if 'err' is NULL.
+  
+   ---------------------- OCIIntervalCompare ----------------------------------- 
+  sword OCIIntervalCompare(dvoid *hndl, OCIError *err, OCIInterval *inter1, 
+                          OCIInterval *inter2, sword *result );
+  
+    DESCRIPTION
+          Compares two intervals, returns 0 if equal, -1 if inter1 < inter2, 
+          1 if inter1 > inter2
+    PARAMETERS
+       hndl (IN) - Session/Env handle. 
+       err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+       inter1  (IN)   - Interval to be compared 
+       inter2  (IN)   - Interval to be compared 
+       result  (OUT)  -   comparison result, 0 if equal, -1 if inter1 < inter2, 
+                          1 if inter1 > inter2
+  
+    RETURNS
+       OCI_SUCCESS on success
+       OCI_INVALID_HANDLE if 'err' is NULL.
+       OCI_ERROR if 
+          the two input datetimes are not mutually comparable.
+  
+  ---------------------- OCIIntervalDivide ------------------------------------ 
+  sword OCIIntervalDivide(dvoid *hndl, OCIError *err, OCIInterval *dividend, 
+                  OCINumber *divisor, OCIInterval *result );
+   
+    DESCRIPTION
+       Divides an interval by an Oracle Number to produce an interval
+    PARAMETERS
+          hndl (IN) - Session/Env handle. 
+       err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+       dividend  (IN)   - Interval to be divided 
+       divisor   (IN)   - Oracle Number dividing `dividend' 
+       result    (OUT)  - resulting interval (dividend / divisor) 
+    RETURNS
+       OCI_SUCCESS on success
+       OCI_INVALID_HANDLE if 'err' is NULL.
+  
+   ---------------------- OCIIntervalFromNumber -------------------- 
+  sword OCIIntervalFromNumber(dvoid *hndl, OCIError *err, 
+                 OCIInterval *inter, OCINumber *number);
+    DESCRIPTION
+      Converts an interval to an Oracle Number
+    PARAMETERS
+       hndl (IN) - Session/Env handle. 
+      err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+      (OUT)  interval - Interval to be converted 
+      (IN) number - Oracle number result  (in years for YEARMONTH interval
+                       and in days for DAYSECOND)
+    RETURNS
+      OCI_SUCCESS on success 
+      OCI_INVALID_HANDLE if 'err' is NULL.
+      OCI_ERROR on error.
+    NOTES
+      Fractional portions of the date (for instance, minutes and seconds if
+      the unit chosen is hours) will be included in the Oracle number produced.
+      Excess precision will be truncated.
+   
+   ---------------------- OCIIntervalFromText --------------------------------- 
+  sword OCIIntervalFromText( dvoid *hndl, OCIError *err, CONST OraText *inpstr, 
+                  size_t str_len, OCIInterval *result );
+  
+    DESCRIPTION
+      Given an interval string produce the interval represented by the string.
+      The type of the interval is the type of the 'result' descriptor.
+    PARAMETERS
+  
+       hndl (IN) - Session/Env handle. 
+       err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+      (IN)  inpstr - Input string 
+      (IN)  str_len - Length of input string 
+      (OUT) result - Resultant interval 
+    RETURNS
+      OCI_SUCCESS on success
+      OCI_INVALID_HANDLE if 'err' is NULL.
+      OCI_ERROR if
+          there are too many fields in the literal string
+          the year is out of range (-4713 to 9999)
+          if the month is out of range (1 to 12)
+          if the day of month is out of range (1 to 28...31)
+          if hour is not in range (0 to 23)
+          if hour is not in range (0 to 11)
+          if minute is not in range (0 to 59)
+          if seconds in minute not in range (0 to 59)
+          if seconds in day not in range (0 to 86399)
+          if the interval is invalid
+  
+  
+   ---------------------- OCIIntervalGetDaySecond -------------------- 
+  
+    DESCRIPTION
+       Gets values of day second interval
+    PARAMETERS
+          hndl (IN) - Session/Env handle.
+          err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().     
+          day     (OUT) - number of days
+          hour    (OUT) - number of hours
+          min     (OUT) - number of mins
+          sec     (OUT) - number of secs
+          fsec    (OUT) - number of fractional seconds
+          result     (IN)  - resulting interval 
+    RETURNS
+          OCI_SUCCESS on success
+          OCI_INVALID_HANDLE if 'err' is NULL.
+  
+  
+   ---------------------- OCIIntervalGetYearMonth -------------------- 
+  
+    DESCRIPTION
+       Gets year month from an interval
+    PARAMETERS
+          hndl (IN) - Session/Env handle.
+          err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().     
+          year    (OUT)   - year value
+          month   (OUT)   - month value
+          result     (IN)  - resulting interval 
+    RETURNS
+          OCI_SUCCESS on success
+          OCI_INVALID_HANDLE if 'err' is NULL.
+  
+  
+  
+  -------------------------- OCIIntervalAdd ------------------------------
+  sword OCIIntervalAdd(dvoid *hndl, OCIError *err, OCIInterval *addend1, 
+                          OCIInterval *addend2, OCIInterval *result );
+  NAME OCIIntervalAdd - Adds two intervals 
+  PARAMETERS
+  hndl (IN) - Session/Env handle. 
+  err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+  addend1  (IN)   - Interval to be added 
+  addend2  (IN)   - Interval to be added 
+  result   (OUT)  - resulting interval (addend1 + addend2) 
+  DESCRIPTION
+       Adds two intervals to produce a resulting interval
+  RETURNS
+       OCI_SUCCESS on success
+       OCI_ERROR if:
+          the two input intervals are not mutually comparable.
+          the resulting year would go above SB4MAXVAL
+          the resulting year would go below SB4MINVAL
+       OCI_INVALID_HANDLE if 'err' is NULL.
+  NOTES
+       The two input intervals must be mutually comparable
+  
+   ---------------------- OCIIntervalSubtract ------------------------------- 
+  sword OCIIntervalSubtract(dvoid *hndl, OCIError *err, OCIInterval *minuend, 
+                              OCIInterval *subtrahend, OCIInterval *result );
+  NAME - OCIIntervalSubtract - subtracts two intervals
+  PARAMETERS
+  hndl (IN) - Session/Env handle.
+  err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().     
+  minuend    (IN)   - interval to be subtracted from 
+  subtrahend (IN)   - interval subtracted from minuend 
+  result     (OUT)  - resulting interval (minuend - subtrahend) 
+  DESCRIPTION
+       Subtracts two intervals and stores the result in an interval
+  RETURNS
+          OCI_SUCCESS on success
+          OCI_INVALID_HANDLE if 'err' is NULL.
+          OCI_ERROR if:
+             the two input intervals are not mutually comparable.
+             the resulting leading field would go below SB4MINVAL 
+             the resulting leading field would go above SB4MAXVAL
+  
+  ---------------------- OCIIntervalMultiply --------------------------------- 
+  sword OCIIntervalMultiply(dvoid *hndl, OCIError *err, CONST OCIInterval *inter,
+                          OCINumber *nfactor, OCIInterval *result );
+  
+    DESCRIPTION
+       Multiplies an interval by an Oracle Number to produce an interval
+    PARAMETERS
+          hndl (IN) - Session/Env handle. 
+       err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+       inter  (IN)   - Interval to be multiplied 
+       nfactor  (IN)   - Oracle Number to be multiplied 
+       result   (OUT)  - resulting interval (ifactor * nfactor) 
+    RETURNS
+       OCI_SUCCESS on success
+       OCI_INVALID_HANDLE if 'err' is NULL.
+       OCI_ERROR if:
+          the resulting year would go above SB4MAXVAL
+          the resulting year would go below SB4MINVAL
+  
+  
+   ---------------------- OCIIntervalSetDaySecond -------------------- 
+  
+    DESCRIPTION
+       Sets day second interval
+    PARAMETERS
+          hndl (IN) - Session/Env handle.
+          err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().     
+          day     (IN) - number of days
+          hour    (IN) - number of hours
+          min     (IN) - number of mins
+          sec     (IN) - number of secs
+          fsec    (IN) - number of fractional seconds
+          result     (OUT)  - resulting interval 
+    RETURNS
+          OCI_SUCCESS on success
+          OCI_INVALID_HANDLE if 'err' is NULL.
+  
+  
+   ---------------------- OCIIntervalSetYearMonth -------------------- 
+  
+    DESCRIPTION
+       Sets year month interval
+    PARAMETERS
+          hndl (IN) - Session/Env handle.
+          err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().     
+          year    (IN)   - year value
+          month   (IN)   - month value
+          result     (OUT)  - resulting interval 
+    RETURNS
+          OCI_SUCCESS on success
+          OCI_INVALID_HANDLE if 'err' is NULL.
+  
+  
+  ----------------------- OCIIntervalToNumber ---------------------------------
+  sword OCIIntervalToNumber(dvoid *hndl, OCIError *err, CONST OCIInterval *inter,
+                            OCINumber *number);
+  
+    DESCRIPTION
+      Converts an interval to an Oracle Number
+    PARAMETERS
+       hndl (IN) - Session/Env handle. 
+      err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+      (IN)  inter - Interval to be converted 
+      (OUT) number - Oracle number result  (in years for YEARMONTH interval
+                       and in days for DAYSECOND)
+    RETURNS
+      OCI_INVALID_HANDLE if 'err' is NULL.
+      OCI_SUCCESS on success 
+    NOTES
+      Fractional portions of the date (for instance, minutes and seconds if
+      the unit chosen is hours) will be included in the Oracle number produced.
+      Excess precision will be truncated.
+   
+  ------------------------------- OCIIntervalToText -------------------------
+  sword OCIIntervalToText( dvoid *hndl, OCIError *err, CONST OCIInterval *inter,
+                          ub1 lfprec, ub1 fsprec, OraText *buffer, 
+                          size_t buflen, size_t *resultlen );
+  
+    DESCRIPTION
+      Given an interval, produces a string representing the interval.
+    PARAMETERS
+       hndl (IN) - Session/Env handle. 
+      err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+      (IN)  inter - Interval to be converted 
+      (IN)  lfprec  - Leading field precision. Number of digits used to
+                  represent the leading field.
+      (IN)  fsprec  - Fractional second precision of the interval. Number of
+                  digits used to represent the fractional seconds.
+      (OUT) buffer - buffer to hold result 
+      (IN)  buflen - length of above buffer 
+      (OUT) resultlen - length of result placed into buffer 
+   
+    RETURNS
+      OCI_SUCCESS on success
+      OCI_INVALID_HANDLE if 'err' is NULL.
+      OCI_ERROR 
+          if the buffer is not large enough to hold the result
+    NOTES
+      The interval literal will be output as `year' or `[year-]month' for
+      YEAR-MONTH intervals and as `seconds' or `minutes[:seconds]' or
+      `hours[:minutes[:seconds]]' or `days[ hours[:minutes[:seconds]]]' for
+      DAY-TIME intervals (where optional fields are surrounded by brackets).
+  
+   ---------------------- OCIIntervalFromTZ -------------------- 
+  sword OCIIntervalFromTZ(dvoid *hndl, OCIError *err, CONST oratext *inpstring,
+                          size_t str_len, OCIInterval *result);
+  
+    DESCRIPTION
+      Retuns an OCI_DTYPE_INTERVAL_DS OCIInterval with the region id (if
+      the region is specified in the input string) set and the current
+      absolute offset or an absolut offset with the region id set to 0.
+    PARAMETERS
+      hndl (IN) - Session/Env handle.
+      err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+      inpstring (IN) - pointer to the input string
+      str_len (IN) - inpstring length
+      result - Output Interval 
+    RETURNS
+       OCI_SUCCESS on success
+       OCI_INVALID_HANDLE if 'err' is NULL.
+       OCI_ERROR on error
+          Bad interval type
+          Timezone errors
+    NOTES
+       The input string must be of the form [+/-]TZH:TZM or 'TZR [TZD]'
+  
+   ----------------------- OCIKerbAttrSet ---------------------
+  sword OCIKerbAttrSet(OCISession *trgthndlp, ub4 auth_mode, 
+                       ub1 *ftgt_ticket, ub4 ftgt_ticket_len, 
+                       ub1 *ftgt_sesskey, ub4 ftgt_sesskey_len, 
+                       ub2 ftgt_keytype, ub4 ftgt_ticket_flags, 
+                       sb4 ftgt_auth_time, sb4 ftgt_start_time, 
+                       sb4 ftgt_end_time, sb4 ftgt_renew_time, 
+                       text *ftgt_principal, ub4 ftgt_principal_len,
+                       text *ftgt_realm, ub4 ftgt_realm_len, 
+                       OCIError *errhp);
+  
+    DESCRIPTION
+      This call sets the attributes required for Kerberos authentication
+      on the user handle.
+  
+    PARAMETERS
+      trgthndlp (IN) - The pointer to a user handle.
+      auth_mode (IN) - Indicates what type of Kerberos credentials should
+                      be set. Options are:
+  
+                      OCI_KERBCRED_PROXY 
+                                           - Set Kerberos credentials for use with
+                                             proxy authentication.
+                      OCI_KERBCRED_CLIENT_IDENTIFIER 
+                                           - Set Kerberos credentials for use
+                                             with secure client identifier.
+  
+      ftgt_ticket (IN) - Forwardable Ticket Granting Ticket (FTGT).
+      ftgt_ticket_len (IN) - Length of FTGT.
+      ftgt_sesskey(IN) - Session Key associated with FTGT.
+      ftgt_sesskey_len (IN) - Length of session key.
+      ftgt_keytype (IN) -  Type of encryption key used to encrypt FTGT.
+      ftgt_ticket_flags (IN) - Flags associated with  encryption of FTGT.
+      ftgt_auth_time (IN) - Authentication time compatible with that in FTGT.
+      ftgt_start_time (IN) - Start time compatible with that indicated in FTGT.
+      ftgt_end_time (IN) - End time compatible with that indicated in FTGT.
+      ftgt_renew_time (IN) - Renew time compatible with that indicated in FTGT.
+      ftgt_principal (IN) - Client principal name from FTGT.
+      ftgt_principal_len (IN) - Length of client principal name.
+      ftgt_realm (IN) - Client realm name from FTGT.
+      ftgt_realm_len (IN) - Client realm name length.
+      errhp (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+    RETURNS
+       OCI_SUCCESS on success
+       OCI_ERROR on error
+    NOTES
+  
+  OCILdaToSvcCtx()
+  Name
+  OCI toggle version 7 Lda_Def to SerVice context handle
+  Purpose
+  Converts a V7 Lda_Def to a V8 service context handle.
+  Syntax
+  sword OCILdaToSvcCtx ( OCISvcCtx  **svchpp,
+                       OCIError   *errhp,
+                       Lda_Def    *ldap );
+  Comments
+  Converts a V7 Lda_Def to a V8 service context handle. The action of this call 
+  can be reversed by passing the resulting service context handle to the 
+  OCISvcCtxToLda() function.
+  Parameters
+  svchpp (IN/OUT) - the service context handle. 
+  errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
+  diagnostic information in the event of an error.
+  ldap (IN/OUT) - the V7 logon data area returned by OCISvcCtxToLda() from 
+  this service context.
+  Related Functions
+  OCISvcCtxToLda()
+  
+  
+  
+  
+  OCILobAppend()
+  
+  Name
+  OCI Lob APpend
+  
+  Purpose
+  Appends a LOB value at the end of another LOB. 
+  
+  Syntax
+  sword OCILobAppend ( OCISvcCtx        *svchp,
+                     OCIError         *errhp,
+                     OCILobLocator    *dst_locp,
+                     OCILobLocator    *src_locp );
+  Comments
+  Appends a LOB value at the end of LOB. The data is 
+  copied from the source to the destination at the end of the destination. The 
+  source and the destination must already exist. The destination LOB is 
+  extended to accommodate the newly written data.
+  
+  It is an error to extend the destination LOB beyond the maximum length 
+  allowed or to try to copy from a NULL LOB. 
+  
+  Parameters
+  svchp (IN) - the service context handle. 
+  errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
+  diagnostic information in the event of an error. 
+  dst_locp (IN/OUT) - a locator uniquely referencing the destination LOB. 
+  src_locp (IN/OUT) - a locator uniquely referencing the source LOB. 
+  
+  Related Functions
+  OCILobTrim()
+  OCIErrorGet()
+  OCILobWrite()
+  OCILobCopy()
+  
+  
+  
+  OCILobAssign()
+  
+  Name
+  OCI Lob ASsiGn
+  
+  Purpose
+  Assigns one LOB/FILE locator to another.
+  
+  Syntax
+  sword OCILobAssign ( OCIEnv                *envhp, 
+                       OCIError              *errhp, 
+                       CONST OCILobLocator   *src_locp, 
+                       OCILobLocator         **dst_locpp );
+  
+  Comments
+  Assign source locator to destination locator.  After the assignment, both 
+  locators refer to the same LOB data.  For internal LOBs, the source locator's 
+  LOB data gets copied to the destination locator's LOB data only when the 
+  destination locator gets stored in the table.  Therefore, issuing a flush of 
+  the object containing the destination locator will copy the LOB data. For 
+  FILEs only the locator that refers to the OS file is copied to the table. The
+  OS file is not copied.
+  Note: The only difference between this and OCILobLocatorAssign is that this
+  takes an environment handle whereas OCILobLocatorAssign takes an OCI service
+  handle
+  
+  Parameters
+  envhp (IN/OUT) - OCI environment handle initialized in object mode.
+  errhp (IN/OUT) - The OCI error handle. If there is an error, it is recorded 
+  in errhp and this function returns OCI_ERROR. Diagnostic information can be 
+  obtained by calling OCIErrorGet().
+  src_locp (IN) - LOB locator to copy from.
+  dst_locpp (IN/OUT) - LOB locator to copy to.  The caller must allocate space 
+  for the OCILobLocator by calling OCIDescriptorAlloc().
+  
+  See also
+  OCIErrorGet()
+  OCILobIsEqual()
+  OCILobLocatorIsInit()
+  OCILobLocatorAssign()
+  
+  
+  OCILobCharSetForm()
+  
+  Name
+  OCI Lob Get Character Set Form
+  
+  Purpose
+  Gets the LOB locator's character set fpr,, if any.
+  
+  Syntax
+  sword OCILobCharSetForm ( OCIEnv                    *envhp, 
+                            OCIError                  *errhp, 
+                            CONST OCILobLocator       *locp, 
+                            ub1                       *csfrm );
+  
+  Comments
+  Returns the character set form of the input LOB locator in the csfrm output 
+  parameter. 
+  
+  Parameters
+  envhp (IN/OUT) - OCI environment handle initialized in object mode.
+  errhp (IN/OUT) - error handle. The OCI error handle. If there is an error, it 
+  is recorded in err and this function returns OCI_ERROR. Diagnostic 
+  information can be obtained by calling OCIErrorGet().
+  locp (IN) - LOB locator for which to get the character set form.
+  csfrm(OUT) - character set form of the input LOB locator.  If the input 
+  locator is for a BLOB or a BFILE, csfrm is set to 0 since there is no concept 
+  of a character set for binary LOBs/FILEs.  The caller must allocate space for 
+  the csfrm (ub1) and not write into the space.
+  See also
+  OCIErrorGet(), OCILobCharSetId(), OCILobLocatorIsInit
+  
+  
+  
+  OCILobCharSetId()
+  
+  Name
+  OCI Lob get Character Set IDentifier
+  
+  Purpose
+  Gets the LOB locator's character set ID, if any.
+  
+  Syntax
+  sword OCILobCharSetId ( OCIEnv                    *envhp, 
+                          OCIError                  *errhp, 
+                          CONST OCILobLocator       *locp, 
+                          ub2                       *csid );
+  
+  Comments
+  Returns the character set ID of the input LOB locator in the cid output 
+  parameter. 
+  
+  Parameters
+  envhp (IN/OUT) - OCI environment handle initialized in object mode.
+  errhp (IN/OUT) - error handle. The OCI error handle. If there is an error, it 
+  is recorded in err and this function returns OCI_ERROR. Diagnostic 
+  information can be obtained by calling OCIErrorGet().
+  locp (IN) - LOB locator for which to get the character set ID.
+  csid (OUT) - character set ID of the input LOB locator.  If the input locator 
+  is for a BLOB or a BFILE, csid is set to 0 since there is no concept of a 
+  character set for binary LOBs/FILEs.  The caller must allocate space for the 
+  character set id of type ub2 and not write into the space.
+  
+  See also
+  OCIErrorGet(), OCILobCharSetForm(), OCILobLocatorIsInit()
+  
+  
+  
+  OCILobCopy()
+  
+  Name
+  OCI Lob Copy
+  
+  Purpose
+  Copies a portion of a LOB value into another LOB value.
+  
+  Syntax
+  sword OCILobCopy ( OCISvcCtx        *svchp,
+                     OCIError         *errhp,
+                     OCILobLocator    *dst_locp,
+                     OCILobLocator    *src_locp,
+                     ub4              amount,
+                     ub4              dst_offset,
+                     ub4              src_offset );
+  
+  Comments
+  Copies a portion of a LOB value into another LOB as specified. The data 
+  is copied from the source to the destination. The source (src_locp) and the 
+  destination (dlopb) LOBs must already exist.
+  If the data already exists at the destination's start position, it is 
+  overwritten with the source data. If the destination's start position is 
+  beyond the end of the current data, a hole is created from the end of the data
+  to the beginning of the newly written data from the source. The destination 
+  LOB is extended to accommodate the newly written data if it extends 
+  beyond the current length of the destination LOB. 
+  It is an error to extend the destination LOB beyond the maximum length 
+  allowed or to try to copy from a NULL LOB.
+  Parameters
+  svchp (IN) - the service context handle. 
+  errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
+  diagnostic information in the event of an error. 
+  dst_locp (IN/OUT) - a locator uniquely referencing the destination LOB. 
+  src_locp (IN/OUT) - a locator uniquely referencing the source LOB. 
+  amount (IN) - the number of character or bytes, as appropriate, to be copied.
+  dst_offset (IN) - this is the absolute offset for the destination LOB. 
+  For character LOBs it is the number of characters from the beginning of the 
+  LOB at which to begin writing. For binary LOBs it is the number of bytes from 
+  the beginning of the lob from which to begin reading. The offset starts at 1.
+  src_offset (IN) - this is the absolute offset for the source LOB. 
+  For character LOBs it is the number of characters from the beginning of the 
+  LOB, for binary LOBs it is the number of bytes. Starts at 1.
+  
+  See Also 
+  OCIErrorGet(), OCILobAppend(), OCILobWrite(), OCILobTrim()
+  
+  OCILobCreateTemporary()
+  
+  Name
+  OCI Lob Create Temporary
+  
+  Purpose
+  Create a Temporary Lob
+  
+  Syntax
+  sword OCILobCreateTemporary(OCISvcCtx          *svchp,
+                              OCIError           *errhp,
+                              OCILobLocator      *locp,
+                              ub2                 csid,
+                              ub1                 csfrm,
+                              ub1                 lobtype,
+                              boolean             cache,
+                              OCIDuration         duration);
+  
+  
+  Comments
+  svchp (IN) - the service context handle. 
+  errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
+  diagnostic information in the event of an error. 
+  locp (IN/OUT) - a locator which points to the temporary Lob
+  csid (IN) - the character set id
+  csfrm(IN) - the character set form
+  lobtype (IN) - the lob type - one of the three constants OCI_TEMP_BLOB, 
+                 OCI_TEMP_CLOB and OCI_TEMP_NCLOB
+  cache(IN)-  TRUE if the temporary LOB goes through the cache; FALSE, if not.
+  duration(IN)- duration of the temporary LOB; Can be a valid duration id or one 
+                of the values: OCI_DURATION_SESSION, OCI_DURATION_CALL
+                Note: OCI_DURATION_TRANSACTION is NOT supported in 8.1
+  Related functions
+  OCILobFreeTemporary()
+  OCILobIsTemporary()
+  
+  OCILobDisableBuffering()
+  
+  Name
+  OCI Lob Disable Buffering
+  
+  Purpose
+  Disable lob buffering for the input locator.
+  
+  
+  Syntax
+  sword OCILobDisableBuffering ( OCISvcCtx      *svchp,
+                                 OCIError       *errhp,
+                                 OCILobLocator  *locp);
+  
+  Comments
+  
+  Disable lob buffering for the input locator.  The next time data is
+  read/written from/to the lob through the input locator, the lob
+  buffering subsystem is *not* used.  Note that this call does *not*
+  implicitly flush the changes made in the buffering subsystem.  The 
+  user must explicitly call OCILobFlushBuffer() to do this.
+  
+  Parameters
+  svchp (IN) - the service context handle. 
+  errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
+  diagnostic information in the event of an error. 
+  locp (IN/OUT) - a locator uniquely referencing the LOB. 
+  
+  Related Functions
+  OCILobEnableBuffering()
+  OCIErrorGet()
+  OCILobFlushBuffer()
+  
+  
+  
+  
+  OCILobEnableBuffering()
+  
+  Name
+  OCI Lob Enable Buffering
+  
+  Purpose
+  Enable lob buffering for the input locator.
+  
+  
+  Syntax
+  sword OCILobEnableBuffering ( OCISvcCtx      *svchp,
+                                OCIError       *errhp,
+                                OCILobLocator  *locp);
+  
+  Comments
+  
+  Enable lob buffering for the input locator.  The next time data is
+  read/written from/to the lob through the input locator, the lob
+  buffering subsystem is used.  
+  
+  Once lob buffering is enabled for a locator, if that locator is passed to 
+  one of the following routines, an error is returned:
+          OCILobCopy, OCILobAppend, OCILobErase, OCILobGetLength, OCILobTrim
+  
+  Parameters
+  svchp (IN) - the service context handle. 
+  errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
+  diagnostic information in the event of an error. 
+  locp (IN/OUT) - a locator uniquely referencing the LOB. 
+  
+  Related Functions
+  OCILobDisableBuffering()
+  OCIErrorGet()
+  OCILobWrite()
+  OCILobRead()
+  OCILobFlushBuffer()
+  
+  
+  
+  
+  OCILobErase()
+  
+  Name
+  OCI Lob ERase
+  
+  Purpose
+  Erases a specified portion of the LOB data starting at a specified offset.
+  
+  Syntax
+  sword OCILobErase ( OCISvcCtx       *svchp,
+                    OCIError        *errhp,
+                    OCILobLocator   *locp,
+                    ub4             *amount,
+                    ub4             offset );
+  
+  Comments
+  Erases a specified portion of the LOB data starting at a specified offset.
+  The actual number of characters/bytes erased is returned. The actual number 
+  of characters/bytes and the requested number of characters/bytes will differ 
+  if the end of the LOB data is reached before erasing the requested number of 
+  characters/bytes.
+  If a section of data from the middle of the LOB data is erased, a hole is 
+  created. When data from that hole is read, 0's are returned. If the LOB is
+  NULL, this routine will indicate that 0 characters/bytes were erased.
+  
+  Parameters
+  svchp (IN) - the service context handle.
+  errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
+  diagnostic information in the event of an error.
+  locp (IN/OUT) - the LOB for which to erase a section of data.
+  amount (IN/OUT) - On IN, the number of characters/bytes to erase. On OUT, 
+  the actual number of characters/bytes erased.
+  offset (IN) - absolute offset from the beginning of the LOB data from which 
+  to start erasing data. Starts at 1.
+  
+  See Also
+  OCIErrorGet(), OCILobRead(), OCILobWrite()
+  
+  OCILobOpen()
+  
+  Name
+  OCI Lob Open
+  
+  Purpose
+  Opens an internal or external Lob.
+  
+  Syntax
+  sword OCILobOpen( OCISvcCtx        *svchp,
+                    OCIError         *errhp,
+                    OCILobLocator    *locp,
+                    ub1               mode );
+  
+  Comments
+  It is an error if the same lob is opened more than once in
+  the same transaction. Lobs are opened implicitly if they are
+  not opened before using them. A LOB has to be closed before
+  the transaction commits else the transaction is rolled back.
+  Open locators are closed if the transaction aborts. Multiple 
+  users can open the same lob on different locators.
+  Parameters
+  svchp (IN) - the service context handle.
+  errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
+  diagnostic information in the event of an error.
+  locp (IN/OUT) - locator points to the LOB to be opened
+  mode (IN) - mode in which to open the lob. The valid modes are
+  read-only - OCI_FILE_READONLY, read-write - OCI_FILE_READWRITE 
+  
+  OCILobClose()
+  
+  Name
+  OCI Lob Close
+  
+  Purpose
+  Closes an open internal or external Lob.
+  
+  Syntax
+  sword OCILobClose( OCISvcCtx        *svchp,
+                     OCIError         *errhp,
+                     OCILobLocator    *locp );
+  
+  
+  Comments
+  It is an error if the lob is not open at this time. All LOBs
+  that have been opened in a transaction have to be closed 
+  before the transaction commits, else the transaction gets
+  rolled back.
+  
+  Parameters
+  svchp (IN) - the service context handle.
+  errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
+  diagnostic information in the event of an error.
+  locp  (IN)  - A locator that was opened using OCILobOpen()
+  
+  
+  OCILobFileClose()
+  
+  Name
+  OCI Lob File CLoSe
+  
+  Purpose
+  Closes a previously opened FILE.
+  
+  Syntax
+  sword OCILobFileClose ( OCISvcCtx            *svchp,
+                          OCIError             *errhp,
+                          OCILobLocator        *filep );
+  
+  Comments
+  Closes a previously opened FILE. It is an error if this function is called for
+  an internal LOB. No error is returned if the FILE exists but is not opened.
+  Parameters
+  svchp (IN) - the service context handle.
+  errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
+  diagnostic information in the event of an error.
+  filep (IN/OUT) - a pointer to a FILE locator to be closed.
+  
+  See Also
+  OCIErrorGet(), OCILobFileOpen(), OCILobFileCloseAll(), OCILobFileIsOpen(),
+  OCILobFileExists(), CREATE DIRECTORY DDL
+  
+  
+  
+  
+  OCILobFileCloseAll()
+  
+  Name
+  OCI LOB FILE Close All
+  
+  Purpose
+  Closes all open FILEs on a given service context.
+  
+  Syntax
+  sword OCILobFileCLoseAll ( OCISvcCtx *svchp, 
+                             OCIError  *errhp );
+  
+  Comments
+  Closes all open FILEs on a given service context.
+  
+  Parameters
+  svchp (IN) - the service context handle.
+  errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
+  diagnostic information in the event of an error.
+  
+  See also
+  OCILobFileClose(),
+  OCIErrorGet(), OCILobFileOpen(), OCILobFileIsOpen(),
+  OCILobFileExists(), CREATE DIRECTORY DDL
+  
+  
+  
+  
+  OCILobFileExists()
+  
+  Name
+  OCI LOB FILE exists
+  
+  Purpose
+  Tests to see if the FILE exists on the server
+  
+  Syntax
+  sword OCILobFileExists ( OCISvcCtx     *svchp,
+                           OCIError      *errhp,
+                           OCILobLocator *filep,
+                           boolean       *flag );
+  
+  Comments
+  Checks to see if a FILE exists for on the server.
+  
+  Parameters
+  svchp (IN) - the OCI service context handle.
+  errhp (IN/OUT) - error handle. The OCI error handle. If there is an error, 
+  it is recorded in err and this function returns OCI_ERROR. Diagnostic 
+  information can be obtained by calling OCIErrorGet().
+  filep (IN) - pointer to the FILE locator that refers to the file.
+  flag (OUT) - returns TRUE if the FILE exists; FALSE if it does not.
+  
+  See also
+  OCIErrorGet, CREATE DIRECTORY (DDL)
+  
+  
+  
+  
+  OCILobFileGetName()
+  
+  Name
+  OCI LOB FILE Get file Name
+  
+  Purpose
+  Gets the FILE locator's directory alias and file name.
+  
+  Syntax
+  sword OCILobFileGetName ( OCIEnv                   *envhp,
+                            OCIError                 *errhp, 
+                            CONST OCILobLocator      *filep, 
+                            OraText                     *dir_alias,
+                            ub2                      *d_length, 
+                            OraText                     *filename, 
+                            ub2                      *f_length );
+  
+  Comments
+  Returns the directory alias and file name associated with this file locator.  
+  
+  Parameters
+  envhp (IN/OUT) - OCI environment handle initialized in object mode.
+  errhp (IN/OUT) -The OCI error handle. If there is an error, it is recorded in 
+  errhp and this function returns OCI_ERROR. Diagnostic information can be 
+  obtained by calling OCIErrorGet().
+  filep (IN) - FILE locator for which to get the directory alias and file name.
+  dir_alias (OUT) - buffer into which the directory alias name is placed. The 
+  caller must allocate enough space for the directory alias name and must not 
+  write into the space.
+  d_length (IN/OUT)                 
+          - IN: length of the input dir_alias string;
+          - OUT: length of the returned dir_alias string.
+  filename (OUT) - buffer into which the file name is placed. The caller must 
+  allocate enough space for the file name and must not write into the space.
+  f_length (IN/OUT) 
+          - IN: length of the input filename string;
+           - OUT: lenght of the returned filename string.
+  
+  See also
+  OCILobFileSetName(), OCIErrorGet()
+  
+  
+  
+  
+  OCILobFileIsOpen()
+  
+  Name
+  OCI LOB FILE Is Open?
+  
+  Purpose
+  Tests to see if the FILE is open
+  
+  Syntax
+  sword OCILobFileIsOpen ( OCISvcCtx *svchp,
+                           OCIError  *errhp,
+                           OCILobLocator *filep,
+                           boolean       *flag );
+  
+  Comments
+  Checks to see if the FILE on the server is open for a given LobLocator.
+  
+  Parameters
+  svchp (IN) - the OCI service context handle.
+  errhp (IN/OUT) - error handle. The OCI error handle. If there is an error, it 
+  is recorded in err and this function returns OCI_ERROR. Diagnostic 
+  information can be obtained by calling OCIErrorGet().
+  filep (IN) - pointer to the FILE locator being examined. If the input file 
+  locator was never passed to OCILobFileOpen(), the file is considered not to 
+  be opened by this locator. However, a different locator may have opened the 
+  file. More than one file opens can be performed on the same file using 
+  different locators.
+  flag (OUT) - returns TRUE if the FILE is opened using this locator; FALSE if 
+  it is not. 
+  
+  See also
+  OCIErrorGet, OCILobFileOpen, OCILobFileClose, OCILobFileCloseAll, CREATE 
+  DIRECTORY SQL command
+  
+  
+  OCILobFileOpen()
+  
+  Name
+  OCI LOB FILE open
+  
+  Purpose
+  Opens a FILE for read-only access
+  
+  Syntax
+  sword OCILobFileOpen ( OCISvcCtx            *svchp,
+                       OCIError             *errhp,
+                       OCILobLocator        *filep,
+                       ub1                  mode );
+  
+  Comments
+  Opens a FILE. The FILE can be opened for read-only access only. FILEs may not 
+  be written to throough ORACLE.
+  
+  Parameters 
+  svchp (IN) - the service context handle. 
+  errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
+  diagnostic information in the event of an error.
+  filep (IN/OUT) - the FILE to open. Error if the locator does not refer to a 
+  FILE. 
+  mode (IN) - mode in which to open the file. The only valid mode is 
+  read-only - OCI_FILE_READONLY. 
+  
+  See Also
+  OCILobFileClose, OCIErrorGet, OCILobFileCloseAll, OCILobFileIsOpen, 
+  OCILobFileSetName, CREATE DIRECTORY 
+  
+  
+  
+  
+  OCILobFileSetName()
+  
+  Name
+  OCI Lob File Set NaMe
+  
+  Purpose
+  Sets directory alias and file name in the FILE locator.
+  
+  Syntax
+  sword OCILobFileSetName ( OCIEnv             *envhp,
+                            OCIError           *errhp,
+                            OCILobLocator      **filepp,
+                            OraText               *dir_alias,
+                            ub2                d_length, 
+                            OraText               *filename, 
+                            ub2                f_length );
+  Comments
+  Sets the directory alias and file name in the LOB file locator.  
+  Parameters
+  envhp (IN/OUT) - OCI environment handle initialized in object mode.
+  errhp (IN/OUT) - The OCI error handle. If there is an error, it is recorded 
+  in errhp and this function returns OCI_ERROR. Diagnostic information can be 
+  obtained by calling OCIErrorGet().
+  filepp (IN/OUT) - FILE locator for which to set the directory alias name.
+  The caller must have already allocated space for the locator by calling
+  OCIDescriptorAlloc().
+  dir_alias (IN) - buffer that contains the directory alias name to set in the 
+  locator.
+  d_length (IN) - length of the input dir_alias parameter.
+  filename (IN) - buffer that contains the file name is placed.
+  f_length (IN) - length of the input filename parameter.
+  See also
+  OCILobFileGetName, OCIErrorGet, CREATE DIRECTORY
+  
+  
+  
+  
+  OCILobFlushBuffer()
+  
+  Name
+  OCI Lob Flush all Buffers for this lob.
+  
+  Purpose
+  Flush/write all buffers for this lob to the server.
+  
+  
+  Syntax
+  sword OCILobFlushBuffer ( OCISvcCtx       *svchp,
+                            OCIError        *errhp,
+                            OCILobLocator   *locp,
+                            ub4              flag);
+  
+  Comments
+  
+  Flushes to the server, changes made to the buffering subsystem that 
+  are associated with the lob referenced by the input locator.  This 
+  routine will actually write the data in the buffer to the lob in 
+  the database.  Lob buffering must have already been enabled for the 
+  input lob locator.
+  
+  This routine, by default, does not free the buffer resources for
+  reallocation to another buffered LOB operation. However, if you
+  want to free the buffer explicitly, you can set the flag parameter
+  to OCI_LOB_BUFFER_FREE.
+  
+  Parameters
+  svchp (IN/OUT) - the service context handle. 
+  errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
+  diagnostic information in the event of an error. 
+  locp (IN/OUT) - a locator uniquely referencing the LOB. 
+  flag    (IN)     - to indicate if the buffer resources need to be freed
+                     after a flush. Default value is OCI_LOB_BUFFER_NOFREE.
+                     Set it to OCI_LOB_BUFFER_FREE if you want the buffer
+                     resources to be freed.
+  Related Functions
+  OCILobEnableBuffering()
+  OCILobDisableBuffering()
+  OCIErrorGet()
+  OCILobWrite()
+  OCILobRead()
+  
+  
+  OCILobFreeTemporary()
+  
+  Name
+  OCI Lob Free Temporary
+  
+  Purpose
+  Free a temporary LOB
+  
+  Syntax
+  sword OCILobFreeTemporary(OCISvcCtx          *svchp,
+                            OCIError           *errhp,
+                            OCILobLocator      *locp);
+  
+  Comments
+    Frees the contents of the temporary Lob this locator is pointing to. Note
+    that the locator itself is not freed until a OCIDescriptorFree is done.
+  
+  Parameters
+  svchp (IN/OUT) - the service context handle. 
+  errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
+  diagnostic information in the event of an error. 
+  locp (IN/OUT) - a locator uniquely referencing the LOB
+  
+  Related functions
+  OCILobCreateTemporary()
+  OCILobIsTemporary()
+  
+  
+  Name
+  OCI Lob/File Get Chunk Size
+  
+  Purpose
+  When creating the table, the user can specify the chunking factor, which can
+  be a multiple of Oracle blocks. This corresponds to the chunk size used by the
+  LOB data layer when accessing/modifying the LOB value. Part of the chunk is
+  used to store system-related information and the rest stores the LOB value.
+  This function returns the amount of space used in the LOB chunk to store 
+  the LOB value.
+  
+  Syntax
+  sword OCILobGetChunkSize ( OCISvcCtx      *svchp,
+                             OCIError       *errhp,
+                             OCILobLocator  *locp,
+                             ub4            *chunksizep );
+  
+  Comments
+   Performance will be improved if the user issues read/write
+  requests using a multiple of this chunk size. For writes, there is an added 
+  benefit since LOB chunks are versioned and, if all writes are done on chunk
+  basis, no extra/excess versioning is done nor duplicated. Users could batch 
+  up the write until they have enough for a chunk instead of issuing several
+  write calls for the same chunk.
+  
+  Parameters
+  svchp (IN) - the service context handle.
+  errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
+  diagnostic information in the event of an error.
+  locp (IN/OUT) - a LOB locator that uniquely references the LOB. For internal
+  LOBs, this locator must be a locator that was obtained from the server 
+  specified by svchp. For FILEs, this locator can be initialized by a Select or
+  OCILobFileSetName.
+  chunksizep (OUT) - On output, it is the length of the LOB if not NULL - for 
+  character LOBs it is the number of characters, for binary LOBs it is the 
+  number of bytes in the LOB.
+  
+  Related Functions
+  
+  OCILobGetLength()
+  
+  Name
+  OCI Lob/File Length
+  
+  Purpose
+  Gets the length of a LOB/FILE. 
+  
+  Syntax
+  sword OCILobGetLength ( OCISvcCtx      *svchp,
+                          OCIError       *errhp,
+                          OCILobLocator  *locp,
+                          ub4            *lenp );
+  
+  Comments
+  Gets the length of a LOB/FILE. If the LOB/FILE is NULL, the length is 
+  undefined.
+  
+  Parameters
+  svchp (IN) - the service context handle.
+  errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
+  diagnostic information in the event of an error.
+  locp (IN/OUT) - a LOB locator that uniquely references the LOB. For internal
+  LOBs, this locator must be a locator that was obtained from the server 
+  specified by svchp. For FILEs, this locator can be initialized by a Select or
+  OCILobFileSetName.
+  lenp (OUT) - On output, it is the length of the LOB if not NULL - for 
+  character LOBs it is the number of characters, for binary LOBs it is the 
+  number of bytes in the LOB.
+  
+  Related Functions
+  OCIErrorGet, OCIFileSetName
+  
+  
+  
+  OCILobIsEqual()
+  
+  Name
+  
+  OCI Lob Is Equal
+  
+  Purpose
+  Compares two LOB locators for equality.
+  
+  Syntax
+  sword OCILobIsEqual ( OCIEnv                  *envhp,
+                        CONST OCILobLocator     *x,
+                        CONST OCILobLocator     *y,
+                        boolean                 *is_equal );
+  
+  Comments
+  Compares the given LOB locators for equality.  Two LOB locators are equal if 
+  and only if they both refer to the same LOB data.
+  Two NULL locators are considered not equal by this function.
+  Parameters
+  envhp (IN) - the OCI environment handle.
+  x (IN) - LOB locator to compare.
+  y (IN) - LOB locator to compare.
+  is_equal (OUT) - TRUE, if the LOB locators are equal; FALSE if they are not.
+  
+  See also
+  OCILobAssign, OCILobLocatorIsInit
+  OCILobLocatorAssign,
+  OCILobIsOpen()
+  
+  Name
+  
+  OCI Lob Is Open
+  sword OCILobIsOpen(svchp, errhp, locp, flag)
+  OCISvcCtx     *svchp;
+  OCIError      *errhp;
+  OCILobLocator *locp;
+  boolean       *flag;
+  
+  Comments
+     Checks if the LOB locator was opened before. flag is set to TRUE
+     if opened; FALSE otherwise 
+  
+  
+  Parameters
+  svchp (IN) - the service context handle. 
+  errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
+  diagnostic information in the event of an error. 
+  locp (IN) - the locator to test for temporary LOB
+  flag(OUT) - TRUE, if the LOB locator points to is open
+                      FALSE, if not.
+  
+  OCILobIsTemporary()
+  
+  Name
+  
+  OCI Lob Is Temporary
+  
+  Purpose
+    Tests if this locator points to a temporary LOB
+  
+  Syntax
+  sword OCILobIsTemporary(OCIEnv            *envhp,
+                          OCIError          *errhp,
+                          OCILobLocator     *locp,
+                          boolean           *is_temporary);
+  
+  Comments
+  Tests the locator to determine if it points to a temporary LOB.
+  If so, is_temporary is set to TRUE. If not, is_temporary is set
+  to FALSE.
+  
+  Parameters
+  envhp (IN) - the environment handle. 
+  errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
+  diagnostic information in the event of an error. 
+  locp (IN) - the locator to test for temporary LOB
+  is_temporary(OUT) - TRUE, if the LOB locator points to a temporary LOB;
+                      FALSE, if not.
+  
+  See Also
+  OCILobCreateTemporary, OCILobFreeTemporary
+  
+  
+  OCILobLoadFromFile()
+  
+  Name
+  OCI Lob Load From File
+  
+  Purpose
+  Load/copy all or a portion of the file into an internal LOB.
+  
+  Syntax
+  sword OCILobLoadFromFile ( OCISvcCtx        *svchp,
+                             OCIError         *errhp,
+                             OCILobLocator    *dst_locp,
+                             OCILobLocator    *src_filep,
+                             ub4              amount,
+                             ub4              dst_offset,
+                             ub4              src_offset );
+  
+  Comments
+  Loads/copies a portion or all of a file value into an internal LOB as 
+  specified.  The data is copied from the source file to the destination 
+  internal LOB (BLOB/CLOB).  No character set conversions are performed 
+  when copying the bfile data to a clob/nclob.  The bfile data must already
+  be in the same character set as the clob/nclob in the database.  No
+  error checking is performed to verify this.
+  The source (src_filep) and the destination (dst_locp) LOBs must already exist.
+  If the data already exists at the destination's start position, it is 
+  overwritten with the source data. If the destination's start position is 
+  beyond the end of the current data, a hole is created from the end of the data
+  to the beginning of the newly written data from the source. The destination 
+  LOB is extended to accommodate the newly written data if it extends 
+  beyond the current length of the destination LOB. 
+  It is an error to extend the destination LOB beyond the maximum length 
+  allowed or to try to copy from a NULL LOB.
+  Parameters
+  svchp (IN) - the service context handle. 
+  errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
+  diagnostic information in the event of an error. 
+  dst_locp (IN/OUT) - a locator uniquely referencing the destination internal 
+  LOB which may be of type blob, clob, or nclob. 
+  src_filep (IN/OUT) - a locator uniquely referencing the source BFILE. 
+  amount (IN) - the number of bytes to be copied.
+  dst_offset (IN) - this is the absolute offset for the destination LOB. 
+  For character LOBs it is the number of characters from the beginning of the 
+  LOB at which to begin writing. For binary LOBs it is the number of bytes from 
+  the beginning of the lob from which to begin reading. The offset starts at 1.
+  src_offset (IN) - this is the absolute offset for the source BFILE.  It is 
+  the number of bytes from the beginning of the LOB.  The offset starts at 1.
+  
+  See Also 
+  OCIErrorGet(), OCILobAppend(), OCILobWrite(), OCILobTrim(), OCILobCopy()
+  
+  OCILobLocatorAssign()
+  
+  Name
+  OCI Lob LOCATOR ASsiGn
+  
+  Purpose
+  Assigns one LOB/FILE locator to another.
+  
+  Syntax
+  sword OCILobLocatorAssign ( OCISvcCtx             *svchp, 
+                              OCIError              *errhp, 
+                              CONST OCILobLocator   *src_locp, 
+                              OCILobLocator         **dst_locpp );
+  
+  Comments
+  Assign source locator to destination locator.  After the assignment, both 
+  locators refer to the same LOB data.  For internal LOBs, the source locator's 
+  LOB data gets copied to the destination locator's LOB data only when the 
+  destination locator gets stored in the table.  Therefore, issuing a flush of 
+  the object containing the destination locator will copy the LOB data. For 
+  FILEs only the locator that refers to the OS file is copied to the table. The
+  OS file is not copied.
+  Note : the only difference between this and OCILobAssign is that this takes
+  a OCI service handle pointer instead of a OCI environment handle pointer
+  
+  Parameters
+  svchp (IN/OUT) - OCI service handle initialized in object mode.
+  errhp (IN/OUT) - The OCI error handle. If there is an error, it is recorded 
+  in errhp and this function returns OCI_ERROR. Diagnostic information can be 
+  obtained by calling OCIErrorGet().
+  src_locp (IN) - LOB locator to copy from.
+  dst_locpp (IN/OUT) - LOB locator to copy to.  The caller must allocate space 
+  for the OCILobLocator by calling OCIDescriptorAlloc().
+  
+  See also
+  OCIErrorGet()
+  OCILobIsEqual()
+  OCILobLocatorIsInit()
+  OCILobAssign()
+  
+  
+  
+  
+  OCILobLocatorIsInit()
+  
+  Name
+  OCI LOB locator is initialized?
+  
+  Purpose
+  Tests to see if a given LOB locator is initialized.
+  
+  Syntax
+  sword OCILobLocatorIsInit ( OCIEnv   *envhp,
+                              OCIError *errhp,
+                              CONST OCILobLocator *locp,
+                              boolean *is_initialized );
+  
+  Comments
+  Tests to see if a given LOB locator is initialized.
+  
+  Parameters
+  envhp (IN/OUT) - OCI environment handle initialized in object mode.
+  errhp (IN/OUT) - error handle. The OCI error handle. If there is an error, it 
+  is recorded in err and this function returns OCI_ERROR. Diagnostic 
+  information can be obtained by calling OCIErrorGet().
+  locp (IN) - the LOB locator being tested
+  is_initialized (OUT) - returns TRUE if the given LOB locator is initialized; 
+  FALSE if it is not.
+  
+  See also
+  OCIErrorGet, OCILobIsEqual
+  
+  
+  
+  
+  OCILobRead()
+  
+  Name
+  OCI Lob/File ReaD
+  
+  Purpose
+  Reads a portion of a LOB/FILE as specified by the call into a buffer. 
+  
+  Syntax
+  sword OCILobRead ( OCISvcCtx       *svchp,
+                     OCIError        *errhp,
+                     OCILobLocator   *locp,
+                     ub4             offset,
+                     ub4             *amtp,
+                     dvoid           *bufp,
+                     ub4             bufl,
+                     dvoid           *ctxp,  
+                     OCICallbackLobRead cbfp,
+                     ub2             csid,
+                     ub1             csfrm );
+  
+  Comments
+  Reads a portion of a LOB/FILE as specified by the call into a buffer. Data 
+  read from a hole is returned as 0s. It is an error to try to read from a NULL
+  LOB/FILE. The OS FILE must already exist on the server and must have been 
+  opened using the input locator. Oracle must hav epermission to read the OS 
+  file and user must have read permission on the directory object.
+  
+  Parameters
+  svchp (IN/OUT) - the service context handle. 
+  errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
+  diagnostic information in the event of an error.
+  locp (IN/OUT) - a LOB locator that uniquely references a LOB. 
+  offset (IN) - On input, it is the absolute offset, for character LOBs in the 
+  number of characters from the beginning of the LOB, for binary LOBs it is the 
+  number of bytes. Starts from 1.
+  amtp (IN/OUT) - On input, the number of character or bytes to be read. On 
+  output, the actual number of bytes or characters read. 
+  If the amount of bytes to be read is larger than the buffer length it is 
+  assumed that the LOB is being read in a streamed mode. On input if this value 
+  is 0, then the data shall be read in streamed mode from the LOB until the end 
+  of LOB. If the data is read in pieces, *amtp always contains the length of 
+  the last piece read.  If a callback function is defined, then this callback 
+  function will be invoked each time bufl bytes are read off the pipe. Each 
+  piece will be written into bufp.
+  If the callback function is not defined, then OCI_NEED_DATA error code will 
+  be returned. The application must invoke the LOB read over and over again to 
+  read more pieces of the LOB until the OCI_NEED_DATA error code is not 
+  returned. The buffer pointer and the length can be different in each call 
+  if the pieces are being read into different sizes and location. 
+  bufp (IN) - the pointer to a buffer into which the piece will be read. The 
+  length of the allocated memory is assumed to be bufl. 
+  bufl (IN) - the length of the buffer in octets. 
+  ctxp (IN) - the context for the call back function. Can be NULL.
+  cbfp (IN) - a callback that may be registered to be called for each piece. If 
+  this is NULL, then OCI_NEED_DATA will be returned for each piece. 
+  The callback function must return OCI_CONTINUE for the read to continue. 
+  If any other error code is returned, the LOB read is aborted. 
+    ctxp (IN) - the context for the call back function. Can be NULL.
+    bufp (IN) - a buffer pointer for the piece.
+    len (IN) - the length of length of current piece in bufp.
+    piece (IN) - which piece - OCI_FIRST_PIECE, OCI_NEXT_PIECE or 
+    OCI_LAST_PIECE.
+  csid - the character set ID of the buffer data
+  csfrm - the character set form of the buffer data
+  
+  Related Functions
+  OCIErrorGet, OCILobWrite, OCILobFileOpen, OCILobFileSetName, CREATE DIRECTORY
+  
+  
+  
+  
+  OCILobTrim()
+  
+  Name
+  
+  OCI Lob  Trim
+  
+  Purpose
+  Trims the lob value to a shorter length
+  
+  Syntax
+  sword OCILobTrim ( OCISvcCtx       *svchp,
+                   OCIError        *errhp,
+                   OCILobLocator   *locp,
+                   ub4             newlen );
+  
+  Comments
+  Truncates LOB data to a specified shorter length. 
+  
+  Parameters
+  svchp (IN) - the service context handle. 
+  errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
+  diagnostic information in the event of an error. 
+  locp (IN/OUT) - a LOB locator that uniquely references the LOB. This locator 
+  must be a locator that was obtained from the server specified by svchp. 
+  newlen (IN) - the new length of the LOB data, which must be less than or equal
+  to the current length. 
+  
+  Related Functions
+  OCIErrorGet, OCILobWrite, OCiLobErase, OCILobAppend, OCILobCopy
+  
+  
+  
+  
+  
+  OCILobWrite()
+  
+  Name
+  OCI Lob Write
+  
+  Purpose
+  Writes a buffer into a LOB
+  
+  Syntax
+  sword OCILobWrite ( OCISvcCtx       *svchp,
+                      OCIError        *errhp,
+                      OCILobLocator   *locp,
+                      ub4             offset,
+                      ub4             *amtp,
+                      dvoid           *bufp, 
+                      ub4             buflen,
+                      ub1             piece,
+                      dvoid           *ctxp,  
+                      OCICallbackLobWrite   (cbfp)
+                                      (
+                                      dvoid    *ctxp,
+                                      dvoid    *bufp,
+                                      ub4      *lenp,
+                                      ub1      *piecep ) 
+                      ub2             csid
+                      ub1             csfrm );
+  
+  
+  Comments
+  Writes a buffer into a LOB as specified. If LOB data already exists 
+  it is overwritten with the data stored in the buffer.
+  The buffer can be written to the LOB in a single piece with this call, or
+  it can be provided piecewise using callbacks or a standard polling method.
+  If this value of the piece parameter is OCI_FIRST_PIECE, data must be 
+  provided through callbacks or polling.
+  If a callback function is defined in the cbfp parameter, then this callback 
+  function will be invoked to get the next piece after a piece is written to 
+  the pipe. Each piece will be written from bufp.
+  If no callback function is defined, then OCILobWrite() returns the 
+  OCI_NEED_DATA error code. The application must all OCILobWrite() again 
+  to write more pieces of the LOB. In this mode, the buffer pointer and the 
+  length can be different in each call if the pieces are of different sizes and 
+  from different locations. A piece value of OCI_LAST_PIECE terminates the 
+  piecewise write. 
+  
+  Parameters
+  svchp (IN/OUT) - the service context handle. 
+  errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
+  diagnostic information in the event of an error. 
+  locp (IN/OUT) - a LOB locator that uniquely references a LOB. 
+  offset (IN) - On input, it is the absolute offset, for character LOBs in 
+  the number of characters from the beginning of the LOB, for binary LOBs it 
+  is the number of bytes. Starts at 1.
+  bufp (IN) - the pointer to a buffer from which the piece will be written. The 
+  length of the allocated memory is assumed to be the value passed in bufl. 
+  Even if the data is being written in pieces, bufp must contain the first 
+  piece of the LOB when this call is invoked.
+  bufl (IN) - the length of the buffer in bytes.
+  Note: This parameter assumes an 8-bit byte. If your platform uses a 
+  longer byte, the value of bufl must be adjusted accordingly.
+  piece (IN) - which piece of the buffer is being written. The default value for
+  this parameter is OCI_ONE_PIECE, indicating the buffer will be written in a 
+  single piece.
+  The following other values are also possible for piecewise or callback mode: 
+  OCI_FIRST_PIECE, OCI_NEXT_PIECE and OCI_LAST_PIECE.
+  amtp (IN/OUT) - On input, takes the number of character or bytes to be 
+  written. On output, returns the actual number of bytes or characters written. 
+  If the data is written in pieces, *amtp will contain the total length of the 
+  pieces written at the end of the call (last piece written) and is undefined in
+  between. 
+  (Note it is different from the piecewise read case)
+  ctxp (IN) - the context for the call back function. Can be NULL.
+  cbfp (IN) - a callback that may be registered to be called for each piece in 
+  a piecewise write. If this is NULL, the standard polling method will be used.
+  The callback function must return OCI_CONTINUE for the write to continue. 
+  If any other error code is returned, the LOB write is aborted. The 
+  callback takes the following parameters:
+    ctxp (IN) - the context for the call back function. Can be NULL.
+    bufp (IN/OUT) - a buffer pointer for the piece.
+    lenp (IN/OUT) - the length of the buffer (in octets) and the length of 
+    current piece in bufp (out octets).
+    piecep (OUT) - which piece - OCI_NEXT_PIECE or OCI_LAST_PIECE.
+  csid - the character set ID of the buffer data
+  csfrm - the character set form of the buffer data
+  Related Functions
+  
+  OCILobWriteAppend()
+  
+  Name
+  OCI Lob Write Append
+  
+  Purpose
+  Writes data to the end of a LOB value. This call provides the ability
+  to get the length of the data and append it to the end of the LOB in
+  a single round trip to the server.
+  
+  Syntax
+  sword OCILobWriteAppend ( OCISvcCtx       *svchp,
+                      OCIError        *errhp,
+                      OCILobLocator   *locp,
+                      ub4             *amtp,
+                      dvoid           *bufp, 
+                      ub4             buflen,
+                      ub1             piece,
+                      dvoid           *ctxp,  
+                      OCICallbackLobWrite   (cbfp)
+                                      (
+                                      dvoid    *ctxp,
+                                      dvoid    *bufp,
+                                      ub4      *lenp,
+                                      ub1      *piecep ) 
+                      ub2             csid
+                      ub1             csfrm );
+  
+  
+  Comments
+  Writes a buffer to the end of a LOB as specified. If LOB data already exists 
+  it is overwritten with the data stored in the buffer.
+  The buffer can be written to the LOB in a single piece with this call, or
+  it can be provided piecewise using callbacks or a standard polling method.
+  If this value of the piece parameter is OCI_FIRST_PIECE, data must be 
+  provided through callbacks or polling.
+  If a callback function is defined in the cbfp parameter, then this callback 
+  function will be invoked to get the next piece after a piece is written to the 
+  pipe. Each piece will be written from bufp.
+  If no callback function is defined, then OCILobWriteAppend() returns the 
+  OCI_NEED_DATA error code. The application must all OCILobWriteAppend() again 
+  to write more pieces of the LOB. In this mode, the buffer pointer and the 
+  length can be different in each call if the pieces are of different sizes and 
+  from different locations. A piece value of OCI_LAST_PIECE terminates the 
+  piecewise write. 
+  
+  Parameters
+  svchp (IN/OUT) - the service context handle. 
+  errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
+  diagnostic information in the event of an error. 
+  locp (IN/OUT) - a LOB locator that uniquely references a LOB. 
+  bufp (IN) - the pointer to a buffer from which the piece will be written. The 
+  length of the allocated memory is assumed to be the value passed in bufl. Even 
+  if the data is being written in pieces, bufp must contain the first piece of 
+  the LOB when this call is invoked.
+  bufl (IN) - the length of the buffer in bytes.
+  Note: This parameter assumes an 8-bit byte. If your platform uses a 
+  longer byte, the value of bufl must be adjusted accordingly.
+  piece (IN) - which piece of the buffer is being written. The default value for
+  this parameter is OCI_ONE_PIECE, indicating the buffer will be written in a 
+  single piece.
+  The following other values are also possible for piecewise or callback mode: 
+  OCI_FIRST_PIECE, OCI_NEXT_PIECE and OCI_LAST_PIECE.
+  amtp (IN/OUT) - On input, takes the number of character or bytes to be 
+  written. On output, returns the actual number of bytes or characters written. 
+  If the data is written in pieces, *amtp will contain the total length of the 
+  pieces written at the end of the call (last piece written) and is undefined in
+  between. 
+  (Note it is different from the piecewise read case)
+  ctxp (IN) - the context for the call back function. Can be NULL.
+  cbfp (IN) - a callback that may be registered to be called for each piece in a 
+  piecewise write. If this is NULL, the standard polling method will be used.
+  The callback function must return OCI_CONTINUE for the write to continue. 
+  If any other error code is returned, the LOB write is aborted. The 
+  callback takes the following parameters:
+    ctxp (IN) - the context for the call back function. Can be NULL.
+    bufp (IN/OUT) - a buffer pointer for the piece.
+    lenp (IN/OUT) - the length of the buffer (in octets) and the length of 
+    current piece in bufp (out octets).
+    piecep (OUT) - which piece - OCI_NEXT_PIECE or OCI_LAST_PIECE.
+  csid - the character set ID of the buffer data
+  csfrm - the character set form of the buffer data
+  Related Functions
+  
+  
+  
+  
+  OCILobGetStorageLimit()
+  
+  Name
+  OCI Lob Get Storage Limit
+  
+  Purpose
+  To get the maximum Length of a LOB in bytes that can be stored in the database.
+  
+  Syntax
+  sword OCILobGetStorageLimit ( OCISvcCtx       *svchp,
+                      OCIError        *errhp,
+                      OCILobLocator   *locp,
+                      oraub8          *limitp);
+  
+  
+  Comments
+  With unlimited size LOB support the limit for a LOB is no longer restricted to 4GB.
+  This interface should be used to get the actual limit for storing data for a specific
+  LOB locator. Note that if the compatibality is set to 9.2 or older the limit would still 
+  be 4GB.
+  
+  Parameters
+  svchp (IN/OUT) - the service context handle. 
+  errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
+  diagnostic information in the event of an error. 
+  locp (IN/OUT) - a LOB locator that uniquely references a LOB. 
+  limitp (OUT)  - The storage limit for a LOB in bytes.
+  Related Functions
+  
+  
+  
+  
+  OCILogoff()
+  Name
+  OCI simplified Logoff
+  Purpose
+  This function is used to terminate a session created with OCILogon() or
+  OCILogon2().
+  Syntax
+  sword OCILogoff ( OCISvcCtx      *svchp
+                     OCIError       *errhp );
+  Comments
+  This call is used to terminate a session which was created with OCILogon() or
+  OCILogon2().  
+  This call implicitly deallocates the server, authentication, and service 
+  context handles.
+  Note: For more information on logging on and off in an application, 
+  refer to the section "Application Initialization, Connection, and 
+  Authorization" on page 2-16.
+  Parameters
+  svchp (IN) - the service context handle which was used in the call to 
+  OCILogon() or OCILogon2().
+  errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
+  diagnostic information in the event of an error.
+  See Also
+  OCILogon(), OCILogon2().
+  
+  
+  
+  
+  
+  
+  OCILogon()
+  Name
+  OCI Service Context Logon
+  Purpose
+  This function is used to create a simple logon session.
+  Syntax
+  sword OCILogon ( OCIEnv          *envhp,
+                         OCIError        *errhp,
+                         OCISvcCtx       *svchp,
+                         CONST OraText      *username,
+                         ub4             uname_len,
+                         CONST OraText      *password,
+                         ub4             passwd_len,
+                         CONST OraText      *dbname,
+                         ub4             dbname_len );
+  Comments
+  This function is used to create a simple logon session for an application. 
+  Note: Users requiring more complex session (e.g., TP monitor 
+  applications) should refer to the section "Application Initialization, 
+  Connection, and Authorization" on page 2-16.
+  This call allocates the error and service context handles which are passed to 
+  it. This call also implicitly allocates server and authentication handles 
+  associated with the session.  These handles can be retrieved by calling 
+  OCIAttrGet() on the service context handle.
+  Parameters
+  envhp (IN) - the OCI environment handle.
+  errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
+  diagnostic information in the event of an error.
+  svchp (OUT) - the service context pointer.
+  username (IN) - the username.
+  uname_len (IN) - the length of username.
+  password (IN) - the user's password.
+  passwd_len (IN) - the length of password.
+  dbname (IN) - the name of the database to connect to.
+  dbname_len (IN) - the length of dbname.
+  See Also
+  OCILogoff()
+  
+  
+  
+  
+  
+  OCILogon2()
+  Name
+  OCI Service Context Logon
+  Purpose
+  This function is used to create a logon session in connection pooling mode.
+  Syntax
+  sword OCILogon2 ( OCIEnv          *envhp,
+                         OCIError        *errhp,
+                         OCISvcCtx       **svchp,
+                         CONST OraText      *username,
+                         ub4             uname_len,
+                         CONST OraText      *password,
+                         ub4             passwd_len,
+                         CONST OraText      *dbname,
+                         ub4             dbname_len,
+                         ub4             mode);
+  Comments
+  This function is used to create a simple logon session for an application in
+  Connection Pooling mode. The valid values for mode are currently OCI_POOL and
+  OCI_DEFAULT. Call to this function with OCI_DEFAULT mode is equivalent to 
+  OCILogon() call.
+  This call allocates the error and service context handles which are passed to 
+  it. This call also implicitly allocates server and authentication handles 
+  associated with the session.  These handles can be retrieved by calling 
+  OCIAttrGet() on the service context handle. This call assumes that 
+  OCIConnectionPoolCreate() has already been called for the same dbname.
+  Parameters
+  envhp (IN) - the OCI environment handle.
+  errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
+  diagnostic information in the event of an error.
+  svchp (OUT) - the service context pointer.
+  username (IN) - the username.
+  uname_len (IN) - the length of username.
+  password (IN) - the user's password. If this is null, it is assumed that a
+                  proxy session has to be created and the required grants on 
+                  the database are already done.
+  passwd_len (IN) - the length of password.
+  dbname (IN) - the name of the database to connect to.
+  dbname_len (IN) - the length of dbname.
+  mode (IN) - the mode for doing the server attach. Should be OCI_POOL for
+              using Connection Pooling.
+  
+  
+  See Also
+  OCILogoff()
+  
+  
+  
+  
+  
+  OCIMemoryFree()
+  Name
+  OCI FREE Memory
+  Purpose
+  Frees up storage associated with the pointer.
+  Syntax
+  void OCIMemoryFree ( CONST OCIStmt   *stmhp,
+                       dvoid           *memptr);
+  Comments
+  Frees up dynamically allocated data pointers associated with the pointer using 
+  either the default memory free function or the registered memory free 
+  function, as the case may be.
+  A user-defined memory free function can be registered during the initial call 
+  to OCIInitialize(). 
+  This call is always successful. 
+  Parameters
+  stmhp (IN) - statement handle which returned this data buffer.
+  memptr (IN) - pointer to data allocated by the client library. 
+  Related Functions
+  OCIInitialize()
+  
+  
+  
+  
+  
+  OCIParamGet()
+  Name
+  OCI Get PARaMeter
+  Purpose
+  Returns a descriptor of a parameter specified by position in the describe 
+  handle or statement handle.
+  Syntax
+  sword OCIParamGet ( CONST dvoid       *hndlp,
+                    ub4         htype,
+                    OCIError    *errhp,
+                    dvoid    **parmdpp,
+                    ub4         pos );
+  Comments
+  This call returns a descriptor of a parameter specified by position in the 
+  describe handle or statement handle. Parameter descriptors are always 
+  allocated internally by the OCI library. They are read-only.
+  OCI_NO_DATA may be returned if there are no parameter descriptors for this 
+  position. 
+  See Appendix B for more detailed information about parameter descriptor 
+  attributes.
+  Parameters
+  hndlp (IN) - a statement handle or describe handle. The OCIParamGet() 
+  function will return a parameter descriptor for this handle. 
+  htype (IN) - the type of the handle passed in the handle parameter. Valid 
+  types are OCI_HTYPE_DESCRIBE, for a describe handle OCI_HTYPE_STMT, for a 
+  statement handle
+  errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
+  diagnostic information in the event of an error.
+  parmdpp (OUT) - a descriptor of the parameter at the position given in the pos 
+  parameter.
+  pos (IN) - position number in the statement handle or describe handle. A 
+  parameter descriptor will be returned for this position.
+  Note: OCI_NO_DATA may be returned if there are no parameter 
+  descriptors for this position. 
+  Related Functions
+  OCIAttrGet(), OCIAttrSet()
+  
+  
+  
+  
+  
+  OCIParamSet()
+  Name
+  OCI Parameter Set in handle
+  Purpose
+  Used to set a complex object retrieval descriptor into a complex object 
+  retrieval handle.
+  Syntax
+  sword   OCIParamGet ( dvoid *hndlp,
+                         ub4 htyp,
+                        OCIError *errhp,
+                        CONST dvoid *dscp,
+                        ub4 dtyp,
+                        ub4 pos );
+  Comments
+  This call sets a given complex object retrieval descriptor into a complex 
+  object retrieval handle.
+  The handle must have been previously allocated using OCIHandleAlloc(), and 
+  the descriptor must have been previously allocated using OCIDescAlloc(). 
+  Attributes of the descriptor are set using OCIAttrSet().
+  Parameters
+  hndlp (IN/OUT) - handle pointer.
+  htype (IN) - handle type.
+  errhp (IN/OUT) - error handle.
+  dscp (IN) - complex object retrieval descriptor pointer.
+  dtyp (IN) - 
+  pos (IN) - position number.
+  See Also
+  
+  
+  
+  
+  
+  OCIPasswordChange()
+  Name
+  OCI Change PassWord
+  Purpose
+  This call allows the password of an account to be changed.
+  Syntax
+  sword OCIPasswordChange ( OCISvcCtx     *svchp,
+                          OCIError      *errhp,
+                          CONST OraText    *user_name,
+                          ub4           usernm_len,
+                          CONST OraText    *opasswd,
+                          ub4           opasswd_len,
+                          CONST OraText    *npasswd,
+                          sb4           npasswd_len,
+                          ub4           mode);
+  Comments
+  This call allows the password of an account to be changed. This call is 
+  similar to OCISessionBegin() with the following differences:
+  If the user authentication is already established, it authenticates 
+  the account using the old password and then changes the 
+  password to the new password
+  If the user authentication is not established, it establishes a user 
+  authentication and authenticates the account using the old 
+  password, then changes the password to the new password.
+  This call is useful when the password of an account is expired and 
+  OCISessionBegin() returns an error or warning which indicates that the 
+  password has expired. 
+  Parameters
+  svchp (IN/OUT) - a handle to a service context. The service context handle 
+  must be initialized and have a server context handle associated with it.
+  errhp (IN) - an error handle which can be passed to OCIErrorGet() for 
+  diagnostic information in the event of an error.
+  user_name (IN) - specifies the user name. It points to a character string, 
+  whose length is specified in usernm_len. This parameter must be NULL if the 
+  service context has been initialized with an authentication handle.
+  usernm_len (IN) - the length of the user name string specified in user_name. 
+  For a valid user name string, usernm_len must be non-zero.
+  opasswd (IN) - specifies the user's old password. It points to a character 
+  string, whose length is specified in opasswd_len .
+  opasswd_len (IN) - the length of the old password string specified in opasswd. 
+  For a valid password string, opasswd_len must be non-zero.
+  npasswd (IN) - specifies the user's new password. It points to a character 
+  string, whose length is specified in npasswd_len which must be non-zero for a 
+  valid password string. If the password complexity verification routine is 
+  specified in the user's profile to verify the new password's complexity, the 
+  new password must meet the complexity requirements of the verification 
+  function.
+  npasswd_len (IN)  - then length of the new password string specified in 
+  npasswd. For a valid password string, npasswd_len must be non-zero.
+  mode - pass as OCI_DEFAULT.
+  Related Functions
+  OCISessionBegin()
+  
+  
+  ----------------------------------OCIReset------------------------------------
+  
+  
+  OCIReset()
+  Name
+  OCI Reset
+  Purpose
+  Resets the interrupted asynchronous operation and protocol. Must be called
+  if a OCIBreak call had been issued while a non-blocking operation was in
+  progress.
+  Syntax
+  sword OCIReset ( dvoid      *hndlp,
+                   OCIError   *errhp);
+  Comments
+  This call is called in non-blocking mode ONLY. Resets the interrupted
+  asynchronous operation and protocol. Must be called if a OCIBreak call 
+  had been issued while a non-blocking operation was in progress. 
+  Parameters
+  hndlp (IN) - the service context handle or the server context handle.
+  errhp (IN) - an error handle which can be passed to OCIErrorGet() for 
+  diagnostic information in the event of an error.
+  Related Functions
+  
+  
+  OCIResultSetToStmt()
+  Name
+  OCI convert Result Set to Statement Handle
+  Purpose
+  Converts a descriptor to statement handle for fetching rows.
+  Syntax
+  sword OCIResultSetToStmt ( OCIResult     *rsetdp,
+                           OCIError      *errhp );
+  Comments
+  Converts a descriptor to statement handle for fetching rows.
+  A result set descriptor can be allocated with a call to OCIDescAlloc().
+  Parameters
+  rsetdp (IN/OUT) - a result set descriptor pointer. 
+  errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
+  diagnostic information in the event of an error. 
+  Related Functions
+  OCIDescAlloc()
+  
+  
+  
+  
+  OCIServerAttach()
+  Name
+  OCI ATtaCH to server
+  Purpose
+  Creates an access path to a data source for OCI operations.
+  Syntax
+  sword OCIServerAttach ( OCIServer    *srvhp,
+                        OCIError     *errhp,
+                        CONST OraText   *dblink,
+                        sb4          dblink_len,
+                        ub4          mode);
+  Comments
+  This call is used to create an association between an OCI application and a 
+  particular server. 
+  This call initializes a server context handle, which must have been previously 
+  allocated with a call to OCIHandleAlloc().
+  The server context handle initialized by this call can be associated with a 
+  service context through a call to OCIAttrSet(). Once that association has been 
+  made, OCI operations can be performed against the server.
+  If an application is operating against multiple servers, multiple server 
+  context handles can be maintained. OCI operations are performed against 
+  whichever server context is currently associated with the service context.
+  Parameters
+  srvhp (IN/OUT) - an uninitialized server context handle, which gets 
+  initialized by this call. Passing in an initialized server handle causes an 
+  error. 
+  errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
+  diagnostic information in the event of an error.
+  dblink (IN) - specifies the database (server) to use. This parameter points to
+  a character string which specifies a connect string or a service point. If the 
+  connect string is NULL, then this call attaches to the default host. The length
+  of connstr is specified in connstr_len. The connstr pointer may be freed by the
+  caller on return.
+  dblink_len (IN) - the length of the string pointed to by connstr. For a valid 
+  connect string name or alias, connstr_len must be non-zero.
+  mode (IN) - specifies the various modes of operation.  For release 8.0, pass as
+  OCI_DEFAULT - in this mode, calls made to the server on this server context 
+  are made in blocking mode. 
+  Example
+  See the description of OCIStmtPrepare() on page 13-96 for an example showing 
+  the use of OCIServerAttach().
+  Related Functions
+  OCIServerDetach()
+  
+  
+  
+  OCIServerDetach()
+  Name
+  OCI DeTaCH server
+  Purpose
+  Deletes an access to a data source for OCI operations.
+  Syntax
+  sword OCIServerDetach ( OCIServer   *svrhp,
+                        OCIError    *errhp,
+                        ub4         mode); 
+  Comments
+  This call deletes an access to data source for OCI operations, which was 
+  established by a call to OCIServerAttach(). 
+  Parameters
+  srvhp (IN) - a handle to an initialized server context, which gets reset to 
+  uninitialized state. The handle is not de-allocated. 
+  errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
+  diagnostic information in the event of an error. 
+  mode (IN) - specifies the various modes of operation. The only valid mode is 
+  OCI_DEFAULT for the default mode. 
+  Related Functions
+  OCIServerAttach()
+  
+  
+  
+  OCIServerVersion()
+  Name
+  OCI VERSion
+  Purpose
+  Returns the version string of the Oracle server.
+  Syntax
+  sword OCIServerVersion ( dvoid        *hndlp, 
+                         OCIError     *errhp, 
+                         OraText         *bufp,
+                         ub4          bufsz
+                         ub1          hndltype );
+  Comments
+  This call returns the version string of the Oracle server. 
+  For example, the following might be returned as the version string if your 
+  application is running against a 7.3.2 server:
+  Oracle7 Server Release 7.3.2.0.0 - Production Release
+  PL/SQL Release 2.3.2.0.0 - Production
+  CORE Version 3.5.2.0.0 - Production
+  TNS for SEQUENT DYNIX/ptx: Version 2.3.2.0.0 - Production
+  NLSRTL Version 3.2.2.0.0 - Production
+  
+  Parameters
+  hndlp (IN) - the service context handle or the server context handle.
+  errhp (IN) - an error handle which can be passed to OCIErrorGet() for 
+  diagnostic information in the event of an error.
+  bufp (IN) - the buffer in which the version information is returned.
+  bufsz (IN) - the length of the buffer.
+  hndltype (IN) - the type of handle passed to the function.
+  Related Functions
+  
+  
+  
+  
+  
+  OCISessionBegin()
+  Name
+  OCI Session Begin and authenticate user
+  Purpose
+  Creates a user authentication and begins a user session for a given server.
+  Syntax
+  sword OCISessionBegin ( OCISvcCtx     *svchp,
+                        OCIError      *errhp,
+                        OCISession    *usrhp,
+                        ub4           credt,
+                        ub4           mode);
+  
+  Comments
+  For Oracle8, OCISessionBegin() must be called for any given server handle 
+  before requests can be made against it. Also, OCISessionBegin() only supports 
+  authenticating the user for access to the Oracle server specified by the 
+  server handle in the service context. In other words, after OCIServerAttach() 
+  is called to initialize a server handle, OCISessionBegin() must be called to 
+  authenticate the user for that given server. 
+  When OCISessionBegin() is called for the first time for the given server 
+  handle, the initialized authentication handle is called a primary 
+  authentication context. A primary authentication context may not be created 
+  with the OCI_MIGRATE mode. Also, only one primary authentication context can 
+  be created for a given server handle and the primary authentication context c
+  an only ever be used with that server handle. If the primary authentication 
+  context is set in a service handle with a different server handle, then an 
+  error will result.
+  After OCISessionBegin() has been called for the server handle, and the primary 
+  authentication context is set in the service handle, OCISessionBegin() may be 
+  called again to initialize another authentication handle with different (or 
+  the same) credentials. When OCISessionBegin() is called with a service handle 
+  set with a primary authentication context, the returned authentication context
+  in authp is called a user authentication context. As many user authentication 
+  contexts may be initialized as desired.
+  User authentication contexts may be created with the OCI_MIGRATE mode. 
+  If the OCI_MIGRATE mode is not specified, then the user authentication 
+  context can only ever be used with the same server handle set in svchp. If 
+  OCI_MIGRATE mode is specified, then the user authentication may be set 
+  with different server handles. However, the user authentication context is 
+  restricted to use with only server handles which resolve to the same database 
+  instance and that have equivalent primary authentication contexts. Equivalent 
+  authentication contexts are those which were authenticated as the same 
+  database user.
+  OCI_SYSDBA, OCI_SYSOPER, and OCI_PRELIM_AUTH may only be used 
+  with a primary authentication context.
+  To provide credentials for a call to OCISessionBegin(), one of two methods are 
+  supported. The first is to provide a valid username and password pair for 
+  database authentication in the user authentication handle passed to 
+  OCISessionBegin(). This involves using OCIAttrSet() to set the 
+  OCI_ATTR_USERNAME and OCI_ATTR_PASSWORD attributes on the 
+  authentication handle. Then OCISessionBegin() is called with 
+  OCI_CRED_RDBMS.
+  Note: When the authentication handle is terminated using 
+  OCISessionEnd(), the username and password attributes remain 
+  unchanged and thus can be re-used in a future call to OCISessionBegin(). 
+  Otherwise, they must be reset to new values before the next 
+  OCISessionBegin() call.
+  The second type of credentials supported are external credentials. No 
+  attributes need to be set on the authentication handle before calling 
+  OCISessionBegin(). The credential type is OCI_CRED_EXT. This is equivalent 
+  to the Oracle7 `connect /' syntax. If values have been set for 
+  OCI_ATTR_USERNAME and OCI_ATTR_PASSWORD, then these are 
+  ignored if OCI_CRED_EXT is used.
+  Parameters
+  svchp (IN) - a handle to a service context. There must be a valid server 
+  handle set in svchp.
+  errhp (IN) - an error handle to the retrieve diagnostic information.
+  usrhp (IN/OUT) - a handle to an authentication context, which is initialized 
+  by this call.
+  credt (IN) - specifies the type of credentials to use for authentication. 
+  Valid values for credt are:
+  OCI_CRED_RDBMS - authenticate using a database username and 
+  password pair as credentials. The attributes OCI_ATTR_USERNAME 
+  and OCI_ATTR_PASSWORD should be set on the authentication 
+  context before this call.
+  OCI_CRED_EXT - authenticate using external credentials. No username 
+  or password is provided.
+  mode (IN) - specifies the various modes of operation. Valid modes are:
+  OCI_DEFAULT - in this mode, the authentication context returned may 
+  only ever be set with the same server context specified in svchp. This 
+  establishes the primary authentication context.
+  OCI_MIGRATE - in this mode, the new authentication context may be 
+  set in a service handle with a different server handle. This mode 
+  establishes the user authentication context. 
+  OCI_SYSDBA - in this mode, the user is authenticated for SYSDBA 
+  access.
+  OCI_SYSOPER - in this mode, the user is authenticated for SYSOPER 
+  access.
+  OCI_PRELIM_AUTH - this mode may only be used with OCI_SYSDBA 
+  or OCI_SYSOPER to authenticate for certain administration tasks.
+  Related Functions
+  OCISessionEnd()
+  
+  
+  
+  
+  
+  
+  OCISessionEnd()
+  Name
+  OCI Terminate user Authentication Context
+  Purpose
+  Terminates a user authentication context created by OCISessionBegin()
+  Syntax
+  sword OCISessionEnd ( OCISvcCtx       *svchp,
+                      OCIError        *errhp,
+                      OCISession      *usrhp,
+                      ub4             mode);
+  
+  Comments
+  The user security context associated with the service context is invalidated 
+  by this call. Storage for the authentication context is not freed. The 
+  transaction specified by the service context is implicitly committed. The 
+  transaction handle, if explicitly allocated, may be freed if not being used.
+  Resources allocated on the server for this user are freed.
+  The authentication handle may be reused in a new call to OCISessionBegin().
+  Parameters
+  svchp (IN/OUT) - the service context handle. There must be a valid server 
+  handle and user authentication handle associated with svchp.
+  errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
+  diagnostic information in the event of an error. 
+  usrhp (IN) - de-authenticate this user. If this parameter is passed as NULL, 
+  the user in the service context handle is de-authenticated.
+  mode (IN) - the only valid mode is OCI_DEFAULT.
+  Example
+  In this example, an authentication context is destroyed.
+  Related Functions
+  OCISessionBegin()
+  
+  
+  
+  
+  OCIStmtExecute()
+  Name
+  OCI EXECute
+  Purpose
+  This call associates an application request with a server.
+  Syntax
+  sword OCIStmtExecute ( OCISvcCtx           *svchp,
+                       OCIStmt             *stmtp,
+                       OCIError            *errhp,
+                       ub4                 iters,
+                       ub4                 rowoff,
+                       CONST OCISnapshot   *snap_in,
+                       OCISnapshot         *snap_out,
+                       ub4                 mode );
+  Comments
+  This function  is used to execute a prepared SQL statement.
+  Using an execute call, the application associates a request with a server. On 
+  success, OCI_SUCCESS is returned.
+  If a SELECT statement is executed, the description of the select list follows 
+  implicitly as a response. This description is buffered on the client side for 
+  describes, fetches and define type conversions. Hence it is optimal to 
+  describe a select list only after an execute. 
+  Also for SELECT statements, some results are available implicitly. Rows will 
+  be received and buffered at the end of the execute. For queries with small row 
+  count, a prefetch causes memory to be released in the server if the end of 
+  fetch is reached, an optimization that may result in memory usage reduction. 
+  Set attribute call has been defined to set the number of rows to be prefetched
+  per result set.
+  For SELECT statements, at the end of the execute, the statement handle 
+  implicitly maintains a reference to the service context on which it is 
+  executed. It is the user's responsibility to maintain the integrity of the 
+  service context. If the attributes of a service context is changed for 
+  executing some operations on this service context, the service context must 
+  be restored to have the same attributes, that a statement was executed with, 
+  prior to a fetch on the statement handle. The implicit reference is maintained 
+  until the statement handle is freed or the fetch is cancelled or an end of 
+  fetch condition is reached.
+  Note: If output variables are defined for a SELECT statement before a 
+  call to OCIStmtExecute(), the number of rows specified by iters will be 
+  fetched directly into the defined output buffers and additional rows 
+  equivalent to the prefetch count will be prefetched. If there are no 
+  additional rows, then the fetch is complete without calling 
+  OCIStmtFetch().
+  The execute call will return errors if the statement has bind data types that 
+  are not supported in an Oracle7 server.
+  Parameters
+  svchp (IN/OUT) - service context handle. 
+  stmtp (IN/OUT) - an statement handle - defines the statement and the 
+  associated data to be executed at the server. It is invalid to pass in a 
+  statement handle that has bind of data types only supported in release 8.0 
+  when srvchp points to an Oracle7 server. 
+  errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
+  diagnostic information in the event of an error. If the statement is being 
+  batched and it is successful, then this handle will contain this particular 
+  statement execution specific errors returned from the server when the batch is 
+  flushed.
+  iters (IN) - the number of times this statement is executed for non-Select 
+  statements. For Select statements, if iters is non-zero, then defines must 
+  have been done for the statement handle. The execution fetches iters rows into 
+  these predefined buffers and prefetches more rows depending upon the prefetch 
+  row count. This function returns an error if iters=0 for non-SELECT 
+  statements.
+  rowoff (IN) - the index from which the data in an array bind is relevant for 
+  this multiple row execution. 
+  snap_in (IN) - this parameter is optional. if supplied, must point to a 
+  snapshot descriptor of type OCI_DTYPE_SNAP.  The contents of this descriptor 
+  must be obtained from the snap_out parameter of a previous call.  The 
+  descriptor is ignored if the SQL is not a SELECT.  This facility allows 
+  multiple service contexts to ORACLE to see the same consistent snapshot of the 
+  database's committed data.  However, uncommitted data in one context is not 
+  visible to another context even using the same snapshot.
+  snap_out (OUT) - this parameter optional. if supplied, must point to a 
+  descriptor of type OCI_DTYPE_SNAP. This descriptor is filled in with an 
+  opaque representation which is the current ORACLE "system change 
+  number" suitable as a snap_in input to a subsequent call to OCIStmtExecute().  
+  This descriptor should not be used any longer than necessary in order to avoid 
+  "snapshot too old" errors. 
+  mode (IN) - The modes are:
+  If OCI_DEFAULT_MODE, the default mode, is selected, the request is 
+  immediately executed. Error handle contains diagnostics on error if any. 
+  OCI_EXACT_FETCH - if the statement is a SQL SELECT, this mode is 
+  only valid if the application has set the prefetch row count prior to this 
+  call. In this mode, the OCI library will get up to the number of rows 
+  specified (i.e., prefetch row count plus iters). If the number of rows 
+  returned by the query is greater than this value, OCI_ERROR will be 
+  returned with ORA-01422 as the implementation specific error in a 
+  diagnostic record. If the number of rows returned by the query is 
+  smaller than the prefetch row count, OCI_SUCCESS_WITH_INFO will 
+  be returned with ORA-01403 as the implementation specific error. The 
+  prefetch buffer size is ignored and the OCI library tries to allocate all the 
+  space required to contain the prefetched rows. The exact fetch semantics 
+  apply to only the top level rows. No more rows can be fetched for this 
+  query at the end of the call. 
+  OCI_KEEP_FETCH_STATE - the result set rows (not yet fetched) of this 
+  statement executed in this transaction will be maintained when the 
+  transaction is detached for migration. By default, a query is cancelled 
+  when a transaction is detached for migration. This mode is the default 
+  mode when connected to a V7 server. 
+  Related Functions
+  OCIStmtPrepare()
+  
+  
+  
+  
+  
+  OCIStmtFetch()
+  Name
+  OCI FetCH
+  Purpose
+  Fetches rows from a query.
+  Syntax
+  sword OCIStmtFetch ( OCIStmt     *stmtp,
+                     OCIError    *errhp, 
+                     ub4         nrows,
+                     ub2         orientation,
+                     ub4         mode);
+  Comments
+  The fetch call is a local call, if prefetched rows suffice. However, this is 
+  transparent to the application. If LOB columns are being read, LOB locators 
+  are fetched for subsequent LOB operations to be performed on these locators. 
+  Prefetching is turned off if LONG columns are involved. 
+  A fetch with nrows set to 0 rows effectively cancels the fetch for this 
+  statement.
+  Parameters
+  stmtp (IN) - a statement (application request) handle.
+  errhp (IN) - an error handle which can be passed to OCIErrorGet() for 
+  diagnostic information in the event of an error.
+  nrows (IN) - number of rows to be fetched from the current position.
+  orientation (IN) - for release 8.0, the only acceptable value is 
+  OCI_FETCH_NEXT, which is also the default value. 
+  mode (IN) - for release 8.0, beta-1, the following mode is defined.
+  OCI_DEFAULT - default mode
+  OCI_EOF_FETCH - indicates that it is the last fetch from the result set. 
+  If nrows is non-zero, setting this mode effectively cancels fetching after 
+  retrieving nrows, otherwise it cancels fetching immediately. 
+  Related Functions
+  OCIAttrGet()
+  
+  OCIStmtFetch2()
+  Name
+  OCI FetCH2
+  Purpose
+  Fetches rows from a query.
+  Syntax
+  sword OCIStmtFetch2 ( OCIStmt     *stmtp,
+                     OCIError    *errhp, 
+                     ub4         nrows,
+                     ub2         orientation,
+                     ub4         scrollOffset,
+                     ub4         mode);
+  Comments
+  The fetch call works similar to the OCIStmtFetch call with the 
+  addition of the fetchOffset parameter. It can be used on any 
+  statement handle, whether it is scrollable or not. For a 
+  non-scrollable statement handle, the only acceptable value 
+  will be OCI_FETCH_NEXT, and the fetchOffset parameter will be 
+  ignored. Applications are encouraged to use this new call. 
+  
+  A fetchOffset with OCI_FETCH_RELATIVE is equivalent to 
+  OCI_FETCH_CURRENT with a value of 0, is equivalent to 
+  OCI_FETCH_NEXT with a value of 1, and equivalent to 
+  OCI_FETCH_PRIOR with a value of -1. Note that the range of 
+  accessible rows is [1,OCI_ATTR_ROW_COUNT] beyond which an 
+  error could be raised if sufficient rows do not exist in 
+  
+  The fetch call is a local call, if prefetched rows suffice. However, this is 
+  transparent to the application. If LOB columns are being read, LOB locators 
+  are fetched for subsequent LOB operations to be performed on these locators. 
+  Prefetching is turned off if LONG columns are involved. 
+  A fetch with nrows set to 0 rows effectively cancels the fetch for this 
+  statement.
+  Parameters
+  stmtp (IN) - a statement (application request) handle.
+  errhp (IN) - an error handle which can be passed to OCIErrorGet() for 
+  diagnostic information in the event of an error.
+  nrows (IN) - number of rows to be fetched from the current position.
+  It defaults to 1 for orientation OCI_FETCH_LAST.
+  orientation (IN) -  The acceptable values are as follows, with 
+  OCI_FETCH_NEXT being the default value.
+  OCI_FETCH_CURRENT gets the current row, 
+  OCI_FETCH_NEXT gets the next row from the current position,
+  OCI_FETCH_FIRST gets the first row in the result set,
+  OCI_FETCH_LAST gets the last row in the result set, 
+  OCI_FETCH_PRIOR gets the previous row from the current row in the result set, 
+  OCI_FETCH_ABSOLUTE will fetch the row number (specified by fetchOffset 
+  parameter) in the result set using absolute positioning,
+  OCI_FETCH_RELATIVE will fetch the row number (specified by fetchOffset 
+  parameter) in the result set using relative positioning.
+  scrollOffset(IN) - offset used with the OCI_FETCH_ABSOLUTE and 
+  OCI_FETCH_RELATIVE orientation parameters only. It specify
+  the new current position for scrollable result set. It is 
+  ignored for non-scrollable result sets. 
+  mode (IN) - for release 8.0, beta-1, the following mode is defined.
+  OCI_DEFAULT - default mode
+  OCI_EOF_FETCH - indicates that it is the last fetch from the result set. 
+  If nrows is non-zero, setting this mode effectively cancels fetching after 
+  retrieving nrows, otherwise it cancels fetching immediately. 
+  Related Functions
+  OCIAttrGet()
+  
+  
+  
+  OCIStmtGetPieceInfo()
+  Name
+  OCI Get Piece Information
+  Purpose
+  Returns piece information for a piecewise operation.
+  Syntax
+  sword OCIStmtGetPieceInfo( CONST OCIStmt  *stmtp,
+                           OCIError       *errhp,
+                           dvoid          **hndlpp,
+                           ub4            *typep,
+                           ub1            *in_outp,
+                           ub4            *iterp, 
+                           ub4            *idxp,
+                           ub1            *piecep );
+  
+  Comments
+  When an execute/fetch call returns OCI_NEED_DATA to get/return a 
+  dynamic bind/define value or piece, OCIStmtGetPieceInfo() returns the 
+  relevant information: bind/define handle, iteration or index number and 
+  which piece.
+  See the section "Runtime Data Allocation and Piecewise Operations" on page 
+  5-16 for more information about using OCIStmtGetPieceInfo().
+  Parameters
+  stmtp (IN) - the statement when executed returned OCI_NEED_DATA. 
+  errhp (OUT) - an error handle which can be passed to OCIErrorGet() for 
+  diagnostic information in the event of an error. 
+  hndlpp (OUT) - returns a pointer to the bind or define handle of the bind or 
+  define whose runtime data is required or is being provided.
+  typep (OUT) - the type of the handle pointed to by hndlpp: OCI_HTYPE_BIND 
+  (for a bind handle) or OCI_HTYPE_DEFINE (for a define handle).
+  in_outp (OUT) - returns OCI_PARAM_IN if the data is required for an IN bind 
+  value. Returns OCI_PARAM_OUT if the data is available as an OUT bind 
+  variable or a define position value.
+  iterp (OUT) - returns the row number of a multiple row operation.
+  idxp (OUT) - the index of an array element of a PL/SQL array bind operation.
+  piecep (OUT) - returns one of the following defined values - 
+  OCI_ONE_PIECE, OCI_FIRST_PIECE, OCI_NEXT_PIECE and 
+  OCI_LAST_PIECE. The default value is always OCI_ONE_PIECE. 
+  Related Functions
+  OCIAttrGet(), OCIAttrGet(), OCIStmtExecute(), OCIStmtFetch(), 
+  OCIStmtSetPieceInfo()
+  
+  
+  
+  
+  OCIStmtPrepare()
+  Name
+  OCI Statement REQuest
+  Purpose
+  This call defines the SQL/PLSQL statement to be executed.
+  Syntax
+  sword OCIStmtPrepare ( OCIStmt      *stmtp,
+                       OCIError     *errhp,
+                       CONST OraText   *stmt, 
+                       ub4          stmt_len,
+                       ub4          language,
+                       ub4          mode);
+  Comments
+  This call is used to prepare a SQL or PL/SQL statement for execution. The 
+  OCIStmtPrepare() call defines an application request. 
+  This is a purely local call. Data values for this statement initialized in 
+  subsequent bind calls will be stored in a bind handle which will hang off this 
+  statement handle.
+  This call does not create an association between this statement handle and any 
+  particular server.
+  See the section "Preparing Statements" on page 2-21 for more information 
+  about using this call.
+  Parameters
+  stmtp (IN) - a statement handle.
+  errhp (IN) - an error handle to retrieve diagnostic information.
+  stmt (IN) - SQL or PL/SQL statement to be executed. Must be a null-terminated 
+  string. The pointer to the OraText of the statement must be available as long 
+  as the statement is executed.
+  stmt_len (IN) - length of the statement. Must not be zero.
+  language (IN) - V7, V8, or native syntax. Possible values are:
+  OCI_V7_SYNTAX - V7 ORACLE parsing syntax
+  OCI_V8_SYNTAX - V8 ORACLE parsing syntax
+  OCI_NTV_SYNTAX - syntax depending upon the version of the server. 
+  mode (IN) - the only defined mode is OCI_DEFAULT for default mode. 
+  Example
+  This example demonstrates the use of OCIStmtPrepare(), as well as the OCI 
+  application initialization calls.
+  Related Functions
+  OCIAttrGet(), OCIStmtExecute()
+  
+  
+  OCIStmtPrepare2()
+  Name
+  OCI Statement REQuest with (a) early binding to svchp and/or
+  (b) stmt caching
+  Purpose
+  This call defines the SQL/PLSQL statement to be executed.
+  Syntax
+  sword OCIStmtPrepare2 ( OCISvcCtx *svchp,
+                       OCIStmt      **stmtp,
+                       OCIError     *errhp,
+                       CONST OraText   *stmt,
+                       ub4          stmt_len,
+                       CONST OraText *key,
+                       ub4          key_len,
+                       ub4          language,
+                       ub4          mode);
+  Comments
+  This call is used to prepare a SQL or PL/SQL statement for execution. The
+  OCIStmtPrepare() call defines an application request.
+  This is a purely local call. Data values for this statement initialized in
+  subsequent bind calls will be stored in a bind handle which will hang off this
+  statement handle.
+  This call creates an association between the statement handle and a service
+  context. It differs from OCIStmtPrepare in that respect.It also supports
+  stmt caching. The stmt will automatically be cached if the authp of the stmt
+  has enabled stmt caching.
+  Parameters
+  svchp (IN) - the service context handle that contains the session that
+               this stmt handle belongs to.
+  stmtp (OUT) - an unallocated stmt handle must be pased in. An allocated
+                and prepared  statement handle will be returned.
+  errhp (IN) - an error handle to retrieve diagnostic information.
+  stmt (IN) - SQL or PL/SQL statement to be executed. Must be a null-
+              terminated string. The pointer to the OraText of the statement 
+              must be available as long as the statement is executed.
+  stmt_len (IN) - length of the statement. Must not be zero.
+  key (IN) - This is only Valid for OCI Stmt Caching. It indicates the
+             key to search with. It thus optimizes the search in the cache.
+  key_len (IN) - the length of the key. This, too, is onlly valid for stmt
+                 caching.
+  language (IN) - V7, V8, or native syntax. Possible values are:
+  OCI_V7_SYNTAX - V7 ORACLE parsing syntax
+  OCI_V8_SYNTAX - V8 ORACLE parsing syntax
+  OCI_NTV_SYNTAX - syntax depending upon the version of the server.
+  mode (IN) - the defined modes are OCI_DEFAULT and OCI_PREP2_CACHE_SEARCHONLY.
+  Example
+  Related Functions
+  OCIStmtExecute(), OCIStmtRelease()
+  
+  
+  OCIStmtRelease()
+  Name
+  OCI Statement Release. This call is used to relesae the stmt that
+  was retreived using OCIStmtPrepare2(). If the stmt is release
+  using this call, OCIHandleFree() must not be called on the stmt
+  handle.
+  Purpose
+  This call releases the statement obtained by OCIStmtPrepare2
+  Syntax
+  sword OCIStmtRelease ( OCIStmt      *stmtp,
+                       OCIError     *errhp,
+                       cONST OraText *key,
+                       ub4          key_len,
+                       ub4          mode);
+  Comments
+  This call is used to release a handle obtained via OCIStmtPrepare2().
+  It also frees the memory associated with the handle.
+  This is a purely local call.
+  Parameters
+  stmtp (IN/OUT) - The statement handle to be released/freed.
+  errhp (IN) - an error handle to retrieve diagnostic information.
+  key (IN) - This is only Valid for OCI Stmt Caching. It indicates the
+             key to tag the stmt with.
+  key_len (IN) - the length of the key. This, too, is only valid for stmt
+                 caching.
+  mode (IN) - the defined modes are OCI_DEFAULT for default mode and
+              OCI_STRLS_CACHE_DELETE (only used for Stmt Caching).
+  Example
+  Related Functions
+  OCIStmtExecute(), OCIStmtPrepare2()
+  
+  
+  OCIStmtSetPieceInfo()
+  Name
+  OCI Set Piece Information
+  Purpose
+  Sets piece information for a piecewise operation.
+  Syntax
+  sword OCIStmtSetPieceInfo ( dvoid             *hndlp,
+                            ub4               type,
+                            OCIError          *errhp,
+                            CONST dvoid       *bufp,
+                            ub4               *alenp, 
+                            ub1               piece,
+                            CONST dvoid       *indp, 
+                            ub2               *rcodep ); 
+  Comments
+  When an execute call returns OCI_NEED_DATA to get a dynamic IN/OUT 
+  bind value or piece, OCIStmtSetPieceInfo() sets the piece information: the 
+  buffer, the length, the indicator and which piece is currently being processed.
+  For more information about using OCIStmtSetPieceInfo() see the section 
+  "Runtime Data Allocation and Piecewise Operations" on page 5-16.
+  Parameters
+  hndlp (IN/OUT) - the bind/define handle.
+  type (IN) - type of the handle. 
+  errhp (OUT) - an error handle which can be passed to OCIErrorGet() for 
+  diagnostic information in the event of an error.
+  bufp (IN/OUT) - bufp is a pointer to a storage containing the data value or 
+  the piece when it is an IN bind variable, otherwise bufp is a pointer to 
+  storage for getting a piece or a value for OUT binds and define variables. For
+  named data types or REFs, a pointer to the object or REF is returned.
+  alenp (IN/OUT) - the length of the piece or the value. 
+  piece (IN) - the piece parameter. The following are valid values: 
+  OCI_ONE_PIECE, OCI_FIRST_PIECE, OCI_NEXT_PIECE, or 
+  OCI_LAST_PIECE. 
+  The default value is OCI_ONE_PIECE. This parameter is used for IN bind 
+  variables only.
+  indp (IN/OUT) - indicator. A pointer to a sb2 value or pointer to an indicator 
+  structure for named data types (SQLT_NTY) and REFs (SQLT_REF), i.e., *indp 
+  is either an sb2 or a dvoid * depending upon the data type.
+  rcodep (IN/OUT) - return code. 
+  Related Functions
+  OCIAttrGet(), OCIAttrGet(), OCIStmtExecute(), OCIStmtFetch(), 
+  OCIStmtGetPieceInfo()
+  
+  
+  OCIFormatInit
+  Name
+  OCIFormat Package Initialize
+  Purpose
+  Initializes the OCIFormat package.
+  Syntax
+  sword OCIFormatInit(dvoid *hndl, OCIError *err);
+  Comments
+  This routine must be called before calling any other OCIFormat routine.
+  Returns OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR
+  Parameters
+  hndl (IN/OUT) - OCI environment or session handle
+  err (IN/OUT) - OCI error handle
+  Related Functions
+  OCIFormatTerm()
+  
+  
+  OCIFormatString
+  Name
+  OCIFormat Package Format String
+  Purpose
+  Writes a text string into the supplied text buffer using the argument
+  list submitted to it and in accordance with the format string given.
+  Syntax
+  sword OCIFormatString(dvoid *hndl, OCIError *err, OraText *buffer,
+                        sbig_ora bufferLength, sbig_ora *returnLength,
+                        CONST OraText *formatString, ...);
+  Comments
+  The first call to this routine must be preceded by a call to the
+  OCIFormatInit routine that initializes the OCIFormat package
+  for use.  When this routine is no longer needed then terminate
+  the OCIFormat package by a call to the OCIFormatTerm routine.
+  Returns OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR
+  Parameters
+  hndl         (IN/OUT) - OCI environment or session handle
+  err          (IN/OUT) - OCI error handle
+  buffer       (OUT)    - text buffer for the string
+  bufferLength (IN)     - length of the text buffer
+  returnLength (OUT)    - length of the formatted string
+  formatString (IN)     - format specification string
+  ...          (IN)     - variable argument list
+  Related Functions
+  
+  
+  OCIFormatTerm 
+  Name
+  OCIFormat Package Terminate
+  Purpose
+  Terminates the OCIFormat package.
+  Syntax
+  sword OCIFormatTerm(dvoid *hndl, OCIError *err);
+  Comments
+  It must be called after the OCIFormat package is no longer being used.
+  Returns OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR
+  Parameters
+  hndl (IN/OUT) - OCI environment or session handle
+  err (IN/OUT) - OCI error handle
+  Related Functions
+  OCIFormatInit()
+  
+  
+  OCIFormatTUb1
+  Name
+  OCIFormat Package ub1 Type
+  Purpose
+  Return the type value for the ub1 type.
+  Syntax
+  sword OCIFormatTUb1(void);
+  Comments
+  None
+  Parameters
+  None
+  Related Functions
+  None
+  
+  
+  OCIFormatTUb2
+  Name
+  OCIFormat Package ub2 Type
+  Purpose
+  Return the type value for the ub2 type.
+  Syntax
+  sword OCIFormatTUb2(void);
+  Comments
+  None
+  Parameters
+  None
+  Related Functions
+  None
+  
+  
+  OCIFormatTUb4
+  Name
+  OCIFormat Package ub4 Type
+  Purpose
+  Return the type value for the ub4 type.
+  Syntax
+  sword OCIFormatTUb4(void);
+  Comments
+  None
+  Parameters
+  None
+  Related Functions
+  None
+  
+  
+  OCIFormatTUword
+  Name
+  OCIFormat Package uword Type
+  Purpose
+  Return the type value for the uword type.
+  Syntax
+  sword OCIFormatTUword(void);
+  Comments
+  None
+  Parameters
+  None
+  Related Functions
+  None
+  
+  
+  OCIFormatTUbig_ora
+  Name
+  OCIFormat Package ubig_ora Type
+  Purpose
+  Return the type value for the ubig_ora type.
+  Syntax
+  sword OCIFormatTUbig_ora(void);
+  Comments
+  None
+  Parameters
+  None
+  Related Functions
+  None
+  
+  
+  OCIFormatTSb1
+  Name
+  OCIFormat Package sb1 Type
+  Purpose
+  Return the type value for the sb1 type.
+  Syntax
+  sword OCIFormatTSb1(void);
+  Comments
+  None
+  Parameters
+  None
+  Related Functions
+  None
+  
+  
+  OCIFormatTSb2
+  Name
+  OCIFormat Package sb2 Type
+  Purpose
+  Return the type value for the sb2 type.
+  Syntax
+  sword OCIFormatTSb2(void);
+  Comments
+  None
+  Parameters
+  None
+  Related Functions
+  None
+  
+  
+  OCIFormatTSb4
+  Name
+  OCIFormat Package sb4 Type
+  Purpose
+  Return the type value for the sb4 type.
+  Syntax
+  sword OCIFormatTSb4(void);
+  Comments
+  None
+  Parameters
+  None
+  Related Functions
+  None
+  
+  
+  OCIFormatTSword
+  Name
+  OCIFormat Package sword Type
+  Purpose
+  Return the type value for the sword type.
+  Syntax
+  sword OCIFormatTSword(void);
+  Comments
+  None
+  Parameters
+  None
+  Related Functions
+  None
+  
+  
+  OCIFormatTSbig_ora
+  Name
+  OCIFormat Package sbig_ora Type
+  Purpose
+  Return the type value for the sbig_ora type.
+  Syntax
+  sword OCIFormatTSbig_ora(void);
+  Comments
+  None
+  Parameters
+  None
+  Related Functions
+  None
+  
+  
+  OCIFormatTEb1
+  Name
+  OCIFormat Package eb1 Type
+  Purpose
+  Return the type value for the eb1 type.
+  Syntax
+  sword OCIFormatTEb1(void);
+  Comments
+  None
+  Parameters
+  None
+  Related Functions
+  None
+  
+  
+  OCIFormatTEb2
+  Name
+  OCIFormat Package eb2 Type
+  Purpose
+  Return the type value for the eb2 type.
+  Syntax
+  sword OCIFormatTEb2(void);
+  Comments
+  None
+  Parameters
+  None
+  Related Functions
+  None
+  
+  
+  OCIFormatTEb4
+  Name
+  OCIFormat Package eb4 Type
+  Purpose
+  Return the type value for the eb4 type.
+  Syntax
+  sword OCIFormatTEb4(void);
+  Comments
+  None
+  Parameters
+  None
+  Related Functions
+  None
+  
+  
+  OCIFormatTEword
+  Name
+  OCIFormat Package eword Type
+  Purpose
+  Return the type value for the eword type.
+  Syntax
+  sword OCIFormatTEword(void);
+  Comments
+  None
+  Parameters
+  None
+  Related Functions
+  None
+  
+  
+  OCIFormatTChar
+  Name
+  OCIFormat Package text Type
+  Purpose
+  Return the type value for the text type.
+  Syntax
+  sword OCIFormatTChar(void);
+  Comments
+  None
+  Parameters
+  None
+  Related Functions
+  None
+  
+  
+  OCIFormatTText
+  Name
+  OCIFormat Package *text Type
+  Purpose
+  Return the type value for the *text type.
+  Syntax
+  sword OCIFormatTText(void);
+  Comments
+  None
+  Parameters
+  None
+  Related Functions
+  None
+  
+  
+  OCIFormatTDouble
+  Name
+  OCIFormat Package double Type
+  Purpose
+  Return the type value for the double type.
+  Syntax
+  sword OCIFormatTDouble(void);
+  Comments
+  None
+  Parameters
+  None
+  Related Functions
+  None
+  
+  
+  OCIFormatDvoid
+  Name
+  OCIFormat Package dvoid Type
+  Purpose
+  Return the type value for the dvoid type.
+  Syntax
+  sword OCIFormatTDvoid(void);
+  Comments
+  None
+  Parameters
+  None
+  Related Functions
+  None
+  
+  
+  OCIFormatTEnd
+  Name
+  OCIFormat Package end Type
+  Purpose
+  Return the list terminator's "type".
+  Syntax
+  sword OCIFormatTEnd(void);
+  Comments
+  None
+  Parameters
+  None
+  Related Functions
+  None
+  
+  
+  OCISvcCtxToLda()
+  Name
+  OCI toggle SerVice context handle to Version 7 Lda_Def
+  Purpose
+  Toggles between a V8 service context handle and a V7 Lda_Def.
+  Syntax
+  sword OCISvcCtxToLda ( OCISvcCtx    *srvhp,
+                       OCIError     *errhp,
+                       Lda_Def      *ldap );
+  Comments
+  Toggles between an Oracle8 service context handle and an Oracle7 Lda_Def.
+  This function can only be called after a service context has been properly 
+  initialized.
+  Once the service context has been translated to an Lda_Def, it can be used in 
+  release 7.x OCI calls (e.g., obindps(), ofen()).
+  Note: If there are multiple service contexts which share the same server 
+  handle, only one can be in V7 mode at any time.
+  The action of this call can be reversed by passing the resulting Lda_Def to 
+  the OCILdaToSvcCtx() function.
+  Parameters
+  svchp (IN/OUT) - the service context handle. 
+  errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
+  diagnostic information in the event of an error. 
+  ldap (IN/OUT) - a Logon Data Area for V7-style OCI calls which is initialized 
+  by this call. 
+  Related Functions
+  OCILdaToSvcCtx()
+  
+  
+  
+  
+  OCITransCommit()
+  Name
+  OCI TX (transaction) CoMmit
+  Purpose
+  Commits the transaction associated with a specified service context.
+  Syntax
+  sword OCITransCommit ( OCISvcCtx    *srvcp,
+                       OCIError     *errhp,
+                       ub4          flags );
+  Comments
+  The transaction currently associated with the service context is committed. If 
+  it is a distributed transaction that the server cannot commit, this call 
+  additionally retrieves the state of the transaction from the database to be 
+  returned to the user in the error handle.
+  If the application has defined multiple transactions, this function operates 
+  on the transaction currently associated with the service context. If the 
+  application is working with only the implicit local transaction created when 
+  database changes are made, that implicit transaction is committed.
+  If the application is running in the object mode, then the modified or updated 
+  objects in the object cache for this transaction are also committed.
+  The flags parameter is used for one-phase commit optimization in distributed 
+  transactions. If the transaction is non-distributed, the flags parameter is 
+  ignored, and OCI_DEFAULT can be passed as its value. OCI applications 
+  managing global transactions should pass a value of 
+  OCI_TRANS_TWOPHASE to the flags parameter for a two-phase commit. The 
+  default is one-phase commit.
+  Under normal circumstances, OCITransCommit() returns with a status 
+  indicating that the transaction has either been committed or rolled back. With 
+  distributed transactions, it is possible that the transaction is now in-doubt 
+  (i.e., neither committed nor aborted). In this case, OCITransCommit() 
+  attempts to retrieve the status of the transaction from the server. 
+  The status is returned.
+  Parameters
+  srvcp (IN) - the service context handle.
+  errhp (IN) - an error handle which can be passed to OCIErrorGet() for 
+  diagnostic information in the event of an error.
+  flags -see the "Comments" section above.
+  Related Functions
+  OCITransRollback()
+  
+  
+  
+  
+  OCITransDetach()
+  Name
+  OCI TX (transaction) DeTach
+  Purpose
+  Detaches a transaction.
+  Syntax
+  sword OCITransDetach ( OCISvcCtx    *srvcp,
+                       OCIError     *errhp,
+                       ub4          flags);
+  Comments
+  Detaches a global transaction from the service context handle. The transaction 
+  currently attached to the service context handle becomes inactive at the end 
+  of this call. The transaction may be resumed later by calling OCITransStart(), 
+  specifying  a flags value of OCI_TRANS_RESUME.
+  When a transaction is detached, the value which was specified in the timeout 
+  parameter of OCITransStart() when the transaction was started is used to 
+  determine the amount of time the branch can remain inactive before being 
+  deleted by the server's PMON process.
+  Note: The transaction can be resumed by a different process than the one 
+  that detached it, provided that the transaction has the same 
+  authorization.
+  Parameters
+  srvcp (IN) - the service context handle. 
+  errhp (IN) - an error handle which can be passed to OCIErrorGet() for 
+  diagnostic information in the event of an error.
+  flags (IN) - you must pass a value of OCI_DEFAULT for this parameter.
+  Related Functions
+  OCITransStart()
+  
+  
+  
+  OCITransForget()
+  Name
+  OCI TX (transaction) ForGeT
+  Purpose
+  Causes the server to forget a heuristically completed global transaction.
+  Syntax
+  sword OCITransForget ( OCISvcCtx     *svchp, 
+                       OCIError      *errhp,
+                       ub4           flags);
+  
+  Comments
+  
+  Forgets a heuristically completed global transaction. The server deletes the 
+  status of the transaction from the system's pending transaction table.
+  The XID of the transaction to be forgotten is set as an attribute of the 
+  transaction handle (OCI_ATTR_XID).
+  Parameters
+  srvcp (IN) - the service context handle - the transaction is rolled back.
+  errhp (IN) - an error handle which can be passed to OCIErrorGet() for 
+  diagnostic information in the event of an error.
+  flags (IN) - you must pass OCI_DEFAULT for this parameter.
+  Related Functions
+  OCITransCommit(), OCITransRollback()
+  
+  
+  OCITransMultiPrepare() 
+  Name
+  OCI Trans(action) Multi-Branch Prepare
+  Purpose
+  Prepares a transaction with multiple branches in a single call.
+  Syntax
+  sword OCITransMultiPrepare ( OCISvcCtx    *svchp,
+                               ub4           numBranches,
+                               OCITrans     **txns,
+                               OCIError     **errhp);
+  
+  Comments
+  
+  Prepares the specified global transaction for commit.
+  This call is valid only for distributed transactions.
+  This call is an advanced performance feature intended for use only in
+  situations where the caller is responsible for preparing all the branches
+  in a transaction. 
+  Parameters
+  srvcp (IN) - the service context handle. 
+  numBranches (IN) - This is the number of branches expected. It is also the
+  array size for the next two parameters.
+  txns (IN) - This is the array of transaction handles for the branches to
+  prepare. They should all have the OCI_ATTR_XID set. The global transaction
+  ID should be the same.
+  errhp (IN) - This is the array of error handles. If OCI_SUCCESS is not
+  returned, then these will indicate which branches received which errors.
+  Related Functions
+  OCITransPrepare()
+  
+  
+  OCITransPrepare()
+  Name
+  OCI TX (transaction) PREpare
+  Purpose
+  Prepares a transaction for commit.
+  Syntax
+  sword OCITransPrepare ( OCISvcCtx    *svchp, 
+                        OCIError     *errhp,
+                        ub4          flags);
+  
+  Comments
+  
+  Prepares the specified global transaction for commit.
+  This call is valid only for distributed transactions.
+  The call returns OCI_SUCCESS_WITH_INFO if the transaction has not made 
+  any changes. The error handle will indicate that the transaction is read-only. 
+  The flag parameter is not currently used. 
+  Parameters
+  srvcp (IN) - the service context handle. 
+  errhp (IN) - an error handle which can be passed to OCIErrorGet() for 
+  diagnostic information in the event of an error.
+  flags (IN) - you must pass OCI_DEFAULT for this parameter.
+  Related Functions
+  OCITransCommit(), OCITransForget()
+  
+  
+  
+  
+  OCITransRollback()
+  Name
+  OCI TX (transaction) RoLlback
+  Purpose
+  Rolls back the current transaction.
+  Syntax
+  sword OCITransRollback ( dvoid        *svchp, 
+                         OCIError     *errhp,
+                         ub4          flags );
+  Comments
+  The current transaction- defined as the set of statements executed since the 
+  last OCITransCommit() or since OCISessionBegin()-is rolled back.
+  If the application is running under object mode then the modified or updated 
+  objects in the object cache for this transaction are also rolled back.
+  An error is returned if an attempt is made to roll back a global transaction 
+  that is not currently active.
+  Parameters
+  svchp (IN) - a service context handle. The transaction currently set in the 
+  service context handle is rolled back.
+  errhp -(IN) - an error handle which can be passed to OCIErrorGet() for 
+  diagnostic information in the event of an error.
+  flags - you must pass a value of OCI_DEFAULT for this parameter.
+  Related Functions
+  OCITransCommit()
+  
+  
+  
+  
+  OCITransStart()
+  Name
+  OCI TX (transaction) STart
+  Purpose
+  Sets the beginning of a transaction.
+  Syntax
+  sword OCITransStart ( OCISvcCtx    *svchp, 
+                      OCIError     *errhp, 
+                      uword        timeout,
+                      ub4          flags);
+  
+  Comments
+  This function sets the beginning of a global or serializable transaction. The 
+  transaction context currently associated with the service context handle is 
+  initialized at the end of the call if the flags parameter specifies that a new 
+  transaction should be started.
+  The XID of the transaction is set as an attribute of the transaction handle 
+  (OCI_ATTR_XID)
+  Parameters
+  svchp (IN/OUT) - the service context handle. The transaction context in the 
+  service context handle is initialized at the end of the call if the flag 
+  specified a new transaction to be started.
+  errhp (IN/OUT) - The OCI error handle. If there is an error, it is recorded in 
+  err and this function returns OCI_ERROR. Diagnostic information can be 
+  obtained by calling OCIErrorGet().
+  timeout (IN) - the time, in seconds, to wait for a transaction to become 
+  available for resumption when OCI_TRANS_RESUME is specified. When 
+  OCI_TRANS_NEW is specified, this value is stored and may be used later by 
+  OCITransDetach().
+  flags (IN) - specifies whether a new transaction is being started or an 
+  existing transaction is being resumed. Also specifies serializiability or 
+  read-only status. More than a single value can be specified. By default, 
+  a read/write transaction is started. The flag values are:
+  OCI_TRANS_NEW - starts a new transaction branch. By default starts a 
+  tightly coupled and migratable branch.
+  OCI_TRANS_TIGHT - explicitly specifies a tightly coupled branch
+  OCI_TRANS_LOOSE - specifies a loosely coupled branch
+  OCI_TRANS_RESUME - resumes an existing transaction branch. 
+  OCI_TRANS_READONLY - start a readonly transaction
+  OCI_TRANS_SERIALIZABLE - start a serializable transaction
+  Related Functions
+  OCITransDetach()
+  
+  
+  
+  
+  
+  ***************************************************************************** }
+  {-----------------------Dynamic Callback Function Pointers------------------ }
+
+  type
+
+     OCICallbackInBind = function (ictxp:Pdvoid; bindp:POCIBind; iter:ub4; index:ub4; bufpp:PPdvoid;
+                  alenp:Pub4; piecep:Pub1; indp:PPdvoid):sb4;cdecl;
+
+     OCICallbackOutBind = function (octxp:Pdvoid; bindp:POCIBind; iter:ub4; index:ub4; bufpp:PPdvoid;
+                  alenp:PPub4; piecep:Pub1; indp:PPdvoid; rcodep:PPub2):sb4;cdecl;
+
+     OCICallbackDefine = function (octxp:Pdvoid; defnp:POCIDefine; iter:ub4; bufpp:PPdvoid; alenp:PPub4;
+                  piecep:Pub1; indp:PPdvoid; rcodep:PPub2):sb4;cdecl;
+
+//     OCIUserCallback = function (ctxp:Pdvoid; hndlp:Pdvoid; _type:ub4; fcode:ub4; when:ub4;
+//                  returnCode:sword; errnop:Psb4; arglist:va_list):sword;cdecl;
+
+     OCIEnvCallbackType = function (env:POCIEnv; mode:ub4; xtramem_sz:size_t; usrmemp:Pdvoid; ucbDesc:POCIUcb):sword;cdecl;
+(* Const before type ignored *)
+
+     OCICallbackLobRead = function (ctxp:Pdvoid; bufp:Pdvoid; len:ub4; piece:ub1):sb4;cdecl;
+
+     OCICallbackLobWrite = function (ctxp:Pdvoid; bufp:Pdvoid; lenp:Pub4; piece:Pub1):sb4;cdecl;
+{$ifdef ORAXB8_DEFINED}
+(* Const before type ignored *)
+
+  type
+
+     OCICallbackLobRead2 = function (ctxp:Pdvoid; bufp:Pdvoid; len:oraub8; piece:ub1; changed_bufpp:PPdvoid;
+                  changed_lenp:Poraub8):sb4;cdecl;
+
+     OCICallbackLobWrite2 = function (ctxp:Pdvoid; bufp:Pdvoid; lenp:Poraub8; piece:Pub1; changed_bufpp:PPdvoid;
+                  changed_lenp:Poraub8):sb4;cdecl;
+(* Const before type ignored *)
+
+     OCICallbackLobArrayRead = function (ctxp:Pdvoid; array_iter:ub4; bufp:Pdvoid; len:oraub8; piece:ub1; 
+                  changed_bufpp:PPdvoid; changed_lenp:Poraub8):sb4;cdecl;
+
+     OCICallbackLobArrayWrite = function (ctxp:Pdvoid; array_iter:ub4; bufp:Pdvoid; lenp:Poraub8; piece:Pub1; 
+                  changed_bufpp:PPdvoid; changed_lenp:Poraub8):sb4;cdecl;
+{$endif}
+
+  type
+
+     OCICallbackAQEnq = function (ctxp:Pdvoid; payload:PPdvoid; payload_ind:PPdvoid):sb4;cdecl;
+
+     OCICallbackAQDeq = function (ctxp:Pdvoid; payload:PPdvoid; payload_ind:PPdvoid):sb4;cdecl;
+  {--------------------------Failover Callback Structure --------------------- }
+
+     OCICallbackFailover = function (svcctx:Pdvoid; envctx:Pdvoid; fo_ctx:Pdvoid; fo_type:ub4; fo_event:ub4):sb4;cdecl;
+
+     POCIFocbkStruct = ^OCIFocbkStruct;
+     OCIFocbkStruct = record
+          callback_function : OCICallbackFailover;
+          fo_ctx : Pdvoid;
+       end;
+  {--------------------------HA Callback Structure --------------------- }
+
+     OCIEventCallback = procedure (evtctx:Pdvoid; eventhp:POCIEvent);cdecl;
+  {****************************************************************************
+                           ACTUAL PROTOTYPE DECLARATIONS
+  ***************************************************************************** }
+  type
+    tmalocfp = function (ctxp:Pdvoid; size:size_t):Pdvoid;
+    tralocfp = function (ctxp:Pdvoid; memptr:Pdvoid;newsize:size_t):Pdvoid;
+    tmfreefp = procedure (ctxp:Pdvoid; memptr:Pdvoid);
+
+{$IFNDEF LinkDynamically}
+
+  function OCIInitialize(mode:ub4; ctxp:Pdvoid; malocfp:tmalocfp; ralocfp:tralocfp;mfreefp:tmfreefp ):sword;cdecl;external ocilib name 'OCIInitialise';
+
+  function OCITerminate(mode:ub4):sword;cdecl;external ocilib name 'OCITerminate';
+
+  function OCIEnvCreate(var envp:POCIEnv; mode:ub4; ctxp:Pdvoid; malocfp:tmalocfp; ralocfp:tralocfp;
+             mfreefp:tmfreefp; xtramem_sz:size_t; usrmempp:PPdvoid):sword;cdecl;external ocilib name 'OCIEnvCreate';
+
+  function OCIEnvNlsCreate(var envp:POCIEnv; mode:ub4; ctxp:Pdvoid; malocfp:tmalocfp; ralocfp:tralocfp;
+             mfreefp:tmfreefp; xtramem_sz:size_t; usrmempp:PPdvoid; charset:ub2; ncharset:ub2):sword;cdecl;external ocilib name 'OCIEnvNlsCreate';
+
+  function OCIFEnvCreate(var envp:POCIEnv; mode:ub4; ctxp:Pdvoid; malocfp:tmalocfp; ralocfp:tralocfp;
+             mfreefp:tmfreefp; xtramem_sz:size_t; usrmempp:PPdvoid; fupg:Pdvoid):sword;cdecl;external ocilib name 'OCIFEnvCreate';
+
+  function OCIHandleAlloc(parenth:Pdvoid; var hndlpp:Pdvoid; _type:ub4; xtramem_sz:size_t; usrmempp:PPdvoid):sword;cdecl;external ocilib name 'OCIHandleAlloc';
+
+  function OCIHandleFree(hndlp:Pdvoid; _type:ub4):sword;cdecl;external ocilib name 'OCIHandleFree';
+
+  function OCIDescriptorAlloc(parenth:Pdvoid; descpp:PPdvoid; _type:ub4; xtramem_sz:size_t; usrmempp:PPdvoid):sword;cdecl;external ocilib name 'OCIDescriptorAlloc';
+
+  function OCIDescriptorFree(descp:Pdvoid; _type:ub4):sword;cdecl;external ocilib name 'OCIDescriptorFree';
+
+  function OCIEnvInit(var envp:POCIEnv; mode:ub4; xtramem_sz:size_t; usrmempp:PPdvoid):sword;cdecl;external ocilib name 'OCIEnvInit';
+
+  function OCIServerAttach(srvhp:POCIServer; errhp:POCIError; dblink:POraText; dblink_len:sb4; mode:ub4):sword;cdecl;external ocilib name 'OCIServerAttach';
+
+  function OCIServerDetach(srvhp:POCIServer; errhp:POCIError; mode:ub4):sword;cdecl;external ocilib name 'OCIServerDetach';
+
+  function OCISessionBegin(svchp:POCISvcCtx; errhp:POCIError; usrhp:POCISession; credt:ub4; mode:ub4):sword;cdecl;external ocilib name 'OCISessionBegin';
+
+  function OCISessionEnd(svchp:POCISvcCtx; errhp:POCIError; usrhp:POCISession; mode:ub4):sword;cdecl;external ocilib name 'OCISessionEnd';
+
+  function OCILogon(envhp:POCIEnv; errhp:POCIError;var svchp:POCISvcCtx; username:POraText; uname_len:ub4;
+             password:POraText; passwd_len:ub4; dbname:POraText; dbname_len:ub4):sword;cdecl;external ocilib name 'OCILogon';
+
+  function OCILogon2(envhp:POCIEnv; errhp:POCIError; var svchp:POCISvcCtx; username:POraText; uname_len:ub4;
+             password:POraText; passwd_len:ub4; dbname:POraText; dbname_len:ub4; mode:ub4):sword;cdecl;external ocilib name 'OCILogon2';
+
+  function OCILogoff(svchp:POCISvcCtx; errhp:POCIError):sword;cdecl;external ocilib name 'OCILogoff';
+
+  function OCIPasswordChange(svchp:POCISvcCtx; errhp:POCIError; user_name:POraText; usernm_len:ub4; opasswd:POraText;
+             opasswd_len:ub4; npasswd:POraText; npasswd_len:ub4; mode:ub4):sword;cdecl;external ocilib name 'OCIPasswordChange';
+
+  function OCIStmtPrepare(stmtp:POCIStmt; errhp:POCIError; stmt:POraText; stmt_len:ub4; language:ub4;
+             mode:ub4):sword;cdecl;external ocilib name 'OCIStmtPrepare';
+
+  function OCIStmtPrepare2(svchp:POCISvcCtx; var stmtp:POCIStmt; errhp:POCIError; stmt:POraText; stmt_len:ub4;
+             key:POraText; key_len:ub4; language:ub4; mode:ub4):sword;cdecl;external ocilib name 'OCIStmtPrepare2';
+
+  function OCIStmtRelease(stmtp:POCIStmt; errhp:POCIError; key:POraText; key_len:ub4; mode:ub4):sword;cdecl;external ocilib name 'OCIStmtRelease';
+
+  function OCIBindByPos(stmtp:POCIStmt; var bindp:POCIBind; errhp:POCIError; position:ub4; valuep:Pdvoid;
+             value_sz:sb4; dty:ub2; indp:Pdvoid; alenp:Pub2; rcodep:Pub2; 
+             maxarr_len:ub4; curelep:Pub4; mode:ub4):sword;cdecl;external ocilib name 'OCIBindByPos';
+
+  function OCIBindByName(stmtp:POCIStmt; var bindp: POCIBind; errhp:POCIError; placeholder:POraText; placeh_len:sb4;
+             valuep:Pdvoid; value_sz:sb4; dty:ub2; indp:Pdvoid; alenp:Pub2; 
+             rcodep:Pub2; maxarr_len:ub4; curelep:Pub4; mode:ub4):sword;cdecl;external ocilib name 'OCIBindByName';
+
+  function OCIBindObject(bindp:POCIBind; errhp:POCIError; _type:POCIType; pgvpp:PPdvoid; pvszsp:Pub4;
+             indpp:PPdvoid; indszp:Pub4):sword;cdecl;external ocilib name 'OCIBindObject';
+
+  function OCIBindDynamic(bindp:POCIBind; errhp:POCIError; ictxp:Pdvoid; icbfp:OCICallbackInBind; octxp:Pdvoid; 
+             ocbfp:OCICallbackOutBind):sword;cdecl;external ocilib name 'OCIBindDynamic';
+
+  function OCIBindArrayOfStruct(bindp:POCIBind; errhp:POCIError; pvskip:ub4; indskip:ub4; alskip:ub4; 
+             rcskip:ub4):sword;cdecl;external ocilib name 'OCIBindArrayOfStruct';
+
+  function OCIStmtGetPieceInfo(stmtp:POCIStmt; errhp:POCIError; hndlpp:PPdvoid; typep:Pub4; in_outp:Pub1; 
+             iterp:Pub4; idxp:Pub4; piecep:Pub1):sword;cdecl;external ocilib name 'OCIStmtGetPieceInfo';
+
+  function OCIStmtSetPieceInfo(hndlp:Pdvoid; _type:ub4; errhp:POCIError; bufp:Pdvoid; alenp:Pub4;
+             piece:ub1; indp:Pdvoid; rcodep:Pub2):sword;cdecl;external ocilib name 'OCIStmtSetPieceInfo';
+
+  function OCIStmtExecute(svchp:POCISvcCtx; stmtp:POCIStmt; errhp:POCIError; iters:ub4; rowoff:ub4;
+             snap_in:POCISnapshot; snap_out:POCISnapshot; mode:ub4):sword;cdecl;external ocilib name 'OCIStmtExecute';
+
+  function OCIDefineByPos(stmtp:POCIStmt; var defnp:POCIDefine; errhp:POCIError; position:ub4; valuep:Pdvoid;
+             value_sz:sb4; dty:ub2; indp:Pdvoid; rlenp:Pub2; rcodep:Pub2; 
+             mode:ub4):sword;cdecl;external ocilib name 'OCIDefineByPos';
+
+  function OCIDefineObject(defnp:POCIDefine; errhp:POCIError; _type:POCIType; pgvpp:PPdvoid; pvszsp:Pub4;
+             indpp:PPdvoid; indszp:Pub4):sword;cdecl;external ocilib name 'OCIDefineObject';
+
+  function OCIDefineDynamic(defnp:POCIDefine; errhp:POCIError; octxp:Pdvoid; ocbfp:OCICallbackDefine):sword;cdecl;external ocilib name 'OCIDefineDynamic';
+
+  function OCIRowidToChar(rowidDesc:POCIRowid; outbfp:POraText; outbflp:Pub2; errhp:POCIError):sword;cdecl;external ocilib name 'OCIRowidToChar';
+
+  function OCIDefineArrayOfStruct(defnp:POCIDefine; errhp:POCIError; pvskip:ub4; indskip:ub4; rlskip:ub4; 
+             rcskip:ub4):sword;cdecl;external ocilib name 'OCIDefineArrayOfStruct';
+
+  function OCIStmtFetch(stmtp:POCIStmt; errhp:POCIError; nrows:ub4; orientation:ub2; mode:ub4):sword;cdecl;external ocilib name 'OCIStmtFetch';
+
+  function OCIStmtFetch2(stmtp:POCIStmt; errhp:POCIError; nrows:ub4; orientation:ub2; scrollOffset:sb4; 
+             mode:ub4):sword;cdecl;external ocilib name 'OCIStmtFetch2';
+
+  function OCIStmtGetBindInfo(stmtp:POCIStmt; errhp:POCIError; size:ub4; startloc:ub4; found:Psb4; 
+             bvnp:array of POraText; bvnl:array of ub1; invp:array of POraText; inpl:array of ub1; dupl:array of ub1; 
+             var hndl:POCIBind):sword;cdecl;external ocilib name 'OCIStmtGetBindInfo';
+
+  function OCIDescribeAny(svchp:POCISvcCtx; errhp:POCIError; objptr:Pdvoid; objnm_len:ub4; objptr_typ:ub1; 
+             info_level:ub1; objtyp:ub1; dschp:POCIDescribe):sword;cdecl;external ocilib name 'OCIDescribeAny';
+
+  function OCIParamGet(hndlp:Pdvoid; htype:ub4; errhp:POCIError; var parmdpp:Pdvoid; pos:ub4):sword;cdecl;external ocilib name 'OCIParamGet';
+
+  function OCIParamSet(hdlp:Pdvoid; htyp:ub4; errhp:POCIError; dscp:Pdvoid; dtyp:ub4;
+             pos:ub4):sword;cdecl;external ocilib name 'OCIParamSet';
+
+  function OCITransStart(svchp:POCISvcCtx; errhp:POCIError; timeout:uword; flags:ub4):sword;cdecl;external ocilib name 'OCITransStart';
+
+  function OCITransDetach(svchp:POCISvcCtx; errhp:POCIError; flags:ub4):sword;cdecl;external ocilib name 'OCITransDetach';
+
+  function OCITransCommit(svchp:POCISvcCtx; errhp:POCIError; flags:ub4):sword;cdecl;external ocilib name 'OCITransCommit';
+
+  function OCITransRollback(svchp:POCISvcCtx; errhp:POCIError; flags:ub4):sword;cdecl;external ocilib name 'OCITransRollback';
+
+  function OCITransPrepare(svchp:POCISvcCtx; errhp:POCIError; flags:ub4):sword;cdecl;external ocilib name 'OCITransPrepare';
+
+  function OCITransMultiPrepare(svchp:POCISvcCtx; numBranches:ub4; var txns:POCITrans; var errhp:POCIError):sword;cdecl;external ocilib name 'OCITransMultiPrepare';
+
+  function OCITransForget(svchp:POCISvcCtx; errhp:POCIError; flags:ub4):sword;cdecl;external ocilib name 'OCITransForget';
+
+  function OCIErrorGet(hndlp:Pdvoid; recordno:ub4; sqlstate:POraText; var errcodep:sb4; bufp:POraText;
+             bufsiz:ub4; _type:ub4):sword;cdecl;external ocilib name 'OCIErrorGet';
+
+  function OCILobAppend(svchp:POCISvcCtx; errhp:POCIError; dst_locp:POCILobLocator; src_locp:POCILobLocator):sword;cdecl;external ocilib name 'OCILobAppend';
+
+  function OCILobAssign(envhp:POCIEnv; errhp:POCIError; src_locp:POCILobLocator; var dst_locpp:POCILobLocator):sword;cdecl;external ocilib name 'OCILobAssign';
+
+  function OCILobCharSetForm(envhp:POCIEnv; errhp:POCIError; locp:POCILobLocator; csfrm:Pub1):sword;cdecl;external ocilib name 'OCILobCharSetForm';
+
+  function OCILobCharSetId(envhp:POCIEnv; errhp:POCIError; locp:POCILobLocator; csid:Pub2):sword;cdecl;external ocilib name 'OCILobCharSetId';
+
+  function OCILobCopy(svchp:POCISvcCtx; errhp:POCIError; dst_locp:POCILobLocator; src_locp:POCILobLocator; amount:ub4; 
+             dst_offset:ub4; src_offset:ub4):sword;cdecl;external ocilib name 'OCILobCopy';
+
+  function OCILobCreateTemporary(svchp:POCISvcCtx; errhp:POCIError; locp:POCILobLocator; csid:ub2; csfrm:ub1; 
+             lobtype:ub1; cache:boolean; duration:OCIDuration):sword;cdecl;external ocilib name 'OCILobCreateTemporary';
+
+  function OCILobClose(svchp:POCISvcCtx; errhp:POCIError; locp:POCILobLocator):sword;cdecl;external ocilib name 'OCILobClose';
+
+  function OCILobDisableBuffering(svchp:POCISvcCtx; errhp:POCIError; locp:POCILobLocator):sword;cdecl;external ocilib name 'OCILobDisableBuffering';
+
+  function OCILobEnableBuffering(svchp:POCISvcCtx; errhp:POCIError; locp:POCILobLocator):sword;cdecl;external ocilib name 'OCILobEnableBuffering';
+
+  function OCILobErase(svchp:POCISvcCtx; errhp:POCIError; locp:POCILobLocator; amount:Pub4; offset:ub4):sword;cdecl;external ocilib name 'OCILobErase';
+
+  function OCILobFileClose(svchp:POCISvcCtx; errhp:POCIError; filep:POCILobLocator):sword;cdecl;external ocilib name 'OCILobFileClose';
+
+  function OCILobFileCloseAll(svchp:POCISvcCtx; errhp:POCIError):sword;cdecl;external ocilib name 'OCILobFileCloseAll';
+
+  function OCILobFileExists(svchp:POCISvcCtx; errhp:POCIError; filep:POCILobLocator; flag:Pboolean):sword;cdecl;external ocilib name 'OCILobFileExists';
+
+  function OCILobFileGetName(envhp:POCIEnv; errhp:POCIError; filep:POCILobLocator; dir_alias:POraText; d_length:Pub2;
+             filename:POraText; f_length:Pub2):sword;cdecl;external ocilib name 'OCILobFileGetName';
+
+  function OCILobFileIsOpen(svchp:POCISvcCtx; errhp:POCIError; filep:POCILobLocator; flag:Pboolean):sword;cdecl;external ocilib name 'OCILobFileIsOpen';
+
+  function OCILobFileOpen(svchp:POCISvcCtx; errhp:POCIError; filep:POCILobLocator; mode:ub1):sword;cdecl;external ocilib name 'OCILobFileOpen';
+
+  function OCILobFileSetName(envhp:POCIEnv; errhp:POCIError; var filepp:POCILobLocator; dir_alias:POraText; d_length:ub2;
+             filename:POraText; f_length:ub2):sword;cdecl;external ocilib name 'OCILobFileSetName';
+
+  function OCILobFlushBuffer(svchp:POCISvcCtx; errhp:POCIError; locp:POCILobLocator; flag:ub4):sword;cdecl;external ocilib name 'OCILobFlushBuffer';
+
+  function OCILobFreeTemporary(svchp:POCISvcCtx; errhp:POCIError; locp:POCILobLocator):sword;cdecl;external ocilib name 'OCILobFreeTemporary';
+
+  function OCILobGetChunkSize(svchp:POCISvcCtx; errhp:POCIError; locp:POCILobLocator; chunksizep:Pub4):sword;cdecl;external ocilib name 'OCILobGetChunkSize';
+
+  function OCILobGetLength(svchp:POCISvcCtx; errhp:POCIError; locp:POCILobLocator; lenp:Pub4):sword;cdecl;external ocilib name 'OCILobGetLength';
+
+  function OCILobIsEqual(envhp:POCIEnv; x:POCILobLocator; y:POCILobLocator; is_equal:Pboolean):sword;cdecl;external ocilib name 'OCILobIsEqual';
+
+  function OCILobIsOpen(svchp:POCISvcCtx; errhp:POCIError; locp:POCILobLocator; flag:Pboolean):sword;cdecl;external ocilib name 'OCILobIsOpen';
+
+  function OCILobIsTemporary(envp:POCIEnv; errhp:POCIError; locp:POCILobLocator; is_temporary:Pboolean):sword;cdecl;external ocilib name 'OCILobIsTemporary';
+
+  function OCILobLoadFromFile(svchp:POCISvcCtx; errhp:POCIError; dst_locp:POCILobLocator; src_filep:POCILobLocator; amount:ub4; 
+             dst_offset:ub4; src_offset:ub4):sword;cdecl;external ocilib name 'OCILobLoadFromFile';
+
+  function OCILobLocatorAssign(svchp:POCISvcCtx; errhp:POCIError; src_locp:POCILobLocator; var dst_locpp:POCILobLocator):sword;cdecl;external ocilib name 'OCILobLocatorAssign';
+
+  function OCILobLocatorIsInit(envhp:POCIEnv; errhp:POCIError; locp:POCILobLocator; is_initialized:Pboolean):sword;cdecl;external ocilib name 'OCILobLocatorIsInit';
+
+  function OCILobOpen(svchp:POCISvcCtx; errhp:POCIError; locp:POCILobLocator; mode:ub1):sword;cdecl;external ocilib name 'OCILobOpen';
+
+  function OCILobRead(svchp:POCISvcCtx; errhp:POCIError; locp:POCILobLocator; amtp:Pub4; offset:ub4; 
+             bufp:Pdvoid; bufl:ub4; ctxp:Pdvoid; cbfp:OCICallbackLobRead; csid:ub2; 
+             csfrm:ub1):sword;cdecl;external ocilib name 'OCILobRead';
+
+  function OCILobTrim(svchp:POCISvcCtx; errhp:POCIError; locp:POCILobLocator; newlen:ub4):sword;cdecl;external ocilib name 'OCILobTrim';
+
+  function OCILobWrite(svchp:POCISvcCtx; errhp:POCIError; locp:POCILobLocator; amtp:Pub4; offset:ub4; 
+             bufp:Pdvoid; buflen:ub4; piece:ub1; ctxp:Pdvoid; cbfp:OCICallbackLobWrite; 
+             csid:ub2; csfrm:ub1):sword;cdecl;external ocilib name 'OCILobWrite';
+
+  function OCILobWriteAppend(svchp:POCISvcCtx; errhp:POCIError; lobp:POCILobLocator; amtp:Pub4; bufp:Pdvoid; 
+             bufl:ub4; piece:ub1; ctxp:Pdvoid; cbfp:OCICallbackLobWrite; csid:ub2; 
+             csfrm:ub1):sword;cdecl;external ocilib name 'OCILobWriteAppend';
+
+  function OCIBreak(hndlp:Pdvoid; errhp:POCIError):sword;cdecl;external ocilib name 'OCIBreak';
+
+  function OCIReset(hndlp:Pdvoid; errhp:POCIError):sword;cdecl;external ocilib name 'OCIReset';
+
+  function OCIServerVersion(hndlp:Pdvoid; errhp:POCIError; bufp:POraText; bufsz:ub4; hndltype:ub1):sword;cdecl;external ocilib name 'OCIServerVersion';
+
+  function OCIServerRelease(hndlp:Pdvoid; errhp:POCIError; bufp:POraText; bufsz:ub4; hndltype:ub1; 
+             version:Pub4):sword;cdecl;external ocilib name 'OCIServerRelease';
+
+  function OCIAttrGet(trgthndlp:Pdvoid; trghndltyp:ub4; attributep:Pdvoid; sizep:Pub4; attrtype:ub4;
+             errhp:POCIError):sword;cdecl;external ocilib name 'OCIAttrGet';
+
+  function OCIAttrSet(trgthndlp:Pdvoid; trghndltyp:ub4; attributep:Pdvoid; size:ub4; attrtype:ub4; 
+             errhp:POCIError):sword;cdecl;external ocilib name 'OCIAttrSet';
+
+  function OCISvcCtxToLda(svchp:POCISvcCtx; errhp:POCIError; ldap:PLda_Def):sword;cdecl;external ocilib name 'OCISvcCtxToLda';
+
+  function OCILdaToSvcCtx(var svchpp:POCISvcCtx; errhp:POCIError; ldap:PLda_Def):sword;cdecl;external ocilib name 'OCILdaToSvcCtx';
+
+  function OCIResultSetToStmt(rsetdp:POCIResult; errhp:POCIError):sword;cdecl;external ocilib name 'OCIResultSetToStmt';
+
+  function OCIFileClose(hndl:Pdvoid; err:POCIError; filep:POCIFileObject):sword;cdecl;external ocilib name 'OCIFileClose';
+
+//  function OCIUserCallbackRegister(hndlp:Pdvoid; _type:ub4; ehndlp:Pdvoid; callback:OCIUserCallback; ctxp:Pdvoid;
+//             fcode:ub4; when:ub4; ucbDesc:POCIUcb):sword;cdecl;external ocilib name 'OCIUserCallbackRegister';
+
+//  function OCIUserCallbackGet(hndlp:Pdvoid; _type:ub4; ehndlp:Pdvoid; fcode:ub4; when:ub4;
+//             callbackp:POCIUserCallback; ctxpp:PPdvoid; ucbDesc:POCIUcb):sword;cdecl;external ocilib name 'OCIUserCallbackGet';
+
+  function OCISharedLibInit(metaCtx:Pdvoid; libCtx:Pdvoid; argfmt:ub4; argc:sword; argv:PPdvoid; 
+             envCallback:OCIEnvCallbackType):sword;cdecl;external ocilib name 'OCISharedLibInit';
+
+  function OCIFileExists(hndl:Pdvoid; err:POCIError; filename:POraText; path:POraText; flag:Pub1):sword;cdecl;external ocilib name 'OCIFileExists';
+
+  function OCIFileFlush(hndl:Pdvoid; err:POCIError; filep:POCIFileObject):sword;cdecl;external ocilib name 'OCIFileFlush';
+
+  function OCIFileGetLength(hndl:Pdvoid; err:POCIError; filename:POraText; path:POraText; lenp:Pubig_ora):sword;cdecl;external ocilib name 'OCIFileGetLength';
+
+  function OCIFileInit(hndl:Pdvoid; err:POCIError):sword;cdecl;external ocilib name 'OCIFileInit';
+
+  function OCIFileOpen(hndl:Pdvoid; err:POCIError; var filep:POCIFileObject; filename:POraText; path:POraText;
+             mode:ub4; create:ub4; _type:ub4):sword;cdecl;external ocilib name 'OCIFileOpen';
+
+  function OCIFileRead(hndl:Pdvoid; err:POCIError; filep:POCIFileObject; bufp:Pdvoid; bufl:ub4; 
+             bytesread:Pub4):sword;cdecl;external ocilib name 'OCIFileRead';
+
+  function OCIFileSeek(hndl:Pdvoid; err:POCIError; filep:POCIFileObject; origin:uword; offset:ubig_ora; 
+             dir:sb1):sword;cdecl;external ocilib name 'OCIFileSeek';
+
+  function OCIFileTerm(hndl:Pdvoid; err:POCIError):sword;cdecl;external ocilib name 'OCIFileTerm';
+
+  function OCIFileWrite(hndl:Pdvoid; err:POCIError; filep:POCIFileObject; bufp:Pdvoid; buflen:ub4; 
+             byteswritten:Pub4):sword;cdecl;external ocilib name 'OCIFileWrite';
+
+{$ifdef ORAXB8_DEFINED}
+
+  function OCILobCopy2(svchp:POCISvcCtx; errhp:POCIError; dst_locp:POCILobLocator; src_locp:POCILobLocator; amount:oraub8; 
+             dst_offset:oraub8; src_offset:oraub8):sword;cdecl;external ocilib name 'OCILobCopy2';
+
+  function OCILobErase2(svchp:POCISvcCtx; errhp:POCIError; locp:POCILobLocator; amount:Poraub8; offset:oraub8):sword;cdecl;external ocilib name 'OCILobErase2';
+
+  function OCILobGetLength2(svchp:POCISvcCtx; errhp:POCIError; locp:POCILobLocator; lenp:Poraub8):sword;cdecl;external ocilib name 'OCILobGetLength2';
+
+  function OCILobLoadFromFile2(svchp:POCISvcCtx; errhp:POCIError; dst_locp:POCILobLocator; src_filep:POCILobLocator; amount:oraub8; 
+             dst_offset:oraub8; src_offset:oraub8):sword;cdecl;external ocilib name 'OCILobLoadFromFile2';
+
+  function OCILobRead2(svchp:POCISvcCtx; errhp:POCIError; locp:POCILobLocator; byte_amtp:Poraub8; char_amtp:Poraub8; 
+             offset:oraub8; bufp:Pdvoid; bufl:oraub8; piece:ub1; ctxp:Pdvoid; 
+             cbfp:OCICallbackLobRead2; csid:ub2; csfrm:ub1):sword;cdecl;external ocilib name 'OCILobRead2';
+
+  function OCILobArrayRead(svchp:POCISvcCtx; errhp:POCIError; array_iter:Pub4; lobp_arr:PPOCILobLocator; byte_amt_arr:Poraub8; 
+             char_amt_arr:Poraub8; offset_arr:Poraub8; bufp_arr:PPdvoid; bufl_arr:Poraub8; piece:ub1; 
+             ctxp:Pdvoid; cbfp:OCICallbackLobArrayRead; csid:ub2; csfrm:ub1):sword;cdecl;external ocilib name 'OCILobArrayRead';
+
+  function OCILobTrim2(svchp:POCISvcCtx; errhp:POCIError; locp:POCILobLocator; newlen:oraub8):sword;cdecl;external ocilib name 'OCILobTrim2';
+
+  function OCILobWrite2(svchp:POCISvcCtx; errhp:POCIError; locp:POCILobLocator; byte_amtp:Poraub8; char_amtp:Poraub8; 
+             offset:oraub8; bufp:Pdvoid; buflen:oraub8; piece:ub1; ctxp:Pdvoid; 
+             cbfp:OCICallbackLobWrite2; csid:ub2; csfrm:ub1):sword;cdecl;external ocilib name 'OCILobWrite2';
+
+  function OCILobArrayWrite(svchp:POCISvcCtx; errhp:POCIError; array_iter:Pub4; lobp_arr:PPOCILobLocator; byte_amt_arr:Poraub8; 
+             char_amt_arr:Poraub8; offset_arr:Poraub8; bufp_arr:PPdvoid; bufl_arr:Poraub8; piece:ub1; 
+             ctxp:Pdvoid; cbfp:OCICallbackLobArrayWrite; csid:ub2; csfrm:ub1):sword;cdecl;external ocilib name 'OCILobArrayWrite';
+
+  function OCILobWriteAppend2(svchp:POCISvcCtx; errhp:POCIError; lobp:POCILobLocator; byte_amtp:Poraub8; char_amtp:Poraub8; 
+             bufp:Pdvoid; bufl:oraub8; piece:ub1; ctxp:Pdvoid; cbfp:OCICallbackLobWrite2; 
+             csid:ub2; csfrm:ub1):sword;cdecl;external ocilib name 'OCILobWriteAppend2';
+
+  function OCILobGetStorageLimit(svchp:POCISvcCtx; errhp:POCIError; lobp:POCILobLocator; limitp:Poraub8):sword;cdecl;external ocilib name 'OCILobGetStorageLimit';
+
+{$endif}
+  {
+   ** Initialize the security package
+    }
+
+  function OCISecurityInitialize(sechandle:POCISecurity; error_handle:POCIError):sword;cdecl;external ocilib name 'OCISecurityInitialize';
+
+  function OCISecurityTerminate(sechandle:POCISecurity; error_handle:POCIError):sword;cdecl;external ocilib name 'OCISecurityTerminate';
+
+  function OCISecurityOpenWallet(osshandle:POCISecurity; error_handle:POCIError; wrllen:size_t; wallet_resource_locator:POraText; pwdlen:size_t; 
+             password:POraText; wallet:PnzttWallet):sword;cdecl;external ocilib name 'OCISecurityOpenWallet';
+
+  function OCISecurityCloseWallet(osshandle:POCISecurity; error_handle:POCIError; wallet:PnzttWallet):sword;cdecl;external ocilib name 'OCISecurityCloseWallet';
+
+  function OCISecurityCreateWallet(osshandle:POCISecurity; error_handle:POCIError; wrllen:size_t; wallet_resource_locator:POraText; pwdlen:size_t; 
+             password:POraText; wallet:PnzttWallet):sword;cdecl;external ocilib name 'OCISecurityCreateWallet';
+
+  function OCISecurityDestroyWallet(osshandle:POCISecurity; error_handle:POCIError; wrllen:size_t; wallet_resource_locator:POraText; pwdlen:size_t; 
+             password:POraText):sword;cdecl;external ocilib name 'OCISecurityDestroyWallet';
+
+  function OCISecurityStorePersona(osshandle:POCISecurity; error_handle:POCIError; var persona:PnzttPersona; wallet:PnzttWallet):sword;cdecl;external ocilib name 'OCISecurityStorePersona';
+
+  function OCISecurityOpenPersona(osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona):sword;cdecl;external ocilib name 'OCISecurityOpenPersona';
+
+  function OCISecurityClosePersona(osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona):sword;cdecl;external ocilib name 'OCISecurityClosePersona';
+
+  function OCISecurityRemovePersona(osshandle:POCISecurity; error_handle:POCIError; var persona:PnzttPersona):sword;cdecl;external ocilib name 'OCISecurityRemovePersona';
+
+  function OCISecurityCreatePersona(osshandle:POCISecurity; error_handle:POCIError; identity_type:nzttIdentType; cipher_type:nzttCipherType; desc:PnzttPersonaDesc; 
+             var persona:PnzttPersona):sword;cdecl;external ocilib name 'OCISecurityCreatePersona';
+
+  function OCISecuritySetProtection(osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; crypto_engine_function:nzttcef; data_unit_format:nztttdufmt; 
+             protection_info:PnzttProtInfo):sword;cdecl;external ocilib name 'OCISecuritySetProtection';
+
+  function OCISecurityGetProtection(osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; crypto_engine_function:nzttcef; data_unit_format_ptr:Pnztttdufmt; 
+             protection_info:PnzttProtInfo):sword;cdecl;external ocilib name 'OCISecurityGetProtection';
+
+  function OCISecurityRemoveIdentity(osshandle:POCISecurity; error_handle:POCIError; var identity_ptr:PnzttIdentity):sword;cdecl;external ocilib name 'OCISecurityRemoveIdentity';
+
+  function OCISecurityCreateIdentity(osshandle:POCISecurity; error_handle:POCIError; _type:nzttIdentType; desc:PnzttIdentityDesc; var identity_ptr:PnzttIdentity):sword;cdecl;external ocilib name 'OCISecurityCreateIdentity';
+
+  function OCISecurityAbortIdentity(osshandle:POCISecurity; error_handle:POCIError; var identity_ptr:PnzttIdentity):sword;cdecl;external ocilib name 'OCISecurityAbortIdentity';
+
+  function OCISecurityFreeIdentity(osshandle:POCISecurity; error_handle:POCIError; var identity_ptr:PnzttIdentity):sword;cdecl;external ocilib name 'OCISecurityFreeIdentity';
+
+  function OCISecurityStoreTrustedIdentity(osshandle:POCISecurity; error_handle:POCIError; var identity_ptr:PnzttIdentity; persona:PnzttPersona):sword;cdecl;external ocilib name 'OCISecurityStoreTrustedIdentity';
+
+  function OCISecuritySign(osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; signature_state:nzttces; input_length:size_t; 
+             input:Pub1; buffer_block:PnzttBufferBlock):sword;cdecl;external ocilib name 'OCISecuritySign';
+
+  function OCISecuritySignExpansion(osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; inputlen:size_t; signature_length:Psize_t):sword;cdecl;external ocilib name 'OCISecuritySignExpansion';
+
+  function OCISecurityVerify(osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; signature_state:nzttces; siglen:size_t; 
+             signature:Pub1; extracted_message:PnzttBufferBlock; verified:Pboolean; validated:Pboolean; var signing_party_identity:PnzttIdentity):sword;cdecl;external ocilib name 'OCISecurityVerify';
+
+  function OCISecurityValidate(osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; identity:PnzttIdentity; validated:Pboolean):sword;cdecl;external ocilib name 'OCISecurityValidate';
+
+  function OCISecuritySignDetached(osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; signature_state:nzttces; input_length:size_t; 
+             input:Pub1; signature:PnzttBufferBlock):sword;cdecl;external ocilib name 'OCISecuritySignDetached';
+
+  function OCISecuritySignDetExpansion(osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; input_length:size_t; required_buffer_length:Psize_t):sword;cdecl;external ocilib name 'OCISecuritySignDetExpansion';
+
+  function OCISecurityVerifyDetached(osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; signature_state:nzttces; data_length:size_t; 
+             data:Pub1; siglen:size_t; signature:Pub1; verified:Pboolean; validated:Pboolean; 
+             var signing_party_identity:PnzttIdentity):sword;cdecl;external ocilib name 'OCISecurityVerifyDetached';
+
+  function OCISecurity_PKEncrypt(osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; number_of_recipients:size_t; recipient_list:PnzttIdentity; 
+             encryption_state:nzttces; input_length:size_t; input:Pub1; encrypted_data:PnzttBufferBlock):sword;cdecl;external ocilib name 'OCISecurity_PKEncrypt';
+
+  function OCISecurityPKEncryptExpansion(osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; number_recipients:size_t; input_length:size_t; 
+             buffer_length_required:Psize_t):sword;cdecl;external ocilib name 'OCISecurityPKEncryptExpansion';
+
+  function OCISecurityPKDecrypt(osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; encryption_state:nzttces; input_length:size_t; 
+             input:Pub1; encrypted_data:PnzttBufferBlock):sword;cdecl;external ocilib name 'OCISecurityPKDecrypt';
+
+  function OCISecurityEncrypt(osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; encryption_state:nzttces; input_length:size_t; 
+             input:Pub1; encrypted_data:PnzttBufferBlock):sword;cdecl;external ocilib name 'OCISecurityEncrypt';
+
+  function OCISecurityEncryptExpansion(osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; input_length:size_t; encrypted_data_length:Psize_t):sword;cdecl;external ocilib name 'OCISecurityEncryptExpansion';
+
+  function OCISecurityDecrypt(osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; decryption_state:nzttces; input_length:size_t; 
+             input:Pub1; decrypted_data:PnzttBufferBlock):sword;cdecl;external ocilib name 'OCISecurityDecrypt';
+
+  function OCISecurityEnvelope(osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; number_of_recipients:size_t; identity:PnzttIdentity; 
+             encryption_state:nzttces; input_length:size_t; input:Pub1; enveloped_data:PnzttBufferBlock):sword;cdecl;external ocilib name 'OCISecurityEnvelope';
+
+  function OCISecurityDeEnvelope(osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; decryption_state:nzttces; input_length:size_t; 
+             input:Pub1; output_message:PnzttBufferBlock; verified:Pboolean; validated:Pboolean; var sender_identity:PnzttIdentity):sword;cdecl;external ocilib name 'OCISecurityDeEnvelope';
+
+  function OCISecurityKeyedHash(osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; hash_state:nzttces; input_length:size_t; 
+             input:Pub1; keyed_hash:PnzttBufferBlock):sword;cdecl;external ocilib name 'OCISecurityKeyedHash';
+
+  function OCISecurityKeyedHashExpansion(osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; input_length:size_t; required_buffer_length:Psize_t):sword;cdecl;external ocilib name 'OCISecurityKeyedHashExpansion';
+
+  function OCISecurityHash(osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; hash_state:nzttces; input:size_t; 
+             input_length:Pub1; hash:PnzttBufferBlock):sword;cdecl;external ocilib name 'OCISecurityHash';
+
+  function OCISecurityHashExpansion(osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; input_length:size_t; required_buffer_length:Psize_t):sword;cdecl;external ocilib name 'OCISecurityHashExpansion';
+
+  function OCISecuritySeedRandom(osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; seed_length:size_t; seed:Pub1):sword;cdecl;external ocilib name 'OCISecuritySeedRandom';
+
+  function OCISecurityRandomBytes(osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; number_of_bytes_desired:size_t; random_bytes:PnzttBufferBlock):sword;cdecl;external ocilib name 'OCISecurityRandomBytes';
+
+  function OCISecurityRandomNumber(osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; random_number_ptr:Puword):sword;cdecl;external ocilib name 'OCISecurityRandomNumber';
+
+  function OCISecurityInitBlock(osshandle:POCISecurity; error_handle:POCIError; buffer_block:PnzttBufferBlock):sword;cdecl;external ocilib name 'OCISecurityInitBlock';
+
+  function OCISecurityReuseBlock(osshandle:POCISecurity; error_handle:POCIError; buffer_block:PnzttBufferBlock):sword;cdecl;external ocilib name 'OCISecurityReuseBlock';
+
+  function OCISecurityPurgeBlock(osshandle:POCISecurity; error_handle:POCIError; buffer_block:PnzttBufferBlock):sword;cdecl;external ocilib name 'OCISecurityPurgeBlock';
+
+  function OCISecuritySetBlock(osshandle:POCISecurity; error_handle:POCIError; flags_to_set:uword; buffer_length:size_t; used_buffer_length:size_t; 
+             buffer:Pub1; buffer_block:PnzttBufferBlock):sword;cdecl;external ocilib name 'OCISecuritySetBlock';
+
+  function OCISecurityGetIdentity(osshandle:POCISecurity; error_handle:POCIError; namelen:size_t; distinguished_name:POraText; var identity:PnzttIdentity):sword;cdecl;external ocilib name 'OCISecurityGetIdentity';
+
+  function OCIAQEnq(svchp:POCISvcCtx; errhp:POCIError; queue_name:POraText; enqopt:POCIAQEnqOptions; msgprop:POCIAQMsgProperties; 
+             payload_tdo:POCIType; payload:PPdvoid; payload_ind:PPdvoid; var msgid:POCIRaw; flags:ub4):sword;cdecl;external ocilib name 'OCIAQEnq';
+
+  function OCIAQDeq(svchp:POCISvcCtx; errhp:POCIError; queue_name:POraText; deqopt:POCIAQDeqOptions; msgprop:POCIAQMsgProperties; 
+             payload_tdo:POCIType; payload:PPdvoid; payload_ind:PPdvoid; var msgid: POCIRaw; flags:ub4):sword;cdecl;external ocilib name 'OCIAQDeq';
+
+  function OCIAQEnqArray(svchp:POCISvcCtx; errhp:POCIError; queue_name:POraText; enqopt:POCIAQEnqOptions; iters:Pub4; 
+             var msgprop:POCIAQMsgProperties; payload_tdo:POCIType; payload:PPdvoid; payload_ind:PPdvoid; var msgid:POCIRaw;
+             ctxp:Pdvoid; enqcbfp:OCICallbackAQEnq; flags:ub4):sword;cdecl;external ocilib name 'OCIAQEnqArray';
+
+  function OCIAQDeqArray(svchp:POCISvcCtx; errhp:POCIError; queue_name:POraText; deqopt:POCIAQDeqOptions; iters:Pub4; 
+             var msgprop:POCIAQMsgProperties; payload_tdo:POCIType; payload:PPdvoid; payload_ind:PPdvoid; var msgid:POCIRaw;
+             ctxp:Pdvoid; deqcbfp:OCICallbackAQDeq; flags:ub4):sword;cdecl;external ocilib name 'OCIAQDeqArray';
+
+  function OCIAQListen(svchp:POCISvcCtx; errhp:POCIError; var agent_list:POCIAQAgent; num_agents:ub4; wait:sb4;
+             var agent:POCIAQAgent; flags:ub4):sword;cdecl;external ocilib name 'OCIAQListen';
+
+  function OCIAQListen2(svchp:POCISvcCtx; errhp:POCIError; var agent_list:POCIAQAgent; num_agents:ub4; lopts:POCIAQListenOpts;
+             var agent:POCIAQAgent; lmops:POCIAQLisMsgProps; flags:ub4):sword;cdecl;external ocilib name 'OCIAQListen2';
+
+  function OCIExtractInit(hndl:Pdvoid; err:POCIError):sword;cdecl;external ocilib name 'OCIExtractInit';
+
+  function OCIExtractTerm(hndl:Pdvoid; err:POCIError):sword;cdecl;external ocilib name 'OCIExtractTerm';
+
+  function OCIExtractReset(hndl:Pdvoid; err:POCIError):sword;cdecl;external ocilib name 'OCIExtractReset';
+
+  function OCIExtractSetNumKeys(hndl:Pdvoid; err:POCIError; numkeys:uword):sword;cdecl;external ocilib name 'OCIExtractSetNumKeys';
+
+  function OCIExtractSetKey(hndl:Pdvoid; err:POCIError; name:POraText; _type:ub1; flag:ub4;
+             defval:Pdvoid; intrange:Psb4; var strlist:POraText):sword;cdecl;external ocilib name 'OCIExtractSetKey';
+
+  function OCIExtractFromFile(hndl:Pdvoid; err:POCIError; flag:ub4; filename:POraText):sword;cdecl;external ocilib name 'OCIExtractFromFile';
+
+  function OCIExtractFromStr(hndl:Pdvoid; err:POCIError; flag:ub4; input:POraText):sword;cdecl;external ocilib name 'OCIExtractFromStr';
+
+  function OCIExtractToInt(hndl:Pdvoid; err:POCIError; keyname:POraText; valno:uword; retval:Psb4):sword;cdecl;external ocilib name 'OCIExtractToInt';
+
+  function OCIExtractToBool(hndl:Pdvoid; err:POCIError; keyname:POraText; valno:uword; retval:Pub1):sword;cdecl;external ocilib name 'OCIExtractToBool';
+
+  function OCIExtractToStr(hndl:Pdvoid; err:POCIError; keyname:POraText; valno:uword; retval:POraText; 
+             buflen:uword):sword;cdecl;external ocilib name 'OCIExtractToStr';
+
+  function OCIExtractToOCINum(hndl:Pdvoid; err:POCIError; keyname:POraText; valno:uword; retval:POCINumber):sword;cdecl;external ocilib name 'OCIExtractToOCINum';
+
+  function OCIExtractToList(hndl:Pdvoid; err:POCIError; numkeys:Puword):sword;cdecl;external ocilib name 'OCIExtractToList';
+
+  function OCIExtractFromList(hndl:Pdvoid; err:POCIError; index:uword; var name:POraText; _type:Pub1;
+             numvals:Puword; values:PPPdvoid):sword;cdecl;external ocilib name 'OCIExtractFromList';
+
+  { Memory Related Service Interfaces  }
+  function OCIMemoryAlloc(hdl:Pdvoid; err:POCIError; mem:PPdvoid; dur:OCIDuration; size:ub4; 
+             flags:ub4):sword;cdecl;external ocilib name 'OCIMemoryAlloc';
+
+  function OCIMemoryResize(hdl:Pdvoid; err:POCIError; mem:PPdvoid; newsize:ub4; flags:ub4):sword;cdecl;external ocilib name 'OCIMemoryResize';
+
+  function OCIMemoryFree(hdl:Pdvoid; err:POCIError; mem:Pdvoid):sword;cdecl;external ocilib name 'OCIMemoryFree';
+
+  function OCIContextSetValue(hdl:Pdvoid; err:POCIError; duration:OCIDuration; key:Pub1; keylen:ub1; 
+             ctx_value:Pdvoid):sword;cdecl;external ocilib name 'OCIContextSetValue';
+
+  function OCIContextGetValue(hdl:Pdvoid; err:POCIError; key:Pub1; keylen:ub1; ctx_value:PPdvoid):sword;cdecl;external ocilib name 'OCIContextGetValue';
+
+  function OCIContextClearValue(hdl:Pdvoid; err:POCIError; key:Pub1; keylen:ub1):sword;cdecl;external ocilib name 'OCIContextClearValue';
+
+  function OCIContextGenerateKey(hdl:Pdvoid; err:POCIError; key:Pub4):sword;cdecl;external ocilib name 'OCIContextGenerateKey';
+
+  function OCIMemorySetCurrentIDs(hdl:Pdvoid; err:POCIError; curr_session_id:ub4; curr_trans_id:ub4; curr_stmt_id:ub4):sword;cdecl;external ocilib name 'OCIMemorySetCurrentIDs';
+
+  function OCIPicklerTdsCtxInit(env:POCIEnv; err:POCIError; var tdsc:POCIPicklerTdsCtx):sword;cdecl;external ocilib name 'OCIPicklerTdsCtxInit';
+
+  function OCIPicklerTdsCtxFree(env:POCIEnv; err:POCIError; tdsc:POCIPicklerTdsCtx):sword;cdecl;external ocilib name 'OCIPicklerTdsCtxFree';
+
+  function OCIPicklerTdsInit(env:POCIEnv; err:POCIError; tdsc:POCIPicklerTdsCtx; var tdsh:POCIPicklerTds):sword;cdecl;external ocilib name 'OCIPicklerTdsInit';
+
+  function OCIPicklerTdsFree(env:POCIEnv; err:POCIError; tdsh:POCIPicklerTds):sword;cdecl;external ocilib name 'OCIPicklerTdsFree';
+
+  function OCIPicklerTdsCreateElementNumber(env:POCIEnv; err:POCIError; tdsh:POCIPicklerTds; prec:ub1; scale:sb1; 
+             elt:POCIPicklerTdsElement):sword;cdecl;external ocilib name 'OCIPicklerTdsCreateElementNumber';
+
+  function OCIPicklerTdsCreateElementChar(env:POCIEnv; err:POCIError; tdsh:POCIPicklerTds; len:ub2; elt:POCIPicklerTdsElement):sword;cdecl;external ocilib name 'OCIPicklerTdsCreateElementChar';
+
+  function OCIPicklerTdsCreateElementVarchar(env:POCIEnv; err:POCIError; tdsh:POCIPicklerTds; len:ub2; elt:POCIPicklerTdsElement):sword;cdecl;external ocilib name 'OCIPicklerTdsCreateElementVarchar';
+
+  function OCIPicklerTdsCreateElementRaw(env:POCIEnv; err:POCIError; tdsh:POCIPicklerTds; len:ub2; elt:POCIPicklerTdsElement):sword;cdecl;external ocilib name 'OCIPicklerTdsCreateElementRaw';
+
+  function OCIPicklerTdsCreateElement(env:POCIEnv; err:POCIError; tdsh:POCIPicklerTds; dty:OCITypeCode; elt:POCIPicklerTdsElement):sword;cdecl;external ocilib name 'OCIPicklerTdsCreateElement';
+
+  function OCIPicklerTdsAddAttr(env:POCIEnv; err:POCIError; tdsh:POCIPicklerTds; elt:OCIPicklerTdsElement):sword;cdecl;external ocilib name 'OCIPicklerTdsAddAttr';
+
+  function OCIPicklerTdsGenerate(env:POCIEnv; err:POCIError; tdsh:POCIPicklerTds):sword;cdecl;external ocilib name 'OCIPicklerTdsGenerate';
+
+  function OCIPicklerTdsGetAttr(env:POCIEnv; err:POCIError; tdsh:POCIPicklerTds; attrno:ub1; typ:POCITypeCode;
+             len:Pub2):sword;cdecl;external ocilib name 'OCIPicklerTdsGetAttr';
+
+  function OCIPicklerFdoInit(env:POCIEnv; err:POCIError; var fdoh:POCIPicklerFdo):sword;cdecl;external ocilib name 'OCIPicklerFdoInit';
+
+  function OCIPicklerFdoFree(env:POCIEnv; err:POCIError; fdoh:POCIPicklerFdo):sword;cdecl;external ocilib name 'OCIPicklerFdoFree';
+
+  function OCIPicklerImageInit(env:POCIEnv; err:POCIError; fdoh:POCIPicklerFdo; tdsh:POCIPicklerTds; var imgh:POCIPicklerImage):sword;cdecl;external ocilib name 'OCIPicklerImageInit';
+
+  function OCIPicklerImageFree(env:POCIEnv; err:POCIError; imgh:POCIPicklerImage):sword;cdecl;external ocilib name 'OCIPicklerImageFree';
+
+  function OCIPicklerImageAddScalar(env:POCIEnv; err:POCIError; imgh:POCIPicklerImage; scalar:Pdvoid; len:ub4):sword;cdecl;external ocilib name 'OCIPicklerImageAddScalar';
+
+  function OCIPicklerImageAddNullScalar(env:POCIEnv; err:POCIError; imgh:POCIPicklerImage):sword;cdecl;external ocilib name 'OCIPicklerImageAddNullScalar';
+
+  function OCIPicklerImageGenerate(env:POCIEnv; err:POCIError; imgh:POCIPicklerImage):sword;cdecl;external ocilib name 'OCIPicklerImageGenerate';
+
+  function OCIPicklerImageGetScalarSize(env:POCIEnv; err:POCIError; imgh:POCIPicklerImage; attrno:ub4; size:Pub4):sword;cdecl;external ocilib name 'OCIPicklerImageGetScalarSize';
+
+  function OCIPicklerImageGetScalar(env:POCIEnv; err:POCIError; imgh:POCIPicklerImage; attrno:ub4; buf:Pdvoid; 
+             len:Pub4; ind:POCIInd):sword;cdecl;external ocilib name 'OCIPicklerImageGetScalar';
+
+  function OCIPicklerImageCollBegin(env:POCIEnv; err:POCIError; imgh:POCIPicklerImage; colltdsh:POCIPicklerTds):sword;cdecl;external ocilib name 'OCIPicklerImageCollBegin';
+
+  function OCIPicklerImageCollAddScalar(env:POCIEnv; err:POCIError; imgh:POCIPicklerImage; scalar:Pdvoid; buflen:ub4; 
+             ind:OCIInd):sword;cdecl;external ocilib name 'OCIPicklerImageCollAddScalar';
+
+  function OCIPicklerImageCollEnd(env:POCIEnv; err:POCIError; imgh:POCIPicklerImage):sword;cdecl;external ocilib name 'OCIPicklerImageCollEnd';
+
+  { should take svcctx for locator stuff  }
+  function OCIPicklerImageCollBeginScan(env:POCIEnv; err:POCIError; imgh:POCIPicklerImage; coll_tdsh:POCIPicklerTds; attrnum:ub4;
+             startidx:ub4; ind:POCIInd):sword;cdecl;external ocilib name 'OCIPicklerImageCollBeginScan';
+
+  function OCIPicklerImageCollGetScalarSize(env:POCIEnv; err:POCIError; coll_tdsh:POCIPicklerTds; size:Pub4):sword;cdecl;external ocilib name 'OCIPicklerImageCollGetScalarSize';
+
+  function OCIPicklerImageCollGetScalar(env:POCIEnv; err:POCIError; imgh:POCIPicklerImage; buf:Pdvoid; buflen:Pub4; 
+             ind:POCIInd):sword;cdecl;external ocilib name 'OCIPicklerImageCollGetScalar';
+
+  function OCIAnyDataGetType(svchp:POCISvcCtx; errhp:POCIError; sdata:POCIAnyData; tc:POCITypeCode; var _type:POCIType):sword;cdecl;external ocilib name 'OCIAnyDataGetType';
+
+  function OCIAnyDataIsNull(svchp:POCISvcCtx; errhp:POCIError; sdata:POCIAnyData; isnull:Pboolean):sword;cdecl;external ocilib name 'OCIAnyDataIsNull';
+
+  function OCIAnyDataConvert(svchp:POCISvcCtx; errhp:POCIError; tc:OCITypeCode; _type:POCIType; dur:OCIDuration; 
+             ind:Pdvoid; data_val:Pdvoid; len:ub4; var sdata:POCIAnyData):sword;cdecl;external ocilib name 'OCIAnyDataConvert';
+
+  function OCIAnyDataBeginCreate(svchp:POCISvcCtx; errhp:POCIError; tc:OCITypeCode; _type:POCIType; dur:OCIDuration; 
+             var sdata:POCIAnyData):sword;cdecl;external ocilib name 'OCIAnyDataBeginCreate';
+
+  function OCIAnyDataDestroy(svchp:POCISvcCtx; errhp:POCIError; sdata:POCIAnyData):sword;cdecl;external ocilib name 'OCIAnyDataDestroy';
+
+  function OCIAnyDataAttrSet(svchp:POCISvcCtx; errhp:POCIError; sdata:POCIAnyData; tc:OCITypeCode; _type:POCIType; 
+             ind:Pdvoid; attr_val:Pdvoid; length:ub4; is_any:boolean):sword;cdecl;external ocilib name 'OCIAnyDataAttrSet';
+
+  function OCIAnyDataCollAddElem(svchp:POCISvcCtx; errhp:POCIError; sdata:POCIAnyData; tc:OCITypeCode; _type:POCIType; 
+             ind:Pdvoid; attr_val:Pdvoid; length:ub4; is_any:boolean; last_elem:boolean):sword;cdecl;external ocilib name 'OCIAnyDataCollAddElem';
+
+  function OCIAnyDataEndCreate(svchp:POCISvcCtx; errhp:POCIError; sdata:POCIAnyData):sword;cdecl;external ocilib name 'OCIAnyDataEndCreate';
+
+  function OCIAnyDataAccess(svchp:POCISvcCtx; errhp:POCIError; sdata:POCIAnyData; tc:OCITypeCode; _type:POCIType; 
+             ind:Pdvoid; attr_val:Pdvoid; length:Pub4):sword;cdecl;external ocilib name 'OCIAnyDataAccess';
+
+  function OCIAnyDataGetCurrAttrNum(svchp:POCISvcCtx; errhp:POCIError; sdata:POCIAnyData; attrnum:Pub4):sword;cdecl;external ocilib name 'OCIAnyDataGetCurrAttrNum';
+
+  function OCIAnyDataAttrGet(svchp:POCISvcCtx; errhp:POCIError; sdata:POCIAnyData; tc:OCITypeCode; _type:POCIType; 
+             ind:Pdvoid; attr_val:Pdvoid; length:Pub4; is_any:boolean):sword;cdecl;external ocilib name 'OCIAnyDataAttrGet';
+
+  function OCIAnyDataCollGetElem(svchp:POCISvcCtx; errhp:POCIError; sdata:POCIAnyData; tc:OCITypeCode; _type:POCIType; 
+             ind:Pdvoid; celem_val:Pdvoid; length:Pub4; is_any:boolean):sword;cdecl;external ocilib name 'OCIAnyDataCollGetElem';
+
+{$ELSE}
+var OCIInitialize : function (mode:ub4; ctxp:Pdvoid; malocfp:tmalocfp; ralocfp:tralocfp;mfreefp:tmfreefp ):sword;cdecl;
+
+   OCITerminate : function (mode:ub4):sword;cdecl;
+
+   OCIEnvCreate : function (var envp:POCIEnv; mode:ub4; ctxp:Pdvoid; malocfp:tmalocfp; ralocfp:tralocfp;
+             mfreefp:tmfreefp; xtramem_sz:size_t; usrmempp:PPdvoid):sword;cdecl;
+
+   OCIEnvNlsCreate : function (var envp:POCIEnv; mode:ub4; ctxp:Pdvoid; malocfp:tmalocfp; ralocfp:tralocfp;
+             mfreefp:tmfreefp; xtramem_sz:size_t; usrmempp:PPdvoid; charset:ub2; ncharset:ub2):sword;cdecl;
+
+   OCIFEnvCreate : function (var envp:POCIEnv; mode:ub4; ctxp:Pdvoid; malocfp:tmalocfp; ralocfp:tralocfp;
+             mfreefp:tmfreefp; xtramem_sz:size_t; usrmempp:PPdvoid; fupg:Pdvoid):sword;cdecl;
+
+   OCIHandleAlloc : function (parenth:Pdvoid; var hndlpp:Pdvoid; _type:ub4; xtramem_sz:size_t; usrmempp:PPdvoid):sword;cdecl;
+
+   OCIHandleFree : function (hndlp:Pdvoid; _type:ub4):sword;cdecl;
+
+   OCIDescriptorAlloc : function (parenth:Pdvoid; descpp:PPdvoid; _type:ub4; xtramem_sz:size_t; usrmempp:PPdvoid):sword;cdecl;
+
+   OCIDescriptorFree : function (descp:Pdvoid; _type:ub4):sword;cdecl;
+
+   OCIEnvInit : function (var envp:POCIEnv; mode:ub4; xtramem_sz:size_t; usrmempp:PPdvoid):sword;cdecl;
+
+   OCIServerAttach : function (srvhp:POCIServer; errhp:POCIError; dblink:POraText; dblink_len:sb4; mode:ub4):sword;cdecl;
+
+   OCIServerDetach : function (srvhp:POCIServer; errhp:POCIError; mode:ub4):sword;cdecl;
+
+   OCISessionBegin : function (svchp:POCISvcCtx; errhp:POCIError; usrhp:POCISession; credt:ub4; mode:ub4):sword;cdecl;
+
+   OCISessionEnd : function (svchp:POCISvcCtx; errhp:POCIError; usrhp:POCISession; mode:ub4):sword;cdecl;
+
+   OCILogon : function (envhp:POCIEnv; errhp:POCIError;var svchp:POCISvcCtx; username:POraText; uname_len:ub4;
+             password:POraText; passwd_len:ub4; dbname:POraText; dbname_len:ub4):sword;cdecl;
+
+   OCILogon2 : function (envhp:POCIEnv; errhp:POCIError; var svchp:POCISvcCtx; username:POraText; uname_len:ub4;
+             password:POraText; passwd_len:ub4; dbname:POraText; dbname_len:ub4; mode:ub4):sword;cdecl;
+
+   OCILogoff : function (svchp:POCISvcCtx; errhp:POCIError):sword;cdecl;
+
+   OCIPasswordChange : function (svchp:POCISvcCtx; errhp:POCIError; user_name:POraText; usernm_len:ub4; opasswd:POraText;
+             opasswd_len:ub4; npasswd:POraText; npasswd_len:ub4; mode:ub4):sword;cdecl;
+
+   OCIStmtPrepare : function (stmtp:POCIStmt; errhp:POCIError; stmt:POraText; stmt_len:ub4; language:ub4;
+             mode:ub4):sword;cdecl;
+
+   OCIStmtPrepare2 : function (svchp:POCISvcCtx; var stmtp:POCIStmt; errhp:POCIError; stmt:POraText; stmt_len:ub4;
+             key:POraText; key_len:ub4; language:ub4; mode:ub4):sword;cdecl;
+
+   OCIStmtRelease : function (stmtp:POCIStmt; errhp:POCIError; key:POraText; key_len:ub4; mode:ub4):sword;cdecl;
+
+   OCIBindByPos : function (stmtp:POCIStmt; var bindp:POCIBind; errhp:POCIError; position:ub4; valuep:Pdvoid;
+             value_sz:sb4; dty:ub2; indp:Pdvoid; alenp:Pub2; rcodep:Pub2;
+             maxarr_len:ub4; curelep:Pub4; mode:ub4):sword;cdecl;
+
+   OCIBindByName : function (stmtp:POCIStmt; var bindp: POCIBind; errhp:POCIError; placeholder:POraText; placeh_len:sb4;
+             valuep:Pdvoid; value_sz:sb4; dty:ub2; indp:Pdvoid; alenp:Pub2;
+             rcodep:Pub2; maxarr_len:ub4; curelep:Pub4; mode:ub4):sword;cdecl;
+
+   OCIBindObject : function (bindp:POCIBind; errhp:POCIError; _type:POCIType; pgvpp:PPdvoid; pvszsp:Pub4;
+             indpp:PPdvoid; indszp:Pub4):sword;cdecl;
+
+   OCIBindDynamic : function (bindp:POCIBind; errhp:POCIError; ictxp:Pdvoid; icbfp:OCICallbackInBind; octxp:Pdvoid;
+             ocbfp:OCICallbackOutBind):sword;cdecl;
+
+   OCIBindArrayOfStruct : function (bindp:POCIBind; errhp:POCIError; pvskip:ub4; indskip:ub4; alskip:ub4;
+             rcskip:ub4):sword;cdecl;
+
+   OCIStmtGetPieceInfo : function (stmtp:POCIStmt; errhp:POCIError; hndlpp:PPdvoid; typep:Pub4; in_outp:Pub1;
+             iterp:Pub4; idxp:Pub4; piecep:Pub1):sword;cdecl;
+
+   OCIStmtSetPieceInfo : function (hndlp:Pdvoid; _type:ub4; errhp:POCIError; bufp:Pdvoid; alenp:Pub4;
+             piece:ub1; indp:Pdvoid; rcodep:Pub2):sword;cdecl;
+
+   OCIStmtExecute : function (svchp:POCISvcCtx; stmtp:POCIStmt; errhp:POCIError; iters:ub4; rowoff:ub4;
+             snap_in:POCISnapshot; snap_out:POCISnapshot; mode:ub4):sword;cdecl;
+
+   OCIDefineByPos : function (stmtp:POCIStmt; var defnp:POCIDefine; errhp:POCIError; position:ub4; valuep:Pdvoid;
+             value_sz:sb4; dty:ub2; indp:Pdvoid; rlenp:Pub2; rcodep:Pub2;
+             mode:ub4):sword;cdecl;
+
+   OCIDefineObject : function (defnp:POCIDefine; errhp:POCIError; _type:POCIType; pgvpp:PPdvoid; pvszsp:Pub4;
+             indpp:PPdvoid; indszp:Pub4):sword;cdecl;
+
+   OCIDefineDynamic : function (defnp:POCIDefine; errhp:POCIError; octxp:Pdvoid; ocbfp:OCICallbackDefine):sword;cdecl;
+
+   OCIRowidToChar : function (rowidDesc:POCIRowid; outbfp:POraText; outbflp:Pub2; errhp:POCIError):sword;cdecl;
+
+   OCIDefineArrayOfStruct : function (defnp:POCIDefine; errhp:POCIError; pvskip:ub4; indskip:ub4; rlskip:ub4;
+             rcskip:ub4):sword;cdecl;
+
+   OCIStmtFetch : function (stmtp:POCIStmt; errhp:POCIError; nrows:ub4; orientation:ub2; mode:ub4):sword;cdecl;
+
+   OCIStmtFetch2 : function (stmtp:POCIStmt; errhp:POCIError; nrows:ub4; orientation:ub2; scrollOffset:sb4;
+             mode:ub4):sword;cdecl;
+
+   OCIStmtGetBindInfo : function (stmtp:POCIStmt; errhp:POCIError; size:ub4; startloc:ub4; found:Psb4;
+             bvnp:array of POraText; bvnl:array of ub1; invp:array of POraText; inpl:array of ub1; dupl:array of ub1;
+             var hndl:POCIBind):sword;cdecl;
+
+   OCIDescribeAny : function (svchp:POCISvcCtx; errhp:POCIError; objptr:Pdvoid; objnm_len:ub4; objptr_typ:ub1;
+             info_level:ub1; objtyp:ub1; dschp:POCIDescribe):sword;cdecl;
+
+   OCIParamGet : function (hndlp:Pdvoid; htype:ub4; errhp:POCIError; var parmdpp:Pdvoid; pos:ub4):sword;cdecl;
+
+   OCIParamSet : function (hdlp:Pdvoid; htyp:ub4; errhp:POCIError; dscp:Pdvoid; dtyp:ub4;
+             pos:ub4):sword;cdecl;
+
+   OCITransStart : function (svchp:POCISvcCtx; errhp:POCIError; timeout:uword; flags:ub4):sword;cdecl;
+
+   OCITransDetach : function (svchp:POCISvcCtx; errhp:POCIError; flags:ub4):sword;cdecl;
+
+   OCITransCommit : function (svchp:POCISvcCtx; errhp:POCIError; flags:ub4):sword;cdecl;
+
+   OCITransRollback : function (svchp:POCISvcCtx; errhp:POCIError; flags:ub4):sword;cdecl;
+
+   OCITransPrepare : function (svchp:POCISvcCtx; errhp:POCIError; flags:ub4):sword;cdecl;
+
+   OCITransMultiPrepare : function (svchp:POCISvcCtx; numBranches:ub4; var txns:POCITrans; var errhp:POCIError):sword;cdecl;
+
+   OCITransForget : function (svchp:POCISvcCtx; errhp:POCIError; flags:ub4):sword;cdecl;
+
+   OCIErrorGet : function (hndlp:Pdvoid; recordno:ub4; sqlstate:POraText; var errcodep:sb4; bufp:POraText;
+             bufsiz:ub4; _type:ub4):sword;cdecl;
+
+   OCILobAppend : function (svchp:POCISvcCtx; errhp:POCIError; dst_locp:POCILobLocator; src_locp:POCILobLocator):sword;cdecl;
+
+   OCILobAssign : function (envhp:POCIEnv; errhp:POCIError; src_locp:POCILobLocator; var dst_locpp:POCILobLocator):sword;cdecl;
+
+   OCILobCharSetForm : function (envhp:POCIEnv; errhp:POCIError; locp:POCILobLocator; csfrm:Pub1):sword;cdecl;
+
+   OCILobCharSetId : function (envhp:POCIEnv; errhp:POCIError; locp:POCILobLocator; csid:Pub2):sword;cdecl;
+
+   OCILobCopy : function (svchp:POCISvcCtx; errhp:POCIError; dst_locp:POCILobLocator; src_locp:POCILobLocator; amount:ub4;
+             dst_offset:ub4; src_offset:ub4):sword;cdecl;
+
+   OCILobCreateTemporary : function (svchp:POCISvcCtx; errhp:POCIError; locp:POCILobLocator; csid:ub2; csfrm:ub1;
+             lobtype:ub1; cache:boolean; duration:OCIDuration):sword;cdecl;
+
+   OCILobClose : function (svchp:POCISvcCtx; errhp:POCIError; locp:POCILobLocator):sword;cdecl;
+
+   OCILobDisableBuffering : function (svchp:POCISvcCtx; errhp:POCIError; locp:POCILobLocator):sword;cdecl;
+
+   OCILobEnableBuffering : function (svchp:POCISvcCtx; errhp:POCIError; locp:POCILobLocator):sword;cdecl;
+
+   OCILobErase : function (svchp:POCISvcCtx; errhp:POCIError; locp:POCILobLocator; amount:Pub4; offset:ub4):sword;cdecl;
+
+   OCILobFileClose : function (svchp:POCISvcCtx; errhp:POCIError; filep:POCILobLocator):sword;cdecl;
+
+   OCILobFileCloseAll : function (svchp:POCISvcCtx; errhp:POCIError):sword;cdecl;
+
+   OCILobFileExists : function (svchp:POCISvcCtx; errhp:POCIError; filep:POCILobLocator; flag:Pboolean):sword;cdecl;
+
+   OCILobFileGetName : function (envhp:POCIEnv; errhp:POCIError; filep:POCILobLocator; dir_alias:POraText; d_length:Pub2;
+             filename:POraText; f_length:Pub2):sword;cdecl;
+
+   OCILobFileIsOpen : function (svchp:POCISvcCtx; errhp:POCIError; filep:POCILobLocator; flag:Pboolean):sword;cdecl;
+
+   OCILobFileOpen : function (svchp:POCISvcCtx; errhp:POCIError; filep:POCILobLocator; mode:ub1):sword;cdecl;
+
+   OCILobFileSetName : function (envhp:POCIEnv; errhp:POCIError; var filepp:POCILobLocator; dir_alias:POraText; d_length:ub2;
+             filename:POraText; f_length:ub2):sword;cdecl;
+
+   OCILobFlushBuffer : function (svchp:POCISvcCtx; errhp:POCIError; locp:POCILobLocator; flag:ub4):sword;cdecl;
+
+   OCILobFreeTemporary : function (svchp:POCISvcCtx; errhp:POCIError; locp:POCILobLocator):sword;cdecl;
+
+   OCILobGetChunkSize : function (svchp:POCISvcCtx; errhp:POCIError; locp:POCILobLocator; chunksizep:Pub4):sword;cdecl;
+
+   OCILobGetLength : function (svchp:POCISvcCtx; errhp:POCIError; locp:POCILobLocator; lenp:Pub4):sword;cdecl;
+
+   OCILobIsEqual : function (envhp:POCIEnv; x:POCILobLocator; y:POCILobLocator; is_equal:Pboolean):sword;cdecl;
+
+   OCILobIsOpen : function (svchp:POCISvcCtx; errhp:POCIError; locp:POCILobLocator; flag:Pboolean):sword;cdecl;
+
+   OCILobIsTemporary : function (envp:POCIEnv; errhp:POCIError; locp:POCILobLocator; is_temporary:Pboolean):sword;cdecl;
+
+   OCILobLoadFromFile : function (svchp:POCISvcCtx; errhp:POCIError; dst_locp:POCILobLocator; src_filep:POCILobLocator; amount:ub4;
+             dst_offset:ub4; src_offset:ub4):sword;cdecl;
+
+   OCILobLocatorAssign : function (svchp:POCISvcCtx; errhp:POCIError; src_locp:POCILobLocator; var dst_locpp:POCILobLocator):sword;cdecl;
+
+   OCILobLocatorIsInit : function (envhp:POCIEnv; errhp:POCIError; locp:POCILobLocator; is_initialized:Pboolean):sword;cdecl;
+
+   OCILobOpen : function (svchp:POCISvcCtx; errhp:POCIError; locp:POCILobLocator; mode:ub1):sword;cdecl;
+
+   OCILobRead : function (svchp:POCISvcCtx; errhp:POCIError; locp:POCILobLocator; amtp:Pub4; offset:ub4;
+             bufp:Pdvoid; bufl:ub4; ctxp:Pdvoid; cbfp:OCICallbackLobRead; csid:ub2;
+             csfrm:ub1):sword;cdecl;
+
+   OCILobTrim : function (svchp:POCISvcCtx; errhp:POCIError; locp:POCILobLocator; newlen:ub4):sword;cdecl;
+
+   OCILobWrite : function (svchp:POCISvcCtx; errhp:POCIError; locp:POCILobLocator; amtp:Pub4; offset:ub4;
+             bufp:Pdvoid; buflen:ub4; piece:ub1; ctxp:Pdvoid; cbfp:OCICallbackLobWrite;
+             csid:ub2; csfrm:ub1):sword;cdecl;
+
+   OCILobWriteAppend : function (svchp:POCISvcCtx; errhp:POCIError; lobp:POCILobLocator; amtp:Pub4; bufp:Pdvoid;
+             bufl:ub4; piece:ub1; ctxp:Pdvoid; cbfp:OCICallbackLobWrite; csid:ub2;
+             csfrm:ub1):sword;cdecl;
+
+   OCIBreak : function (hndlp:Pdvoid; errhp:POCIError):sword;cdecl;
+
+   OCIReset : function (hndlp:Pdvoid; errhp:POCIError):sword;cdecl;
+
+   OCIServerVersion : function (hndlp:Pdvoid; errhp:POCIError; bufp:POraText; bufsz:ub4; hndltype:ub1):sword;cdecl;
+
+   OCIServerRelease : function (hndlp:Pdvoid; errhp:POCIError; bufp:POraText; bufsz:ub4; hndltype:ub1;
+             version:Pub4):sword;cdecl;
+
+   OCIAttrGet : function (trgthndlp:Pdvoid; trghndltyp:ub4; attributep:Pdvoid; sizep:Pub4; attrtype:ub4;
+             errhp:POCIError):sword;cdecl;
+
+   OCIAttrSet : function (trgthndlp:Pdvoid; trghndltyp:ub4; attributep:Pdvoid; size:ub4; attrtype:ub4;
+             errhp:POCIError):sword;cdecl;
+
+   OCISvcCtxToLda : function (svchp:POCISvcCtx; errhp:POCIError; ldap:PLda_Def):sword;cdecl;
+
+   OCILdaToSvcCtx : function (var svchpp:POCISvcCtx; errhp:POCIError; ldap:PLda_Def):sword;cdecl;
+
+   OCIResultSetToStmt : function (rsetdp:POCIResult; errhp:POCIError):sword;cdecl;
+
+   OCIFileClose : function (hndl:Pdvoid; err:POCIError; filep:POCIFileObject):sword;cdecl;
+
+//   OCIUserCallbackRegister : function (hndlp:Pdvoid; _type:ub4; ehndlp:Pdvoid; callback:OCIUserCallback; ctxp:Pdvoid;
+//             fcode:ub4; when:ub4; ucbDesc:POCIUcb):sword;cdecl;external ocilib name 'OCIUserCallbackRegister';
+
+//   OCIUserCallbackGet : function (hndlp:Pdvoid; _type:ub4; ehndlp:Pdvoid; fcode:ub4; when:ub4;
+//             callbackp:POCIUserCallback; ctxpp:PPdvoid; ucbDesc:POCIUcb):sword;cdecl;external ocilib name 'OCIUserCallbackGet';
+
+   OCISharedLibInit : function (metaCtx:Pdvoid; libCtx:Pdvoid; argfmt:ub4; argc:sword; argv:PPdvoid;
+             envCallback:OCIEnvCallbackType):sword;cdecl;
+
+   OCIFileExists : function (hndl:Pdvoid; err:POCIError; filename:POraText; path:POraText; flag:Pub1):sword;cdecl;
+
+   OCIFileFlush : function (hndl:Pdvoid; err:POCIError; filep:POCIFileObject):sword;cdecl;
+
+   OCIFileGetLength : function (hndl:Pdvoid; err:POCIError; filename:POraText; path:POraText; lenp:Pubig_ora):sword;cdecl;
+
+   OCIFileInit : function (hndl:Pdvoid; err:POCIError):sword;cdecl;
+
+   OCIFileOpen : function (hndl:Pdvoid; err:POCIError; var filep:POCIFileObject; filename:POraText; path:POraText;
+             mode:ub4; create:ub4; _type:ub4):sword;cdecl;
+
+   OCIFileRead : function (hndl:Pdvoid; err:POCIError; filep:POCIFileObject; bufp:Pdvoid; bufl:ub4;
+             bytesread:Pub4):sword;cdecl;
+
+   OCIFileSeek : function (hndl:Pdvoid; err:POCIError; filep:POCIFileObject; origin:uword; offset:ubig_ora;
+             dir:sb1):sword;cdecl;
+
+   OCIFileTerm : function (hndl:Pdvoid; err:POCIError):sword;cdecl;
+
+   OCIFileWrite : function (hndl:Pdvoid; err:POCIError; filep:POCIFileObject; bufp:Pdvoid; buflen:ub4;
+             byteswritten:Pub4):sword;cdecl;
+
+{$ifdef ORAXB8_DEFINED}
+
+   OCILobCopy2 : function (svchp:POCISvcCtx; errhp:POCIError; dst_locp:POCILobLocator; src_locp:POCILobLocator; amount:oraub8;
+             dst_offset:oraub8; src_offset:oraub8):sword;cdecl;
+
+   OCILobErase2 : function (svchp:POCISvcCtx; errhp:POCIError; locp:POCILobLocator; amount:Poraub8; offset:oraub8):sword;cdecl;
+
+   OCILobGetLength2 : function (svchp:POCISvcCtx; errhp:POCIError; locp:POCILobLocator; lenp:Poraub8):sword;cdecl;
+
+   OCILobLoadFromFile2 : function (svchp:POCISvcCtx; errhp:POCIError; dst_locp:POCILobLocator; src_filep:POCILobLocator; amount:oraub8;
+             dst_offset:oraub8; src_offset:oraub8):sword;cdecl;
+
+   OCILobRead2 : function (svchp:POCISvcCtx; errhp:POCIError; locp:POCILobLocator; byte_amtp:Poraub8; char_amtp:Poraub8;
+             offset:oraub8; bufp:Pdvoid; bufl:oraub8; piece:ub1; ctxp:Pdvoid;
+             cbfp:OCICallbackLobRead2; csid:ub2; csfrm:ub1):sword;cdecl;
+
+   OCILobArrayRead : function (svchp:POCISvcCtx; errhp:POCIError; array_iter:Pub4; lobp_arr:PPOCILobLocator; byte_amt_arr:Poraub8;
+             char_amt_arr:Poraub8; offset_arr:Poraub8; bufp_arr:PPdvoid; bufl_arr:Poraub8; piece:ub1;
+             ctxp:Pdvoid; cbfp:OCICallbackLobArrayRead; csid:ub2; csfrm:ub1):sword;cdecl;
+
+   OCILobTrim2 : function (svchp:POCISvcCtx; errhp:POCIError; locp:POCILobLocator; newlen:oraub8):sword;cdecl;
+
+   OCILobWrite2 : function (svchp:POCISvcCtx; errhp:POCIError; locp:POCILobLocator; byte_amtp:Poraub8; char_amtp:Poraub8;
+             offset:oraub8; bufp:Pdvoid; buflen:oraub8; piece:ub1; ctxp:Pdvoid;
+             cbfp:OCICallbackLobWrite2; csid:ub2; csfrm:ub1):sword;cdecl;
+
+   OCILobArrayWrite : function (svchp:POCISvcCtx; errhp:POCIError; array_iter:Pub4; lobp_arr:PPOCILobLocator; byte_amt_arr:Poraub8;
+             char_amt_arr:Poraub8; offset_arr:Poraub8; bufp_arr:PPdvoid; bufl_arr:Poraub8; piece:ub1;
+             ctxp:Pdvoid; cbfp:OCICallbackLobArrayWrite; csid:ub2; csfrm:ub1):sword;cdecl;
+
+   OCILobWriteAppend2 : function (svchp:POCISvcCtx; errhp:POCIError; lobp:POCILobLocator; byte_amtp:Poraub8; char_amtp:Poraub8;
+             bufp:Pdvoid; bufl:oraub8; piece:ub1; ctxp:Pdvoid; cbfp:OCICallbackLobWrite2;
+             csid:ub2; csfrm:ub1):sword;cdecl;
+
+   OCILobGetStorageLimit : function (svchp:POCISvcCtx; errhp:POCIError; lobp:POCILobLocator; limitp:Poraub8):sword;cdecl;
+
+{$endif}
+  {
+   ** Initialize the security package
+    }
+
+   OCISecurityInitialize : function (sechandle:POCISecurity; error_handle:POCIError):sword;cdecl;
+
+   OCISecurityTerminate : function (sechandle:POCISecurity; error_handle:POCIError):sword;cdecl;
+
+   OCISecurityOpenWallet : function (osshandle:POCISecurity; error_handle:POCIError; wrllen:size_t; wallet_resource_locator:POraText; pwdlen:size_t;
+             password:POraText; wallet:PnzttWallet):sword;cdecl;
+
+   OCISecurityCloseWallet : function (osshandle:POCISecurity; error_handle:POCIError; wallet:PnzttWallet):sword;cdecl;
+
+   OCISecurityCreateWallet : function (osshandle:POCISecurity; error_handle:POCIError; wrllen:size_t; wallet_resource_locator:POraText; pwdlen:size_t;
+             password:POraText; wallet:PnzttWallet):sword;cdecl;
+
+   OCISecurityDestroyWallet : function (osshandle:POCISecurity; error_handle:POCIError; wrllen:size_t; wallet_resource_locator:POraText; pwdlen:size_t;
+             password:POraText):sword;cdecl;
+
+   OCISecurityStorePersona : function (osshandle:POCISecurity; error_handle:POCIError; var persona:PnzttPersona; wallet:PnzttWallet):sword;cdecl;
+
+   OCISecurityOpenPersona : function (osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona):sword;cdecl;
+
+   OCISecurityClosePersona : function (osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona):sword;cdecl;
+
+   OCISecurityRemovePersona : function (osshandle:POCISecurity; error_handle:POCIError; var persona:PnzttPersona):sword;cdecl;
+
+   OCISecurityCreatePersona : function (osshandle:POCISecurity; error_handle:POCIError; identity_type:nzttIdentType; cipher_type:nzttCipherType; desc:PnzttPersonaDesc;
+             var persona:PnzttPersona):sword;cdecl;
+
+   OCISecuritySetProtection : function (osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; crypto_engine_function:nzttcef; data_unit_format:nztttdufmt;
+             protection_info:PnzttProtInfo):sword;cdecl;
+
+   OCISecurityGetProtection : function (osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; crypto_engine_function:nzttcef; data_unit_format_ptr:Pnztttdufmt;
+             protection_info:PnzttProtInfo):sword;cdecl;
+
+   OCISecurityRemoveIdentity : function (osshandle:POCISecurity; error_handle:POCIError; var identity_ptr:PnzttIdentity):sword;cdecl;
+
+   OCISecurityCreateIdentity : function (osshandle:POCISecurity; error_handle:POCIError; _type:nzttIdentType; desc:PnzttIdentityDesc; var identity_ptr:PnzttIdentity):sword;cdecl;
+
+   OCISecurityAbortIdentity : function (osshandle:POCISecurity; error_handle:POCIError; var identity_ptr:PnzttIdentity):sword;cdecl;
+
+   OCISecurityFreeIdentity : function (osshandle:POCISecurity; error_handle:POCIError; var identity_ptr:PnzttIdentity):sword;cdecl;
+
+   OCISecurityStoreTrustedIdentity : function (osshandle:POCISecurity; error_handle:POCIError; var identity_ptr:PnzttIdentity; persona:PnzttPersona):sword;cdecl;
+
+   OCISecuritySign : function (osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; signature_state:nzttces; input_length:size_t;
+             input:Pub1; buffer_block:PnzttBufferBlock):sword;cdecl;
+
+   OCISecuritySignExpansion : function (osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; inputlen:size_t; signature_length:Psize_t):sword;cdecl;
+
+   OCISecurityVerify : function (osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; signature_state:nzttces; siglen:size_t;
+             signature:Pub1; extracted_message:PnzttBufferBlock; verified:Pboolean; validated:Pboolean; var signing_party_identity:PnzttIdentity):sword;cdecl;
+
+   OCISecurityValidate : function (osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; identity:PnzttIdentity; validated:Pboolean):sword;cdecl;
+
+   OCISecuritySignDetached : function (osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; signature_state:nzttces; input_length:size_t;
+             input:Pub1; signature:PnzttBufferBlock):sword;cdecl;
+
+   OCISecuritySignDetExpansion : function (osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; input_length:size_t; required_buffer_length:Psize_t):sword;cdecl;
+
+   OCISecurityVerifyDetached : function (osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; signature_state:nzttces; data_length:size_t;
+             data:Pub1; siglen:size_t; signature:Pub1; verified:Pboolean; validated:Pboolean;
+             var signing_party_identity:PnzttIdentity):sword;cdecl;
+
+   OCISecurity_PKEncrypt : function (osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; number_of_recipients:size_t; recipient_list:PnzttIdentity;
+             encryption_state:nzttces; input_length:size_t; input:Pub1; encrypted_data:PnzttBufferBlock):sword;cdecl;
+
+   OCISecurityPKEncryptExpansion : function (osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; number_recipients:size_t; input_length:size_t;
+             buffer_length_required:Psize_t):sword;cdecl;
+
+   OCISecurityPKDecrypt : function (osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; encryption_state:nzttces; input_length:size_t;
+             input:Pub1; encrypted_data:PnzttBufferBlock):sword;cdecl;
+
+   OCISecurityEncrypt : function (osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; encryption_state:nzttces; input_length:size_t;
+             input:Pub1; encrypted_data:PnzttBufferBlock):sword;cdecl;
+
+   OCISecurityEncryptExpansion : function (osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; input_length:size_t; encrypted_data_length:Psize_t):sword;cdecl;
+
+   OCISecurityDecrypt : function (osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; decryption_state:nzttces; input_length:size_t;
+             input:Pub1; decrypted_data:PnzttBufferBlock):sword;cdecl;
+
+   OCISecurityEnvelope : function (osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; number_of_recipients:size_t; identity:PnzttIdentity;
+             encryption_state:nzttces; input_length:size_t; input:Pub1; enveloped_data:PnzttBufferBlock):sword;cdecl;
+
+   OCISecurityDeEnvelope : function (osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; decryption_state:nzttces; input_length:size_t;
+             input:Pub1; output_message:PnzttBufferBlock; verified:Pboolean; validated:Pboolean; var sender_identity:PnzttIdentity):sword;cdecl;
+
+   OCISecurityKeyedHash : function (osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; hash_state:nzttces; input_length:size_t;
+             input:Pub1; keyed_hash:PnzttBufferBlock):sword;cdecl;
+
+   OCISecurityKeyedHashExpansion : function (osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; input_length:size_t; required_buffer_length:Psize_t):sword;cdecl;
+
+   OCISecurityHash : function (osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; hash_state:nzttces; input:size_t;
+             input_length:Pub1; hash:PnzttBufferBlock):sword;cdecl;
+
+   OCISecurityHashExpansion : function (osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; input_length:size_t; required_buffer_length:Psize_t):sword;cdecl;
+
+   OCISecuritySeedRandom : function (osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; seed_length:size_t; seed:Pub1):sword;cdecl;
+
+   OCISecurityRandomBytes : function (osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; number_of_bytes_desired:size_t; random_bytes:PnzttBufferBlock):sword;cdecl;
+
+   OCISecurityRandomNumber : function (osshandle:POCISecurity; error_handle:POCIError; persona:PnzttPersona; random_number_ptr:Puword):sword;cdecl;
+
+   OCISecurityInitBlock : function (osshandle:POCISecurity; error_handle:POCIError; buffer_block:PnzttBufferBlock):sword;cdecl;
+
+   OCISecurityReuseBlock : function (osshandle:POCISecurity; error_handle:POCIError; buffer_block:PnzttBufferBlock):sword;cdecl;
+
+   OCISecurityPurgeBlock : function (osshandle:POCISecurity; error_handle:POCIError; buffer_block:PnzttBufferBlock):sword;cdecl;
+
+   OCISecuritySetBlock : function (osshandle:POCISecurity; error_handle:POCIError; flags_to_set:uword; buffer_length:size_t; used_buffer_length:size_t;
+             buffer:Pub1; buffer_block:PnzttBufferBlock):sword;cdecl;
+
+   OCISecurityGetIdentity : function (osshandle:POCISecurity; error_handle:POCIError; namelen:size_t; distinguished_name:POraText; var identity:PnzttIdentity):sword;cdecl;
+
+   OCIAQEnq : function (svchp:POCISvcCtx; errhp:POCIError; queue_name:POraText; enqopt:POCIAQEnqOptions; msgprop:POCIAQMsgProperties;
+             payload_tdo:POCIType; payload:PPdvoid; payload_ind:PPdvoid; var msgid:POCIRaw; flags:ub4):sword;cdecl;
+
+   OCIAQDeq : function (svchp:POCISvcCtx; errhp:POCIError; queue_name:POraText; deqopt:POCIAQDeqOptions; msgprop:POCIAQMsgProperties;
+             payload_tdo:POCIType; payload:PPdvoid; payload_ind:PPdvoid; var msgid: POCIRaw; flags:ub4):sword;cdecl;
+
+   OCIAQEnqArray : function (svchp:POCISvcCtx; errhp:POCIError; queue_name:POraText; enqopt:POCIAQEnqOptions; iters:Pub4;
+             var msgprop:POCIAQMsgProperties; payload_tdo:POCIType; payload:PPdvoid; payload_ind:PPdvoid; var msgid:POCIRaw;
+             ctxp:Pdvoid; enqcbfp:OCICallbackAQEnq; flags:ub4):sword;cdecl;
+
+   OCIAQDeqArray : function (svchp:POCISvcCtx; errhp:POCIError; queue_name:POraText; deqopt:POCIAQDeqOptions; iters:Pub4;
+             var msgprop:POCIAQMsgProperties; payload_tdo:POCIType; payload:PPdvoid; payload_ind:PPdvoid; var msgid:POCIRaw;
+             ctxp:Pdvoid; deqcbfp:OCICallbackAQDeq; flags:ub4):sword;cdecl;
+
+   OCIAQListen : function (svchp:POCISvcCtx; errhp:POCIError; var agent_list:POCIAQAgent; num_agents:ub4; wait:sb4;
+             var agent:POCIAQAgent; flags:ub4):sword;cdecl;
+
+   OCIAQListen2 : function (svchp:POCISvcCtx; errhp:POCIError; var agent_list:POCIAQAgent; num_agents:ub4; lopts:POCIAQListenOpts;
+             var agent:POCIAQAgent; lmops:POCIAQLisMsgProps; flags:ub4):sword;cdecl;
+
+   OCIExtractInit : function (hndl:Pdvoid; err:POCIError):sword;cdecl;
+
+   OCIExtractTerm : function (hndl:Pdvoid; err:POCIError):sword;cdecl;
+
+   OCIExtractReset : function (hndl:Pdvoid; err:POCIError):sword;cdecl;
+
+   OCIExtractSetNumKeys : function (hndl:Pdvoid; err:POCIError; numkeys:uword):sword;cdecl;
+
+   OCIExtractSetKey : function (hndl:Pdvoid; err:POCIError; name:POraText; _type:ub1; flag:ub4;
+             defval:Pdvoid; intrange:Psb4; var strlist:POraText):sword;cdecl;
+
+   OCIExtractFromFile : function (hndl:Pdvoid; err:POCIError; flag:ub4; filename:POraText):sword;cdecl;
+
+   OCIExtractFromStr : function (hndl:Pdvoid; err:POCIError; flag:ub4; input:POraText):sword;cdecl;
+
+   OCIExtractToInt : function (hndl:Pdvoid; err:POCIError; keyname:POraText; valno:uword; retval:Psb4):sword;cdecl;
+
+   OCIExtractToBool : function (hndl:Pdvoid; err:POCIError; keyname:POraText; valno:uword; retval:Pub1):sword;cdecl;
+
+   OCIExtractToStr : function (hndl:Pdvoid; err:POCIError; keyname:POraText; valno:uword; retval:POraText;
+             buflen:uword):sword;cdecl;
+
+   OCIExtractToOCINum : function (hndl:Pdvoid; err:POCIError; keyname:POraText; valno:uword; retval:POCINumber):sword;cdecl;
+
+   OCIExtractToList : function (hndl:Pdvoid; err:POCIError; numkeys:Puword):sword;cdecl;
+
+   OCIExtractFromList : function (hndl:Pdvoid; err:POCIError; index:uword; var name:POraText; _type:Pub1;
+             numvals:Puword; values:PPPdvoid):sword;cdecl;
+
+  { Memory Related Service Interfaces  }
+   OCIMemoryAlloc : function (hdl:Pdvoid; err:POCIError; mem:PPdvoid; dur:OCIDuration; size:ub4;
+             flags:ub4):sword;cdecl;
+
+   OCIMemoryResize : function (hdl:Pdvoid; err:POCIError; mem:PPdvoid; newsize:ub4; flags:ub4):sword;cdecl;
+
+   OCIMemoryFree : function (hdl:Pdvoid; err:POCIError; mem:Pdvoid):sword;cdecl;
+
+   OCIContextSetValue : function (hdl:Pdvoid; err:POCIError; duration:OCIDuration; key:Pub1; keylen:ub1;
+             ctx_value:Pdvoid):sword;cdecl;
+
+   OCIContextGetValue : function (hdl:Pdvoid; err:POCIError; key:Pub1; keylen:ub1; ctx_value:PPdvoid):sword;cdecl;
+
+   OCIContextClearValue : function (hdl:Pdvoid; err:POCIError; key:Pub1; keylen:ub1):sword;cdecl;
+
+   OCIContextGenerateKey : function (hdl:Pdvoid; err:POCIError; key:Pub4):sword;cdecl;
+
+   OCIMemorySetCurrentIDs : function (hdl:Pdvoid; err:POCIError; curr_session_id:ub4; curr_trans_id:ub4; curr_stmt_id:ub4):sword;cdecl;
+
+   OCIPicklerTdsCtxInit : function (env:POCIEnv; err:POCIError; var tdsc:POCIPicklerTdsCtx):sword;cdecl;
+
+   OCIPicklerTdsCtxFree : function (env:POCIEnv; err:POCIError; tdsc:POCIPicklerTdsCtx):sword;cdecl;
+
+   OCIPicklerTdsInit : function (env:POCIEnv; err:POCIError; tdsc:POCIPicklerTdsCtx; var tdsh:POCIPicklerTds):sword;cdecl;
+
+   OCIPicklerTdsFree : function (env:POCIEnv; err:POCIError; tdsh:POCIPicklerTds):sword;cdecl;
+
+   OCIPicklerTdsCreateElementNumber : function (env:POCIEnv; err:POCIError; tdsh:POCIPicklerTds; prec:ub1; scale:sb1;
+             elt:POCIPicklerTdsElement):sword;cdecl;
+
+   OCIPicklerTdsCreateElementChar : function (env:POCIEnv; err:POCIError; tdsh:POCIPicklerTds; len:ub2; elt:POCIPicklerTdsElement):sword;cdecl;
+
+   OCIPicklerTdsCreateElementVarchar : function (env:POCIEnv; err:POCIError; tdsh:POCIPicklerTds; len:ub2; elt:POCIPicklerTdsElement):sword;cdecl;
+
+   OCIPicklerTdsCreateElementRaw : function (env:POCIEnv; err:POCIError; tdsh:POCIPicklerTds; len:ub2; elt:POCIPicklerTdsElement):sword;cdecl;
+
+   OCIPicklerTdsCreateElement : function (env:POCIEnv; err:POCIError; tdsh:POCIPicklerTds; dty:OCITypeCode; elt:POCIPicklerTdsElement):sword;cdecl;
+
+   OCIPicklerTdsAddAttr : function (env:POCIEnv; err:POCIError; tdsh:POCIPicklerTds; elt:OCIPicklerTdsElement):sword;cdecl;
+
+   OCIPicklerTdsGenerate : function (env:POCIEnv; err:POCIError; tdsh:POCIPicklerTds):sword;cdecl;
+
+   OCIPicklerTdsGetAttr : function (env:POCIEnv; err:POCIError; tdsh:POCIPicklerTds; attrno:ub1; typ:POCITypeCode;
+             len:Pub2):sword;cdecl;
+
+   OCIPicklerFdoInit : function (env:POCIEnv; err:POCIError; var fdoh:POCIPicklerFdo):sword;cdecl;
+
+   OCIPicklerFdoFree : function (env:POCIEnv; err:POCIError; fdoh:POCIPicklerFdo):sword;cdecl;
+
+   OCIPicklerImageInit : function (env:POCIEnv; err:POCIError; fdoh:POCIPicklerFdo; tdsh:POCIPicklerTds; var imgh:POCIPicklerImage):sword;cdecl;
+
+   OCIPicklerImageFree : function (env:POCIEnv; err:POCIError; imgh:POCIPicklerImage):sword;cdecl;
+
+   OCIPicklerImageAddScalar : function (env:POCIEnv; err:POCIError; imgh:POCIPicklerImage; scalar:Pdvoid; len:ub4):sword;cdecl;
+
+   OCIPicklerImageAddNullScalar : function (env:POCIEnv; err:POCIError; imgh:POCIPicklerImage):sword;cdecl;
+
+   OCIPicklerImageGenerate : function (env:POCIEnv; err:POCIError; imgh:POCIPicklerImage):sword;cdecl;
+
+   OCIPicklerImageGetScalarSize : function (env:POCIEnv; err:POCIError; imgh:POCIPicklerImage; attrno:ub4; size:Pub4):sword;cdecl;
+
+   OCIPicklerImageGetScalar : function (env:POCIEnv; err:POCIError; imgh:POCIPicklerImage; attrno:ub4; buf:Pdvoid;
+             len:Pub4; ind:POCIInd):sword;cdecl;
+
+   OCIPicklerImageCollBegin : function (env:POCIEnv; err:POCIError; imgh:POCIPicklerImage; colltdsh:POCIPicklerTds):sword;cdecl;
+
+   OCIPicklerImageCollAddScalar : function (env:POCIEnv; err:POCIError; imgh:POCIPicklerImage; scalar:Pdvoid; buflen:ub4;
+             ind:OCIInd):sword;cdecl;
+
+   OCIPicklerImageCollEnd : function (env:POCIEnv; err:POCIError; imgh:POCIPicklerImage):sword;cdecl;
+
+  { should take svcctx for locator stuff  }
+   OCIPicklerImageCollBeginScan : function (env:POCIEnv; err:POCIError; imgh:POCIPicklerImage; coll_tdsh:POCIPicklerTds; attrnum:ub4;
+             startidx:ub4; ind:POCIInd):sword;cdecl;
+
+   OCIPicklerImageCollGetScalarSize : function (env:POCIEnv; err:POCIError; coll_tdsh:POCIPicklerTds; size:Pub4):sword;cdecl;
+
+   OCIPicklerImageCollGetScalar : function (env:POCIEnv; err:POCIError; imgh:POCIPicklerImage; buf:Pdvoid; buflen:Pub4;
+             ind:POCIInd):sword;cdecl;
+
+   OCIAnyDataGetType : function (svchp:POCISvcCtx; errhp:POCIError; sdata:POCIAnyData; tc:POCITypeCode; var _type:POCIType):sword;cdecl;
+
+   OCIAnyDataIsNull : function (svchp:POCISvcCtx; errhp:POCIError; sdata:POCIAnyData; isnull:Pboolean):sword;cdecl;
+
+   OCIAnyDataConvert : function (svchp:POCISvcCtx; errhp:POCIError; tc:OCITypeCode; _type:POCIType; dur:OCIDuration;
+             ind:Pdvoid; data_val:Pdvoid; len:ub4; var sdata:POCIAnyData):sword;cdecl;
+
+   OCIAnyDataBeginCreate : function (svchp:POCISvcCtx; errhp:POCIError; tc:OCITypeCode; _type:POCIType; dur:OCIDuration;
+             var sdata:POCIAnyData):sword;cdecl;
+
+   OCIAnyDataDestroy : function (svchp:POCISvcCtx; errhp:POCIError; sdata:POCIAnyData):sword;cdecl;
+
+   OCIAnyDataAttrSet : function (svchp:POCISvcCtx; errhp:POCIError; sdata:POCIAnyData; tc:OCITypeCode; _type:POCIType;
+             ind:Pdvoid; attr_val:Pdvoid; length:ub4; is_any:boolean):sword;cdecl;
+
+   OCIAnyDataCollAddElem : function (svchp:POCISvcCtx; errhp:POCIError; sdata:POCIAnyData; tc:OCITypeCode; _type:POCIType;
+             ind:Pdvoid; attr_val:Pdvoid; length:ub4; is_any:boolean; last_elem:boolean):sword;cdecl;
+
+   OCIAnyDataEndCreate : function (svchp:POCISvcCtx; errhp:POCIError; sdata:POCIAnyData):sword;cdecl;
+
+   OCIAnyDataAccess : function (svchp:POCISvcCtx; errhp:POCIError; sdata:POCIAnyData; tc:OCITypeCode; _type:POCIType;
+             ind:Pdvoid; attr_val:Pdvoid; length:Pub4):sword;cdecl;
+
+   OCIAnyDataGetCurrAttrNum : function (svchp:POCISvcCtx; errhp:POCIError; sdata:POCIAnyData; attrnum:Pub4):sword;cdecl;
+
+   OCIAnyDataAttrGet : function (svchp:POCISvcCtx; errhp:POCIError; sdata:POCIAnyData; tc:OCITypeCode; _type:POCIType;
+             ind:Pdvoid; attr_val:Pdvoid; length:Pub4; is_any:boolean):sword;cdecl;
+
+   OCIAnyDataCollGetElem : function (svchp:POCISvcCtx; errhp:POCIError; sdata:POCIAnyData; tc:OCITypeCode; _type:POCIType;
+             ind:Pdvoid; celem_val:Pdvoid; length:Pub4; is_any:boolean):sword;cdecl;
+
+{$ENDIF}
+
+
+  {------------------------ OCIAnyDataSet interfaces ------------------------- }
+  {
+     NAME
+       OCIAnyDataSetBeginCreate - OCIAnyDataSet Begin Creation
+     PARAMETERS
+       svchp (IN/OUT) - The OCI service context.
+       errhp (IN/OUT) - The OCI error handle. If there is an error, it is
+                        recorded in errhp and this function returns OCI_ERROR.
+                        Diagnostic information can be obtained by calling
+                        OCIErrorGet().
+       typecode       - typecode corresponding to the OCIAnyDataSet.
+       type (IN)      - type corresponding to the OCIAnyDataSet. If the typecode
+                        corresponds to a built-in type (OCI_TYPECODE_NUMBER etc.)
+                        , this parameter can be NULL. It should be non NULL for
+                        user defined types (OCI_TYPECODE_OBJECT,
+                        OCI_TYPECODE_REF, collection types etc.)
+       dur (IN)       - duration for which OCIAnyDataSet is allocated.
+       data_set (OUT) - Initialized OCIAnyDataSet.
+       RETURNS        - error code
+     NOTES
+       This call allocates an OCIAnyDataSet for the duration of dur and
+       initializes it with the type information. The OCIAnyDataSet can hold
+       multiple instances of the given type. For performance reasons, the 
+       OCIAnyDataSet will end up pointing to the passed in OCIType parameter.
+       It is the responsibility of the caller to ensure that the OCIType is
+       longer lived (has allocation duration >= the duration of the OCIAnyData
+       if the OCIType is a transient one, allocation/pin duration >= duration of
+       the OCIAnyData if the OCIType is a persistent one).
+  
+   }
+{$IFNDEF LinkDynamically}
+  function OCIAnyDataSetBeginCreate(svchp:POCISvcCtx; errhp:POCIError; typecode:OCITypeCode; _type:POCIType; dur:OCIDuration;
+             var data_set:POCIAnyDataSet):sword;cdecl;external ocilib name 'OCIAnyDataSetBeginCreate';
+{$ELSE}
+  OCIAnyDataSetBeginCreate : function (svchp:POCISvcCtx; errhp:POCIError; typecode:OCITypeCode; _type:POCIType; dur:OCIDuration;
+             var data_set:POCIAnyDataSet):sword;cdecl;
+{$ENDIF}
+
+  {
+     NAME
+       OCIAnyDataSetDestroy  - OCIAnyDataSet Destroy
+     DESCRIPTION
+       This call frees the OCIAnyDataSet allocated using
+       OCIAnyDataSetBeginCreate().
+     RETURNS
+       error code.
+     PARAMETERS
+       svchp (IN/OUT)    - The OCI service context.
+       errhp (IN/OUT)    - The OCI Error handle.
+       data_set (IN/OUT) - OCIAnyDataSet to be freed.
+   }
+{$IFNDEF LinkDynamically}
+  function OCIAnyDataSetDestroy(svchp:POCISvcCtx; errhp:POCIError; data_set:POCIAnyDataSet):sword;cdecl;external ocilib name 'OCIAnyDataSetDestroy';
+{$ELSE}
+  OCIAnyDataSetDestroy : function (svchp:POCISvcCtx; errhp:POCIError; data_set:POCIAnyDataSet):sword;cdecl;
+{$ENDIF}
+
+  {
+     NAME
+       OCIAnyDataSetAddInstance - OCIAnyDataSet Add an instance
+     DESCRIPTION
+       This call adds a new skeleton instance to the OCIAnyDataSet and all the
+       attributes of the instance are set to NULL. It returns this skeleton
+       instance through the OCIAnyData parameter which can be constructed
+       subsequently by invoking the OCIAnyData API.
+     RETURNS
+       error code.
+     PARAMETERS
+       svchp (IN/OUT)      - The OCI service context.
+       errhp (IN/OUT)      - The OCI Error handle.
+       data_set (IN/OUT)   - OCIAnyDataSet to which a new instance is added.
+       data (IN/OUT)       - OCIAnyData corresponding to the newly added
+                             instance. If (*data) is NULL, a new OCIAnyData will
+                             be allocated for same duration as the OCIAnyDataSet.
+                             If (*data) is not NULL, it will get reused. This
+                             OCIAnyData can be subseqently constructed using the
+                             OCIAnyDataConvert() call or it can be constructed
+                             piece-wise using the OCIAnyDataAttrSet and
+                             OCIAnyDataCollAddElem calls.
+     NOTES
+       No Destruction of the old value is done here. It is the responsibility of
+       the caller to destroy the old value pointed to by (*data) and set (*data)
+       to a null pointer before beginning to make a sequence of this call. No
+       deep copying (of OCIType information nor the data part.) is done in the
+       returned OCIAnyData. This OCIAnyData cannot be used beyond the allocation
+       duration of the OCIAnyDataSet (it is like a reference into the
+       OCIAnyDataSet). The returned OCIAnyData can be reused on subsequent calls
+       to this function, to sequentially add new data instances to the
+       OCIAnyDataSet.
+   }
+{$IFNDEF LinkDynamically}
+  function OCIAnyDataSetAddInstance(svchp:POCISvcCtx; errhp:POCIError; data_set:POCIAnyDataSet; var data:POCIAnyData):sword;cdecl;external ocilib name 'OCIAnyDataSetAddInstance';
+{$ELSE}
+  OCIAnyDataSetAddInstance : function (svchp:POCISvcCtx; errhp:POCIError; data_set:POCIAnyDataSet; var data:POCIAnyData):sword;cdecl;
+{$ENDIF}
+
+  {
+     NAME
+       OCIAnyDataSetEndCreate - OCIAnyDataSet End Creation process.
+     DESCRIPTION
+       This call marks the end of OCIAnyDataSet creation. It should be called
+       after constructing all of its instance(s).
+     RETURNS
+       error code.
+     PARAMETERS
+       svchp (IN/OUT)        - The OCI service context.
+       errhp (IN/OUT)        - The OCI error handle. If there is an error, it is
+                               recorded in errhp and this function returns
+                               OCI_ERROR. Diagnostic information can be obtained
+                               by calling OCIErrorGet().
+       data_set (IN/OUT)     - OCIAnyDataSet that has been fully constructed.
+   }
+{$IFNDEF LinkDynamically}
+  function OCIAnyDataSetEndCreate(svchp:POCISvcCtx; errhp:POCIError; data_set:POCIAnyDataSet):sword;cdecl;external ocilib name 'OCIAnyDataSetEndCreate';
+{$ELSE}
+  OCIAnyDataSetEndCreate : function (svchp:POCISvcCtx; errhp:POCIError; data_set:POCIAnyDataSet):sword;cdecl;
+{$ENDIF}
+
+  {
+     NAME
+       OCIAnyDataSetGetType - OCIAnyDataSet Get Type of an OCIAnyDataSet
+     DESCRIPTION
+       Gets the Type corresponding to an OCIAnyDataSet. It returns the actual
+       pointer to the type maintained inside an OCIAnyDataSet. No copying is
+       done for performance reasons. The client is responsible for not using
+       this type once the OCIAnyDataSet is freed (or its duration ends).
+     RETURNS
+       error code.
+     PARAMETERS
+       svchp (IN/OUT)      - The OCI service context.
+       errhp (IN/OUT)      - The OCI Error handle.
+       data_set (IN)       - Initialized OCIAnyDataSet.
+       tc (OUT)            - The typecode of the type.
+       type (OUT)          - The type corresponding to the OCIAnyDataSet. This
+                             could be null if the OCIAnyData corresponds to a
+                             built-in type.
+   }
+{$IFNDEF LinkDynamically}
+  function OCIAnyDataSetGetType(svchp:POCISvcCtx; errhp:POCIError; data_set:POCIAnyDataSet; tc:POCITypeCode; var _type:POCIType):sword;cdecl;external ocilib name 'OCIAnyDataSetGetType';
+{$ELSE}
+  OCIAnyDataSetGetType : function (svchp:POCISvcCtx; errhp:POCIError; data_set:POCIAnyDataSet; tc:POCITypeCode; var _type:POCIType):sword;cdecl;
+{$ENDIF}
+
+  {
+    NAME
+      OCIAnyDataSetGetCount - OCIAnyDataSet Get Count of instances.
+    DESCRIPTION
+      This call gets the number of instances in the OCIAnyDataSet.
+    RETURNS
+      error code.
+    PARAMETERS
+      svchp (IN/OUT)      - OCI Service Context
+      errhp (IN/OUT)      - OCI Error handle
+      data_set (IN)       - Well formed OCIAnyDataSet.
+      count (OUT)         - number of instances in OCIAnyDataSet
+   }
+{$IFNDEF LinkDynamically}
+  function OCIAnyDataSetGetCount(svchp:POCISvcCtx; errhp:POCIError; data_set:POCIAnyDataSet; count:Pub4):sword;cdecl;external ocilib name 'OCIAnyDataSetGetCount';
+{$ELSE}
+  OCIAnyDataSetGetCount : function (svchp:POCISvcCtx; errhp:POCIError; data_set:POCIAnyDataSet; count:Pub4):sword;cdecl;
+{$ENDIF}
+
+  {
+    NAME
+      OCIAnyDataSetGetInstance - OCIAnyDataSet Get next instance.
+    DESCRIPTION
+      Only sequential access to the instances in an OCIAnyDataSet is allowed.
+      This call returns the OCIAnyData corresponding to an instance at the
+      current position and updates the current position. Subsequently, the
+      OCIAnyData access routines may be used to access the instance.
+    RETURNS
+      error code. Returns OCI_NO_DATA if the current position is at the end of
+      the set, OCI_SUCCESS otherwise.
+    PARAMETERS
+      svchp (IN/OUT)      - OCI Service Context
+      errhp (IN/OUT)      - OCI Error handle
+      data_set (IN)       - Well formed OCIAnyDataSet
+      data (IN/OUT)       - OCIAnyData corresponding to the instance. If (*data)
+                            is NULL, a new OCIAnyData will be allocated for same
+                            duration as the OCIAnyDataSet. If (*data) is not NULL
+                            , it will get reused. This OCIAnyData can be
+                            subsequently accessed using the OCIAnyDataAccess()
+                            call or piece-wise by using the OCIAnyDataAttrGet()
+                            call.
+    NOTE
+      No Destruction of the old value is done here. It is the responsibility of
+      the caller to destroy the old value pointed to by (*data) and set (*data)
+      to a null pointer before beginning to make a sequence of this call. No deep
+      copying (of OCIType information nor the data part.) is done in the returned
+      OCIAnyData. This OCIAnyData cannot be used beyond the allocation duration
+      of the OCIAnyDataSet (it is like a reference into the OCIAnyDataSet). The
+      returned OCIAnyData can be reused on subsequent calls to this function to
+      sequentially access the OCIAnyDataSet.
+   }
+{$IFNDEF LinkDynamically}
+  function OCIAnyDataSetGetInstance(svchp:POCISvcCtx; errhp:POCIError; data_set:POCIAnyDataSet; var data:POCIAnyData):sword;cdecl;external ocilib name 'OCIAnyDataSetGetInstance';
+{$ELSE}
+  OCIAnyDataSetGetInstance : function (svchp:POCISvcCtx; errhp:POCIError; data_set:POCIAnyDataSet; var data:POCIAnyData):sword;cdecl;
+{$ENDIF}
+
+  {--------------------- End of OCIAnyDataSet interfaces --------------------- }
+{$IFNDEF LinkDynamically}
+  function OCIFormatInit(hndl:Pdvoid; err:POCIError):sword;cdecl;external ocilib name 'OCIFormatInit';
+
+//  function OCIFormatString(hndl:Pdvoid; err:POCIError; buffer:POraText; bufferLength:sbig_ora; returnLength:Psbig_ora;
+//             formatString:POraText; args:array of const):sword;cdecl;external ocilib name 'OCIFormatString';
+
+  function OCIFormatString(hndl:Pdvoid; err:POCIError; buffer:POraText; bufferLength:sbig_ora; returnLength:Psbig_ora; 
+             formatString:POraText):sword;cdecl;external ocilib name 'OCIFormatString';
+
+  function OCIFormatTerm(hndl:Pdvoid; err:POCIError):sword;cdecl;external ocilib name 'OCIFormatTerm';
+
+  function OCIFormatTUb1:sword;cdecl;external ocilib name 'OCIFormatTUb1';
+
+  function OCIFormatTUb2:sword;cdecl;external ocilib name 'OCIFormatTUb2';
+
+  function OCIFormatTUb4:sword;cdecl;external ocilib name 'OCIFormatTUb4';
+
+  function OCIFormatTUword:sword;cdecl;external ocilib name 'OCIFormatTUword';
+
+  function OCIFormatTUbig_ora:sword;cdecl;external ocilib name 'OCIFormatTUbig_ora';
+
+  function OCIFormatTSb1:sword;cdecl;external ocilib name 'OCIFormatTSb1';
+
+  function OCIFormatTSb2:sword;cdecl;external ocilib name 'OCIFormatTSb2';
+
+  function OCIFormatTSb4:sword;cdecl;external ocilib name 'OCIFormatTSb4';
+
+  function OCIFormatTSword:sword;cdecl;external ocilib name 'OCIFormatTSword';
+
+  function OCIFormatTSbig_ora:sword;cdecl;external ocilib name 'OCIFormatTSbig_ora';
+
+  function OCIFormatTEb1:sword;cdecl;external ocilib name 'OCIFormatTEb1';
+
+  function OCIFormatTEb2:sword;cdecl;external ocilib name 'OCIFormatTEb2';
+
+  function OCIFormatTEb4:sword;cdecl;external ocilib name 'OCIFormatTEb4';
+
+  function OCIFormatTEword:sword;cdecl;external ocilib name 'OCIFormatTEword';
+
+  function OCIFormatTChar:sword;cdecl;external ocilib name 'OCIFormatTChar';
+
+  function OCIFormatTText:sword;cdecl;external ocilib name 'OCIFormatTText';
+
+  function OCIFormatTDouble:sword;cdecl;external ocilib name 'OCIFormatTDouble';
+
+  function OCIFormatTDvoid:sword;cdecl;external ocilib name 'OCIFormatTDvoid';
+
+  function OCIFormatTEnd:sword;cdecl;external ocilib name 'OCIFormatTEnd';
+
+{$ELSE}
+  OCIFormatInit : function (hndl:Pdvoid; err:POCIError):sword;cdecl;
+//  function OCIFormatString(hndl:Pdvoid; err:POCIError; buffer:POraText; bufferLength:sbig_ora; returnLength:Psbig_ora;
+//             formatString:POraText; args:array of const):sword;cdecl;external ocilib name 'OCIFormatString';
+
+  OCIFormatString : function (hndl:Pdvoid; err:POCIError; buffer:POraText; bufferLength:sbig_ora; returnLength:Psbig_ora;
+             formatString:POraText):sword;cdecl;
+
+  OCIFormatTerm : function (hndl:Pdvoid; err:POCIError):sword;cdecl;
+
+   OCIFormatTUb1: function : sword;cdecl;
+
+   OCIFormatTUb2: function : sword;cdecl;
+
+   OCIFormatTUb4: function :sword;cdecl;
+
+   OCIFormatTUword: function :sword;cdecl;
+
+   OCIFormatTUbig_ora: function :sword;cdecl;
+
+   OCIFormatTSb1: function :sword;cdecl;
+
+   OCIFormatTSb2: function :sword;cdecl;
+
+   OCIFormatTSb4: function :sword;cdecl;
+
+   OCIFormatTSword: function :sword;cdecl;
+
+   OCIFormatTSbig_ora: function :sword;cdecl;
+
+   OCIFormatTEb1: function :sword;cdecl;
+
+   OCIFormatTEb2: function :sword;cdecl;
+
+   OCIFormatTEb4: function :sword;cdecl;
+
+   OCIFormatTEword: function :sword;cdecl;
+
+   OCIFormatTChar: function :sword;cdecl;
+
+   OCIFormatTText: function :sword;cdecl;
+
+   OCIFormatTDouble: function :sword;cdecl;
+
+   OCIFormatTDvoid: function :sword;cdecl;
+
+   OCIFormatTEnd: function :sword;cdecl;
+
+{$ENDIF}
+
+
+  {-------------------------- Extensions to XA interface --------------------- }
+  { ------------------------- xaosvch ---------------------------------------- }
+  {
+     NAME
+       xaosvch  -  XA Oracle get SerViCe Handle
+     DESCRIPTION
+       Given a database name return the service handle that is used by the
+       XA library
+     NOTE
+       This macro has been provided for backward compatibilty with 8.0.2
+   }
+{$IFNDEF LinkDynamically}
+  function xaosvch(dbname:POraText):POCISvcCtx;cdecl;external ocilib name 'xaosvch';
+{$ELSE}
+  xaosvch : function (dbname:POraText):POCISvcCtx;cdecl;
+{$ENDIF}
+
+  { ------------------------- xaoSvcCtx -------------------------------------- }
+  {
+     NAME
+       xaoSvcCtx  -  XA Oracle get SerViCe ConTeXt
+     DESCRIPTION
+       Given a database name return the service handle that is used by the
+       XA library
+     NOTE
+       This routine has been provided for APs to get access to the service
+       handle that XA library uses. Without this routine APs must use SQLLIB
+       routine sqlld2 to get access to the Logon data area registered by the
+       XA library
+   }
+{$IFNDEF LinkDynamically}
+  function xaoSvcCtx(dbname:POraText):POCISvcCtx;cdecl;external ocilib name 'xaoSvcCtx';
+{$ELSE}
+  xaoSvcCtx : function (dbname:POraText):POCISvcCtx;cdecl;
+{$ENDIF}
+
+  { ------------------------- xaoEnv ----------------------------------------- }
+  {
+     NAME
+       xaoEnv  -  XA Oracle get ENvironment Handle
+     DESCRIPTION
+       Given a database name return the environment handle that is used by the
+       XA library
+     NOTE
+       This routine has been provided for APs to get access to the environment
+       handle that XA library uses. Without this routine APs must use SQLLIB
+       routine sqlld2 to get access to the Logon data area registered by the
+       XA library
+   }
+{$IFNDEF LinkDynamically}
+  function xaoEnv(dbname:POraText):POCIEnv;cdecl;external ocilib name 'xaoEnv';
+{$ELSE}
+  xaoEnv : function (dbname:POraText):POCIEnv;cdecl;
+{$ENDIF}
+
+  { ------------------------- xaosterr --------------------------------------- }
+  {
+     NAME
+       xaosterr  -  XA Oracle get xa STart ERRor code
+     DESCRIPTION
+       Given an oracle error code return the XA error code
+    }
+{$IFNDEF LinkDynamically}
+  function xaosterr(svch:POCISvcCtx; error:sb4):longint;cdecl;external ocilib name 'xaosterr';
+{$ELSE}
+  xaosterr : function (svch:POCISvcCtx; error:sb4):longint;cdecl;
+{$ENDIF}
+
+  {-------------------------- End Extensions --------------------------------- }
+  {---------------------- Extensions to NLS cartridge service ---------------- }
+  { ----------------------- OCINlsGetInfo ------------------------------------ }
+  {
+     NAME
+       OCINlsGetInfo - Get NLS info from OCI environment handle
+     REMARKS
+       This function generates language information specified by item from OCI 
+       environment handle envhp into an array pointed to by buf within size 
+       limitation as buflen.
+     RETURNS
+       OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR on wrong item.
+     envhp(IN/OUT)
+       OCI environment handle.
+     errhp(IN/OUT)
+       The OCI error handle. If there is an error, it is record in errhp and 
+       this function returns a NULL pointer. Diagnostic information can be 
+       obtained by calling OCIErrorGet().
+     buf(OUT)
+       Pointer to the destination buffer.
+     buflen(IN)
+       The size of destination buffer. The maximum length for each information
+       is 32 bytes.
+     item(IN)
+       It specifies to get which item in OCI environment handle and can be one
+       of following values:
+         OCI_NLS_DAYNAME1 : Native name for Monday.
+         OCI_NLS_DAYNAME2 : Native name for Tuesday.
+         OCI_NLS_DAYNAME3 : Native name for Wednesday.
+         OCI_NLS_DAYNAME4 : Native name for Thursday.
+         OCI_NLS_DAYNAME5 : Native name for Friday.
+         OCI_NLS_DAYNAME6 : Native name for for Saturday.
+         OCI_NLS_DAYNAME7 : Native name for for Sunday.
+         OCI_NLS_ABDAYNAME1 : Native abbreviated name for Monday.
+         OCI_NLS_ABDAYNAME2 : Native abbreviated name for Tuesday.
+         OCI_NLS_ABDAYNAME3 : Native abbreviated name for Wednesday.
+         OCI_NLS_ABDAYNAME4 : Native abbreviated name for Thursday.
+         OCI_NLS_ABDAYNAME5 : Native abbreviated name for Friday.
+         OCI_NLS_ABDAYNAME6 : Native abbreviated name for for Saturday.
+         OCI_NLS_ABDAYNAME7 : Native abbreviated name for for Sunday.
+         OCI_NLS_MONTHNAME1 : Native name for January.
+         OCI_NLS_MONTHNAME2 : Native name for February.
+         OCI_NLS_MONTHNAME3 : Native name for March.
+         OCI_NLS_MONTHNAME4 : Native name for April.
+         OCI_NLS_MONTHNAME5 : Native name for May.
+         OCI_NLS_MONTHNAME6 : Native name for June.
+         OCI_NLS_MONTHNAME7 : Native name for July.
+         OCI_NLS_MONTHNAME8 : Native name for August.
+         OCI_NLS_MONTHNAME9 : Native name for September.
+         OCI_NLS_MONTHNAME10 : Native name for October.
+         OCI_NLS_MONTHNAME11 : Native name for November.
+         OCI_NLS_MONTHNAME12 : Native name for December.
+         OCI_NLS_ABMONTHNAME1 : Native abbreviated name for January.
+         OCI_NLS_ABMONTHNAME2 : Native abbreviated name for February.
+         OCI_NLS_ABMONTHNAME3 : Native abbreviated name for March.
+         OCI_NLS_ABMONTHNAME4 : Native abbreviated name for April.
+         OCI_NLS_ABMONTHNAME5 : Native abbreviated name for May.
+         OCI_NLS_ABMONTHNAME6 : Native abbreviated name for June.
+         OCI_NLS_ABMONTHNAME7 : Native abbreviated name for July.
+         OCI_NLS_ABMONTHNAME8 : Native abbreviated name for August.
+         OCI_NLS_ABMONTHNAME9 : Native abbreviated name for September.
+         OCI_NLS_ABMONTHNAME10 : Native abbreviated name for October.
+         OCI_NLS_ABMONTHNAME11 : Native abbreviated name for November.
+         OCI_NLS_ABMONTHNAME12 : Native abbreviated name for December.
+         OCI_NLS_YES : Native string for affirmative response.
+         OCI_NLS_NO : Native negative response. 
+         OCI_NLS_AM : Native equivalent string of AM.
+         OCI_NLS_PM : Native equivalent string of PM.
+         OCI_NLS_AD : Native equivalent string of AD.
+         OCI_NLS_BC : Native equivalent string of BC.
+         OCI_NLS_DECIMAL : decimal character.
+         OCI_NLS_GROUP : group separator.
+         OCI_NLS_DEBIT : Native symbol of debit.
+         OCI_NLS_CREDIT : Native sumbol of credit.
+         OCI_NLS_DATEFORMAT : Oracle date format.
+         OCI_NLS_INT_CURRENCY: International currency symbol.
+         OCI_NLS_LOC_CURRENCY : Locale currency symbol.
+         OCI_NLS_LANGUAGE : Language name.
+         OCI_NLS_ABLANGUAGE : Abbreviation for language name.
+         OCI_NLS_TERRITORY : Territory name.
+         OCI_NLS_CHARACTER_SET : Character set name.
+         OCI_NLS_LINGUISTIC : Linguistic name.
+         OCI_NLS_CALENDAR : Calendar name.
+         OCI_NLS_DUAL_CURRENCY : Dual currency symbol.
+   }
+{$IFNDEF LinkDynamically}
+  function OCINlsGetInfo(envhp:Pdvoid; errhp:POCIError; buf:POraText; buflen:size_t; item:ub2):sword;cdecl;external ocilib name 'OCINlsGetInfo';
+{$ELSE}
+  OCINlsGetInfo : function (envhp:Pdvoid; errhp:POCIError; buf:POraText; buflen:size_t; item:ub2):sword;cdecl;
+{$ENDIF}
+
+  { ----------------------- OCINlsNumericInfoGet ----------------------------- }
+  {
+     NAME
+       OCINlsNumericInfoGet - Get NLS numeric info from OCI environment handle
+     REMARKS
+       This function generates numeric language information specified by item 
+       from OCI environment handle envhp into an output number variable.
+     RETURNS
+       OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR on wrong item.
+     envhp(IN/OUT)
+       OCI environment handle. If handle invalid, returns OCI_INVALID_HANDLE.
+     errhp(IN/OUT)
+       The OCI error handle. If there is an error, it is record in errhp and 
+       this function returns a NULL pointer. Diagnostic information can be 
+       obtained by calling OCIErrorGet().
+     val(OUT)
+       Pointer to the output number variable. On OCI_SUCCESS return, it will
+       contain the requested NLS numeric info.
+     item(IN)
+       It specifies to get which item in OCI environment handle and can be one
+       of following values:
+         OCI_NLS_CHARSET_MAXBYTESZ : Maximum character byte size for OCI
+                                     environment or session handle charset
+         OCI_NLS_CHARSET_FIXEDWIDTH: Character byte size for fixed-width charset;
+                                     0 for variable-width charset 
+   }
+{$IFNDEF LinkDynamically}
+  function OCINlsNumericInfoGet(envhp:Pdvoid; errhp:POCIError; val:Psb4; item:ub2):sword;cdecl;external ocilib name 'OCINlsNumericInfoGet';
+{$ELSE}
+  OCINlsNumericInfoGet : function (envhp:Pdvoid; errhp:POCIError; val:Psb4; item:ub2):sword;cdecl;
+{$ENDIF}
+
+  { ----------------------- OCINlsCharSetNameToId ---------------------------- }
+  {
+     NAME
+       OCINlsCharSetNameToId - Get Oracle charset id given Oracle charset name
+     REMARKS
+       This function will get the Oracle character set id corresponding to
+       the given Oracle character set name.
+     RETURNS
+       Oracle character set id for the given Oracle character set name if
+       character set name and OCI handle are valid; otherwise returns 0.
+     envhp(IN/OUT)
+       OCI environment handle.
+     name(IN)
+       Pointer to a null-terminated Oracle character set name whose id 
+       will be returned.
+   }
+{$IFNDEF LinkDynamically}
+  function OCINlsCharSetNameToId(envhp:Pdvoid; name:Poratext):ub2;cdecl;external ocilib name 'OCINlsCharSetNameToId';
+{$ELSE}
+  OCINlsCharSetNameToId : function (envhp:Pdvoid; name:Poratext):ub2;cdecl;
+{$ENDIF}
+
+  { ----------------------- OCINlsCharSetIdToName ---------------------------- }
+  {
+     NAME
+       OCINlsCharSetIdToName - Get Oracle charset name given Oracle charset id
+     REMARKS
+       This function will get the Oracle character set name corresponding to
+       the given Oracle character set id.
+     RETURNS
+       OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR
+     envhp(IN/OUT)
+       OCI environment handle. If handle invalid, returns OCI_INVALID_HANDLE.
+     buf(OUT)
+       Pointer to the destination buffer. On OCI_SUCCESS return, it will contain
+       the null-terminated string for character set name.
+     buflen(IN)
+       Size of destination buffer. Recommended size is OCI_NLS_MAXBUFSZ for
+       guarantee to store an Oracle character set name. If it's smaller than
+       the length of the character set name, the function will return OCI_ERROR.
+     id(IN)
+       Oracle character set id.
+   }
+{$IFNDEF LinkDynamically}
+  function OCINlsCharSetIdToName(envhp:Pdvoid; buf:Poratext; buflen:size_t; id:ub2):sword;cdecl;external ocilib name 'OCINlsCharSetIdToName';
+{$ELSE}
+  OCINlsCharSetIdToName : function (envhp:Pdvoid; buf:Poratext; buflen:size_t; id:ub2):sword;cdecl;
+{$ENDIF}
+
+  { ----------------------- OCINlsNameMap ------------------------------------ }
+  {
+     NAME
+       OCINlsNameMap - Map NLS naming from Oracle to other standards and vice 
+                       versa
+     REMARKS
+       This function will map NLS naming from Oracle to other standards (such
+       as ISO, IANA) and vice versa.
+     RETURNS
+       OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR
+     envhp(IN/OUT)
+       OCI environment handle. If handle invalid, returns OCI_INVALID_HANDLE.
+     buf(OUT)
+       Pointer to the destination buffer. On OCI_SUCCESS return, it will 
+       contain null-terminated string for requested mapped name.
+     buflen(IN)
+       The size of destination buffer. Recommended size is OCI_NLS_MAXBUFSZ
+       for guarantee to store an NLS name. If it is smaller than the length
+       of the name, the function will return OCI_ERROR.
+     srcbuf(IN)
+       Pointer to null-terminated NLS name. If it is not a valid name in its
+       define scope, the function will return OCI_ERROR.
+     flag(IN)
+       It specifies name mapping direction and can take the following values:
+         OCI_NLS_CS_IANA_TO_ORA : Map character set name from IANA to Oracle
+         OCI_NLS_CS_ORA_TO_IANA : Map character set name from Oracle to IANA
+         OCI_NLS_LANG_ISO_TO_ORA : Map language name from ISO to Oracle
+         OCI_NLS_LANG_ORA_TO_ISO : Map language name from Oracle to ISO
+         OCI_NLS_TERR_ISO_TO_ORA : Map territory name from ISO to Oracle
+         OCI_NLS_TERR_ORA_TO_ISO : Map territory name from Oracle to ISO
+         OCI_NLS_TERR_ISO3_TO_ORA : Map territory name from 3-letter ISO
+                                    abbreviation to Oracle
+         OCI_NLS_TERR_ORA_TO_ISO3 : Map territory name from Oracle to 3-letter
+                                    ISO abbreviation
+   }
+{$IFNDEF LinkDynamically}
+  function OCINlsNameMap(envhp:Pdvoid; buf:Poratext; buflen:size_t; srcbuf:Poratext; flag:ub4):sword;cdecl;external ocilib name 'OCINlsNameMap';
+{$ELSE}
+  OCINlsNameMap : function (envhp:Pdvoid; buf:Poratext; buflen:size_t; srcbuf:Poratext; flag:ub4):sword;cdecl;
+{$ENDIF}
+
+  { -------------------- OCIMultiByteToWideChar ------------------------------ }
+  {
+     NAME
+       OCIMultiByteToWideChar - Convert a null terminated multibyte string into 
+                                wchar
+     REMARKS
+       This routine converts an entire null-terminated string into the wchar 
+       format. The wchar output buffer will be null-terminated.
+     RETURNS
+       OCI_SUCCESS, OCI_INVALID_HANDLE or OCI_ERROR
+     envhp(IN/OUT)
+       OCI environment handle to determine the character set of string.
+     dst (OUT)
+       Destination buffer for wchar.
+     src (IN)
+       Source string to be converted.
+     rsize (OUT)
+       Number of characters converted including null-terminator.
+       If it is a NULL pointer, no number return
+   }
+{$IFNDEF LinkDynamically}
+  function OCIMultiByteToWideChar(envhp:Pdvoid; dst:POCIWchar; src:POraText; rsize:Psize_t):sword;cdecl;external ocilib name 'OCIMultiByteToWideChar';
+{$ELSE}
+  OCIMultiByteToWideChar : function (envhp:Pdvoid; dst:POCIWchar; src:POraText; rsize:Psize_t):sword;cdecl;
+{$ENDIF}
+
+  { --------------------- OCIMultiByteInSizeToWideChar ----------------------- }
+  {
+     NAME
+       OCIMultiByteInSizeToWideChar - Convert a mulitbyte string in length into
+                                      wchar
+     REMARKS
+       This routine converts part of string into the wchar format. It will
+       convert as many complete characters as it can until it reaches output
+       buffer size or input buffer size or it reaches a null-terminator in
+       source string. The output buffer will be null-terminated if space permits.
+       If dstsz is zero, this function will only return number of characters not
+       including ending null terminator for converted string.
+     RETURNS
+       OCI_SUCCESS, OCI_INVALID_HANDLE or OCI_ERROR
+     envhp(IN/OUT)
+       OCI environment handle to determine the character set of string.
+     dst (OUT)
+       Pointer to a destination buffer for wchar. It can be NULL pointer when
+       dstsz is zero.
+     dstsz(IN)
+       Destination buffer size in character. If it is zero, this function just
+       returns number of characters will be need for the conversion.
+     src (IN)
+       Source string to be converted.
+     srcsz(IN)
+       Length of source string in byte.
+     rsize(OUT)
+       Number of characters written into destination buffer, or number of
+       characters for converted string is dstsz is zero.
+       If it is NULL pointer, nothing to return.
+   }
+{$IFNDEF LinkDynamically}
+  function OCIMultiByteInSizeToWideChar(envhp:Pdvoid; dst:POCIWchar; dstsz:size_t; src:POraText; srcsz:size_t;
+             rsize:Psize_t):sword;cdecl;external ocilib name 'OCIMultiByteInSizeToWideChar';
+{$ELSE}
+  OCIMultiByteInSizeToWideChar : function (envhp:Pdvoid; dst:POCIWchar; dstsz:size_t; src:POraText; srcsz:size_t;
+             rsize:Psize_t):sword;cdecl;
+{$ENDIF}
+
+  { ---------------------- OCIWideCharToMultiByte ---------------------------- }
+  {
+     NAME
+       OCIWideCharToMultiByte - Convert a null terminated wchar string into
+                                multibyte
+     REMARKS
+       This routine converts an entire null-terminated wide character string into
+       multi-byte string. The output buffer will be null-terminated.
+     RETURNS
+       OCI_SUCCESS, OCI_INVALID_HANDLE or OCI_ERROR
+     envhp(IN/OUT)
+       OCI environment handle to determine the character set of string.
+     dst (OUT)
+       Destination buffer for multi-byte string.
+     src (IN)
+       Source wchar string to be converted.
+     rsize (OUT)
+       Number of bytes written into the destination buffer.
+       If it is NULL pointer, nothing to return.
+   }
+{$IFNDEF LinkDynamically}
+  function OCIWideCharToMultiByte(envhp:Pdvoid; dst:POraText; src:POCIWchar; rsize:Psize_t):sword;cdecl;external ocilib name 'OCIWideCharToMultiByte';
+{$ELSE}
+  OCIWideCharToMultiByte : function (envhp:Pdvoid; dst:POraText; src:POCIWchar; rsize:Psize_t):sword;cdecl;
+{$ENDIF}
+
+  { ---------------------- OCIWideCharInSizeToMultiByte ---------------------- }
+  {
+     NAME
+       OCIWideCharInSizeToMultiByte - Convert a wchar string in length into 
+                                      mulitbyte
+     REMARKS
+       This routine converts part of wchar string into the multi-byte format.
+       It will convert as many complete characters as it can until it reaches
+       output buffer size or input buffer size or it reaches a null-terminator
+       in source string. The output buffer will be null-terminated if space
+       permits. If dstsz is zero, the function just returns the size of byte not 
+       including ending null-terminator need to store the converted string.
+     RETURNS
+       OCI_SUCCESS, OCI_INVALID_HANDLE or OCI_ERROR
+     envhp(IN/OUT)
+       OCI environment handle to determine the character set of string.
+     dst (OUT)
+       Destination buffer for multi-byte. It can be NULL pointer if dstsz is
+       zero.
+     dstsz(IN)
+       Destination buffer size in byte. If it is zero, it just returns the size
+       of bytes need for converted string.
+     src (IN)
+       Source wchar string to be converted.
+     srcsz(IN)
+       Length of source string in character.
+     rsize(OUT)
+       Number of bytes written into destination buffer, or number of bytes need
+       to store the converted string if dstsz is zero.
+       If it is NULL pointer, nothing to return.
+   }
+{$IFNDEF LinkDynamically}
+  function OCIWideCharInSizeToMultiByte(envhp:Pdvoid; dst:POraText; dstsz:size_t; src:POCIWchar; srcsz:size_t;
+             rsize:Psize_t):sword;cdecl;external ocilib name 'OCIWideCharInSizeToMultiByte';
+{$ELSE}
+  OCIWideCharInSizeToMultiByte : function (envhp:Pdvoid; dst:POraText; dstsz:size_t; src:POCIWchar; srcsz:size_t;
+             rsize:Psize_t):sword;cdecl;
+{$ENDIF}
+
+  { ----------------------- OCIWideCharIsAlnum ------------------------------- }
+  {
+     NAME
+       OCIWideCharIsAlnum - test whether wc is a letter or decimal digit
+     REMARKS
+       It tests whether wc is a letter or decimal digit.
+     RETURNS
+       TRUE or FLASE.
+     envhp(IN/OUT)
+       OCI environment handle to determine the character set .
+     wc(IN)
+       Wchar for testing.
+   }
+{$IFNDEF LinkDynamically}
+  function OCIWideCharIsAlnum(envhp:Pdvoid; wc:OCIWchar):boolean;cdecl;external ocilib name 'OCIWideCharIsAlnum';
+{$ELSE}
+  OCIWideCharIsAlnum : function (envhp:Pdvoid; wc:OCIWchar):boolean;cdecl;
+{$ENDIF}
+
+  { ----------------------- OCIWideCharIsAlpha ------------------------------- }
+  {
+     NAME
+       OCIWideCharIsAlpha - test whether wc is an alphabetic letter
+     REMARKS
+       It tests whether wc is an alphabetic letter
+     RETURNS
+       TRUE or FLASE.
+     envhp(IN/OUT)
+       OCI environment handle to determine the character set .
+     wc(IN)
+       Wchar for testing.
+   }
+{$IFNDEF LinkDynamically}
+  function OCIWideCharIsAlpha(envhp:Pdvoid; wc:OCIWchar):boolean;cdecl;external ocilib name 'OCIWideCharIsAlpha';
+{$ELSE}
+  OCIWideCharIsAlpha : function (envhp:Pdvoid; wc:OCIWchar):boolean;cdecl;
+{$ENDIF}
+
+  { --------------------- OCIWideCharIsCntrl --------------------------------- }
+  {
+     NAME
+       OCIWideCharIsCntrl - test whether wc is a control character
+     REMARKS
+       It tests whether wc is a control character.
+     RETURNS
+       TRUE or FLASE.
+     envhp(IN/OUT)
+       OCI environment handle to determine the character set .
+     wc(IN)
+       Wchar for testing.
+   }
+{$IFNDEF LinkDynamically}
+  function OCIWideCharIsCntrl(envhp:Pdvoid; wc:OCIWchar):boolean;cdecl;external ocilib name 'OCIWideCharIsCntrl';
+{$ELSE}
+  OCIWideCharIsCntrl : function (envhp:Pdvoid; wc:OCIWchar):boolean;cdecl;
+{$ENDIF}
+
+  { ----------------------- OCIWideCharIsDigit ------------------------------- }
+  {
+     NAME
+       OCIWideCharIsDigit - test whether wc is a decimal digit character
+     REMARKS
+       It tests whether wc is a decimal digit character.
+     RETURNS
+       TRUE or FLASE.
+     envhp(IN/OUT)
+       OCI environment handle to determine the character set .
+     wc(IN)
+       Wchar for testing.
+   }
+{$IFNDEF LinkDynamically}
+  function OCIWideCharIsDigit(envhp:Pdvoid; wc:OCIWchar):boolean;cdecl;external ocilib name 'OCIWideCharIsDigit';
+{$ELSE}
+  OCIWideCharIsDigit : function (envhp:Pdvoid; wc:OCIWchar):boolean;cdecl;
+{$ENDIF}
+
+  { ----------------------- OCIWideCharIsGraph ------------------------------- }
+  {
+     NAME
+       OCIWideCharIsGraph - test whether wc is a graph character
+     REMARKS
+       It tests whether wc is a graph character. A graph character is character
+       with a visible representation and normally includes alphabetic letter,
+       decimal digit, and punctuation.
+     RETURNS
+       TRUE or FLASE.
+     envhp(IN/OUT)
+       OCI environment handle to determine the character set .
+     wc(IN)
+       Wchar for testing.
+   }
+{$IFNDEF LinkDynamically}
+  function OCIWideCharIsGraph(envhp:Pdvoid; wc:OCIWchar):boolean;cdecl;external ocilib name 'OCIWideCharIsGraph';
+{$ELSE}
+  OCIWideCharIsGraph : function (envhp:Pdvoid; wc:OCIWchar):boolean;cdecl;
+{$ENDIF}
+
+  { ----------------------- OCIWideCharIsLower ------------------------------- }
+  {
+     NAME
+       OCIWideCharIsLower - test whether wc is a lowercase letter
+     REMARKS
+       It tests whether wc is a lowercase letter.
+     RETURNS
+       TRUE or FLASE.
+     envhp(IN/OUT)
+       OCI environment handle to determine the character set .
+     wc(IN)
+       Wchar for testing.
+   }
+{$IFNDEF LinkDynamically}
+  function OCIWideCharIsLower(envhp:Pdvoid; wc:OCIWchar):boolean;cdecl;external ocilib name 'OCIWideCharIsLower';
+{$ELSE}
+  OCIWideCharIsLower : function (envhp:Pdvoid; wc:OCIWchar):boolean;cdecl;
+{$ENDIF}
+
+  { ----------------------- OCIWideCharIsPrint ------------------------------- }
+  {
+     NAME
+       OCIWideCharIsPrint - test whether wc is a printable character
+     REMARKS
+       It tests whether wc is a printable character.
+     RETURNS
+       TRUE or FLASE.
+     envhp(IN/OUT)
+       OCI environment handle to determine the character set .
+     wc(IN)
+       Wchar for testing.
+   }
+{$IFNDEF LinkDynamically}
+  function OCIWideCharIsPrint(envhp:Pdvoid; wc:OCIWchar):boolean;cdecl;external ocilib name 'OCIWideCharIsPrint';
+{$ELSE}
+  OCIWideCharIsPrint : function (envhp:Pdvoid; wc:OCIWchar):boolean;cdecl;
+{$ENDIF}
+
+  { ----------------------- OCIWideCharIsPunct ------------------------------- }
+  {
+     NAME
+       OCIWideCharIsPunct - test whether wc is a punctuation character
+     REMARKS
+       It tests whether wc is a punctuation character.
+     RETURNS
+       TRUE or FLASE.
+     envhp(IN/OUT)
+       OCI environment handle to determine the character set .
+     wc(IN)
+       Wchar for testing.
+   }
+{$IFNDEF LinkDynamically}
+  function OCIWideCharIsPunct(envhp:Pdvoid; wc:OCIWchar):boolean;cdecl;external ocilib name 'OCIWideCharIsPunct';
+{$ELSE}
+  OCIWideCharIsPunct : function (envhp:Pdvoid; wc:OCIWchar):boolean;cdecl;
+{$ENDIF}
+
+  { ----------------------- OCIWideCharIsSpace ------------------------------- }
+  {
+     NAME
+       OCIWideCharIsSpace - test whether wc is a space character
+     REMARKS
+       It tests whether wc is a space character. A space character only causes
+       white space in displayed text(for example, space, tab, carriage return,
+       newline, vertical tab or form feed).
+     RETURNS
+       TRUE or FLASE.
+     envhp(IN/OUT)
+       OCI environment handle to determine the character set .
+     wc(IN)
+       Wchar for testing.
+   }
+{$IFNDEF LinkDynamically}
+  function OCIWideCharIsSpace(envhp:Pdvoid; wc:OCIWchar):boolean;cdecl;external ocilib name 'OCIWideCharIsSpace';
+{$ELSE}
+  OCIWideCharIsSpace : function (envhp:Pdvoid; wc:OCIWchar):boolean;cdecl;
+{$ENDIF}
+
+  { ----------------------- OCIWideCharIsUpper ------------------------------- }
+  {
+     NAME
+       OCIWideCharIsUpper - test whether wc is a uppercase letter
+     REMARKS
+       It tests whether wc is a uppercase letter.
+     RETURNS
+       TRUE or FLASE.
+     envhp(IN/OUT)
+       OCI environment handle to determine the character set .
+     wc(IN)
+       Wchar for testing.
+   }
+{$IFNDEF LinkDynamically}
+  function OCIWideCharIsUpper(envhp:Pdvoid; wc:OCIWchar):boolean;cdecl;external ocilib name 'OCIWideCharIsUpper';
+{$ELSE}
+  OCIWideCharIsUpper : function (envhp:Pdvoid; wc:OCIWchar):boolean;cdecl;
+{$ENDIF}
+
+  {----------------------- OCIWideCharIsXdigit ------------------------------- }
+  {
+     NAME
+       OCIWideCharIsXdigit - test whether wc is a hexadecimal digit
+     REMARKS
+       It tests whether wc is a hexadecimal digit ( 0-9, A-F, a-f ).
+     RETURNS
+       TRUE or FLASE.
+     envhp(IN/OUT)
+       OCI environment handle to determine the character set .
+     wc(IN)
+       Wchar for testing.
+   }
+{$IFNDEF LinkDynamically}
+  function OCIWideCharIsXdigit(envhp:Pdvoid; wc:OCIWchar):boolean;cdecl;external ocilib name 'OCIWideCharIsXdigit';
+{$ELSE}
+  OCIWideCharIsXdigit : function (envhp:Pdvoid; wc:OCIWchar):boolean;cdecl;
+{$ENDIF}
+
+  { --------------------- OCIWideCharIsSingleByte ---------------------------- }
+  {
+     NAME
+       OCIWideCharIsSingleByte - test whether wc is a single-byte character
+     REMARKS
+       It tests whether wc is a single-byte character when converted into
+       multi-byte.
+     RETURNS
+       TRUE or FLASE.
+     envhp(IN/OUT)
+       OCI environment handle to determine the character set .
+     wc(IN)
+       Wchar for testing.
+   }
+{$IFNDEF LinkDynamically}
+  function OCIWideCharIsSingleByte(envhp:Pdvoid; wc:OCIWchar):boolean;cdecl;external ocilib name 'OCIWideCharIsSingleByte';
+{$ELSE}
+  OCIWideCharIsSingleByte : function (envhp:Pdvoid; wc:OCIWchar):boolean;cdecl;
+{$ENDIF}
+
+  { ----------------------- OCIWideCharToLower ------------------------------- }
+  {
+     NAME
+       OCIWideCharToLower - Convert a wchar into the lowercase
+     REMARKS
+       If there is a lower-case character mapping for wc in the specified locale,
+       it will return the lower-case in wchar, else return wc itself.
+     RETURNS
+       A wchar
+     envhp(IN/OUT)
+       OCI environment handle to determine the character set .
+     wc(IN)
+       Wchar for lowercase mapping.
+   }
+{$IFNDEF LinkDynamically}
+  function OCIWideCharToLower(envhp:Pdvoid; wc:OCIWchar):OCIWchar;cdecl;external ocilib name 'OCIWideCharToLower';
+{$ELSE}
+  OCIWideCharToLower : function (envhp:Pdvoid; wc:OCIWchar):OCIWchar;cdecl;
+{$ENDIF}
+
+  { ----------------------- OCIWideCharToUpper ------------------------------- }
+  {
+     NAME
+       OCIWideCharToUpper - Convert a wchar into the uppercase
+     REMARKS
+       If there is a upper-case character mapping for wc in the specified locale,
+       it will return the upper-case in wchar, else return wc itself.
+     RETURNS
+       A wchar
+     envhp(IN/OUT)
+       OCI environment handle to determine the character set .
+     wc(IN)
+       Wchar for uppercase mapping.
+   }
+{$IFNDEF LinkDynamically}
+  function OCIWideCharToUpper(envhp:Pdvoid; wc:OCIWchar):OCIWchar;cdecl;external ocilib name 'OCIWideCharToUpper';
+{$ELSE}
+  OCIWideCharToUpper : function (envhp:Pdvoid; wc:OCIWchar):OCIWchar;cdecl;
+{$ENDIF}
+
+  { ----------------------- OCIWideCharStrcmp -------------------------------- }
+  {
+     NAME
+       OCIWideCharStrcmp - compare two null terminated wchar string
+     REMARKS
+       It compares two wchar string in binary ( based on wchar encoding value ),
+       linguistic, or case-insensitive.
+     RETURNS
+       0, if wstr1 == wstr2.
+       Positive, if wstr1 > wstr2.
+       Negative, if wstr1 < wstr2.
+     envhp(IN/OUT)
+       OCI environment handle to determine the character set.
+     wstr1(IN)
+       Pointer to a null-terminated wchar string.
+     wstr2(IN)
+       Pointer to a null-terminated wchar string.
+     flag(IN)
+       It is used to decide the comparison method. It can be taken one of the
+       following values:
+         OCI_NLS_BINARY : for the binary comparison, this is default value.
+         OCI_NLS_LINGUISTIC : for linguistic comparison specified in the locale.
+       This flag can be ORed with OCI_NLS_CASE_INSENSITIVE for case-insensitive
+       comparison.
+   }
+{$IFNDEF LinkDynamically}
+  function OCIWideCharStrcmp(envhp:Pdvoid; wstr1:POCIWchar; wstr2:POCIWchar; flag:longint):longint;cdecl;external ocilib name 'OCIWideCharStrcmp';
+{$ELSE}
+  OCIWideCharStrcmp : function (envhp:Pdvoid; wstr1:POCIWchar; wstr2:POCIWchar; flag:longint):longint;cdecl;
+{$ENDIF}
+
+  { ----------------------- OCIWideCharStrncmp ------------------------------- }
+  {
+     NAME
+       OCIWideCharStrncmp - compare twe wchar string in length
+     REMARKS
+       This function is similar to OCIWideCharStrcmp(), except that at most len1
+       characters from wstr1 and len2 characters from wstr1 are compared. The
+       null-terminator will be taken into the comparison.
+     RETURNS
+       0, if wstr1 = wstr2
+       Positive, if wstr1 > wstr2
+       Negative, if wstr1 < wstr2
+     envhp(IN/OUT)
+       OCI environment handle to determine the character set .
+     wstr1(IN)
+       Pointer to the first wchar string
+     len1(IN)
+       The length for the first string for comparison
+     wstr2(IN)
+       Pointer to the second wchar string
+     len2(IN)
+       The length for the second string for comparison.
+     flag(IN)
+       It is used to decide the comparison method. It can be taken one of the
+       following values:
+         OCI_NLS_BINARY : for the binary comparison, this is default value.
+         OCI_NLS_LINGUISTIC : for linguistic comparison specified in the locale.
+       This flag can be ORed with OCI_NLS_CASE_INSENSITIVE for case-insensitive 
+       comparison.
+   }
+{$IFNDEF LinkDynamically}
+  function OCIWideCharStrncmp(envhp:Pdvoid; wstr1:POCIWchar; len1:size_t; wstr2:POCIWchar; len2:size_t;
+             flag:longint):longint;cdecl;external ocilib name 'OCIWideCharStrncmp';
+{$ELSE}
+  OCIWideCharStrncmp : function (envhp:Pdvoid; wstr1:POCIWchar; len1:size_t; wstr2:POCIWchar; len2:size_t;
+             flag:longint):longint;cdecl;
+{$ENDIF}
+
+  { ----------------------- OCIWideCharStrcat -------------------------------- }
+  {
+     NAME
+       OCIWideCharStrcat - concatenate two wchar strings
+     REMARKS
+       This function appends a copy of the wchar string pointed to by wsrcstr,
+       including the null-terminator to the end of wchar string pointed to by
+       wdststr. It returns the number of character in the result string not
+       including the ending null-terminator.
+     RETURNS
+       number of characters in the result string not including the ending
+       null-terminator.
+     envhp(IN/OUT)
+       OCI environment handle to determine the character set .
+     wdststr(IN/OUT)
+       Pointer to the destination wchar string for appending.
+     wsrcstr(IN)
+       Pointer to the source wchar string to append.
+   }
+{$IFNDEF LinkDynamically}
+  function OCIWideCharStrcat(envhp:Pdvoid; wdststr:POCIWchar; wsrcstr:POCIWchar):size_t;cdecl;external ocilib name 'OCIWideCharStrcat';
+{$ELSE}
+  OCIWideCharStrcat : function (envhp:Pdvoid; wdststr:POCIWchar; wsrcstr:POCIWchar):size_t;cdecl;
+{$ENDIF}
+
+  { ----------------------- OCIWideCharStrchr -------------------------------- }
+  {
+     NAME
+       OCIWideCharStrchr - Search the first occurrence of wchar in a wchar string
+     REMARKS
+       This function searchs for the first occurrence of wc in the wchar string
+       pointed to by wstr. It returns a pointer to the whcar if successful, or
+       a null pointer.
+     RETURNS
+       wchar pointer if successful, otherwise a null pointer.
+     envhp(IN/OUT)
+       OCI environment handle to determine the character set .
+     wstr(IN)
+       Pointer to the wchar string to search
+     wc(IN)
+       Wchar to search for.
+   }
+{$IFNDEF LinkDynamically}
+  function OCIWideCharStrchr(envhp:Pdvoid; wstr:POCIWchar; wc:OCIWchar):POCIWchar;cdecl;external ocilib name 'OCIWideCharStrchr';
+{$ELSE}
+  OCIWideCharStrchr : function (envhp:Pdvoid; wstr:POCIWchar; wc:OCIWchar):POCIWchar;cdecl;
+{$ENDIF}
+
+  { ----------------------- OCIWideCharStrcpy -------------------------------- }
+  {
+     NAME
+       OCIWideCharStrcpy - copy a wchar string
+     REMARKS
+       This function copies the wchar string pointed to by wsrcstr, including the
+       null-terminator, into the array pointed to by wdststr. It returns the
+       number of character copied not including the ending null-terminator.
+     RETURNS
+       number of characters copied not including the ending null-terminator.
+     envhp(IN/OUT)
+       OCI environment handle to determine the character set .
+     wdststr(OUT)
+       Pointer to the destination wchar buffer.
+     wsrcstr(IN)
+       Pointer to the source wchar string.
+   }
+{$IFNDEF LinkDynamically}
+  function OCIWideCharStrcpy(envhp:Pdvoid; wdststr:POCIWchar; wsrcstr:POCIWchar):size_t;cdecl;external ocilib name 'OCIWideCharStrcpy';
+{$ELSE}
+  OCIWideCharStrcpy : function (envhp:Pdvoid; wdststr:POCIWchar; wsrcstr:POCIWchar):size_t;cdecl;
+{$ENDIF}
+
+  { ----------------------- OCIWideCharStrlen -------------------------------- }
+  {
+     NAME
+       OCIWideCharStrlen - Return number of character in a wchar string
+     REMARKS
+       This function computes the number of characters in the wchar string
+       pointed to by wstr, not including the null-terminator, and returns
+      this number. 
+     RETURNS
+       number of characters not including ending null-terminator.
+     envhp(IN/OUT)
+       OCI environment handle to determine the character set .
+     wstr(IN)
+       Pointer to the source wchar string.
+   }
+{$IFNDEF LinkDynamically}
+  function OCIWideCharStrlen(envhp:Pdvoid; wstr:POCIWchar):size_t;cdecl;external ocilib name 'OCIWideCharStrlen';
+{$ELSE}
+  OCIWideCharStrlen : function (envhp:Pdvoid; wstr:POCIWchar):size_t;cdecl;
+{$ENDIF}
+
+  { ----------------------- OCIWideCharStrncat ------------------------------- }
+  {
+     NAME
+       OCIWideCharStrncat - Concatenate wchar string in length
+     REMARKS
+       This function is similar to OCIWideCharStrcat(), except that at most n
+       characters from wsrcstr are appended to wdststr. Note that the
+       null-terminator in wsrcstr will stop appending. wdststr will be
+       null-terminated.. 
+     RETURNS
+       Number of characters in the result string not including the ending
+       null-terminator.
+     envhp(IN/OUT)
+       OCI environment handle to determine the character set .
+     wdststr(IN/OUT)
+       Pointer to the destination wchar string for appending.
+     wsrcstr(IN)
+       Pointer to the source wchar string to append.
+     n(IN)
+       Number of characters from wsrcstr to append.
+   }
+{$IFNDEF LinkDynamically}
+  function OCIWideCharStrncat(envhp:Pdvoid; wdststr:POCIWchar; wsrcstr:POCIWchar; n:size_t):size_t;cdecl;external ocilib name 'OCIWideCharStrncat';
+{$ELSE}
+  OCIWideCharStrncat : function (envhp:Pdvoid; wdststr:POCIWchar; wsrcstr:POCIWchar; n:size_t):size_t;cdecl;
+{$ENDIF}
+
+  { ----------------------- OCIWideCharStrncpy ------------------------------- }
+  {
+     NAME
+       OCIWideCharStrncpy - Copy wchar string in length
+     REMARKS
+       This function is similar to OCIWideCharStrcpy(), except that at most n
+       characters are copied from the array pointed to by wsrcstr to the array
+       pointed to by wdststr. Note that the null-terminator in wdststr will
+       stop coping and result string will be null-terminated.
+     RETURNS
+       number of characters copied not including the ending null-terminator.
+     envhp(IN/OUT)
+       OCI environment handle to determine the character set .
+     wdststr(OUT)
+       Pointer to the destination wchar buffer.
+     wsrcstr(IN)
+       Pointer to the source wchar string.
+     n(IN)
+       Number of characters from wsrcstr to copy.
+   }
+{$IFNDEF LinkDynamically}
+  function OCIWideCharStrncpy(envhp:Pdvoid; wdststr:POCIWchar; wsrcstr:POCIWchar; n:size_t):size_t;cdecl;external ocilib name 'OCIWideCharStrncpy';
+{$ELSE}
+  OCIWideCharStrncpy : function (envhp:Pdvoid; wdststr:POCIWchar; wsrcstr:POCIWchar; n:size_t):size_t;cdecl;
+{$ENDIF}
+
+  { ----------------------- OCIWideCharStrrchr ------------------------------- }
+  {
+     NAME
+       OCIWideCharStrrchr - search the last occurrence of a wchar in wchar string
+     REMARKS
+       This function searchs for the last occurrence of wc in the wchar string
+       pointed to by wstr. It returns a pointer to the whcar if successful, or
+       a null pointer.
+     RETURNS
+       wchar pointer if successful, otherwise a null pointer.
+     envhp(IN/OUT)
+       OCI environment handle to determine the character set .
+     wstr(IN)
+       Pointer to the wchar string to search
+     wc(IN)
+       Wchar to search for.
+   }
+{$IFNDEF LinkDynamically}
+  function OCIWideCharStrrchr(envhp:Pdvoid; wstr:POCIWchar; wc:OCIWchar):POCIWchar;cdecl;external ocilib name 'OCIWideCharStrrchr';
+{$ELSE}
+  OCIWideCharStrrchr : function (envhp:Pdvoid; wstr:POCIWchar; wc:OCIWchar):POCIWchar;cdecl;
+{$ENDIF}
+
+  { --------------------- OCIWideCharStrCaseConversion ----------------------- }
+  {
+     NAME
+       OCIWideCharStrCaseConversion - convert a wchar string into lowercase or
+                                      uppercase
+     REMARKS
+       This function convert the wide char string pointed to by wsrcstr into the
+       uppercase or lowercase specified by flag and copies the result into the
+       array pointed to by wdststr. The result string will be null-terminated.
+     RETURNS
+       number of characters for result string not including null-terminator.
+     envhp(IN/OUT)
+       OCI environment handle.
+     wdststr(OUT)
+       Pointer to destination array.
+     wsrcstr(IN)
+       Pointer to source string.
+     flag(IN)
+       Specify the case to convert:
+         OCI_NLS_UPPERCASE : convert to uppercase.
+         OCI_NLS_LOWERCASE: convert to lowercase.
+       This flag can be ORed with OCI_NLS_LINGUISTIC to specify that the
+       linguistic setting in the locale will be used for case conversion.
+   }
+{$IFNDEF LinkDynamically}
+  function OCIWideCharStrCaseConversion(envhp:Pdvoid; wdststr:POCIWchar; wsrcstr:POCIWchar; flag:ub4):size_t;cdecl;external ocilib name 'OCIWideCharStrCaseConversion';
+{$ELSE}
+  OCIWideCharStrCaseConversion : function (envhp:Pdvoid; wdststr:POCIWchar; wsrcstr:POCIWchar; flag:ub4):size_t;cdecl;
+{$ENDIF}
+
+  {---------------------- OCIWideCharDisplayLength --------------------------- }
+  {
+     NAME
+       OCIWideCharDisplayLength - Calculate the display length for a wchar
+     REMARKS
+       This function determines the number of column positions required for wc
+       in display. It returns number of column positions, or 0 if wc is 
+       null-terminator.
+     RETURNS
+       Number of display positions.
+     envhp(IN/OUT)
+       OCI environment handle to determine the character set .
+     wc(IN)
+       Wchar character.
+   }
+{$IFNDEF LinkDynamically}
+  function OCIWideCharDisplayLength(envhp:Pdvoid; wc:OCIWchar):size_t;cdecl;external ocilib name 'OCIWideCharDisplayLength';
+{$ELSE}
+  OCIWideCharDisplayLength : function (envhp:Pdvoid; wc:OCIWchar):size_t;cdecl;
+{$ENDIF}
+
+  {---------------------- OCIWideCharMultiByteLength ------------------------- }
+  {
+     NAME
+       OCIWideCharMultiByteLength - Determine byte size in multi-byte encoding
+     REMARKS
+       This function determines the number of byte required for wc in multi-byte
+       encoding. It returns number of bytes in multi-byte for wc.
+     RETURNS
+       Number of bytes.
+     envhp(IN/OUT)
+       OCI environment handle to determine the character set .
+     wc(IN)
+       Wchar character.
+   }
+{$IFNDEF LinkDynamically}
+  function OCIWideCharMultiByteLength(envhp:Pdvoid; wc:OCIWchar):size_t;cdecl;external ocilib name 'OCIWideCharMultiByteLength';
+{$ELSE}
+  OCIWideCharMultiByteLength : function (envhp:Pdvoid; wc:OCIWchar):size_t;cdecl;
+{$ENDIF}
+
+  { ----------------------- OCIMultiByteStrcmp ------------------------------- }
+  {
+     NAME
+       OCIMultiByteStrcmp - Compare two multi-byte strings
+     REMARKS
+       It compares two multi-byte strings in binary ( based on encoding value ),
+       linguistic, or case-insensitive.
+     RETURNS
+       0, if str1 == str2.
+       Positive, if str1 > str2.
+       Negative, if str1 < str2.
+     envhp(IN/OUT)
+       OCI environment handle to determine the character set.
+     str1(IN)
+       Pointer to a null-terminated string.
+     str2(IN)
+       Pointer to a null-terminated string.
+     flag(IN)
+       It is used to decide the comparison method. It can be taken one of the
+       following values:
+         OCI_NLS_BINARY: for the binary comparison, this is default value.
+         OCI_NLS_LINGUISTIC: for linguistic comparison specified in the locale.
+       This flag can be ORed with OCI_NLS_CASE_INSENSITIVE for case-insensitive 
+       comparison.
+   }
+{$IFNDEF LinkDynamically}
+  function OCIMultiByteStrcmp(envhp:Pdvoid; str1:POraText; str2:POraText; flag:longint):longint;cdecl;external ocilib name 'OCIMultiByteStrcmp';
+{$ELSE}
+  OCIMultiByteStrcmp : function (envhp:Pdvoid; str1:POraText; str2:POraText; flag:longint):longint;cdecl;
+{$ENDIF}
+
+  {----------------------- OCIMultiByteStrncmp ------------------------------- }
+  {
+     NAME
+       OCIMultiByteStrncmp - compare two strings in length
+     REMARKS
+       This function is similar to OCIMultiBytestrcmp(), except that at most
+       len1 bytes from str1 and len2 bytes from str2 are compared. The
+       null-terminator will be taken into the comparison.
+     RETURNS
+       0, if str1 = str2
+       Positive, if str1 > str2
+       Negative, if str1 < str2
+     envhp(IN/OUT)
+       OCI environment handle to determine the character set.
+     str1(IN)
+       Pointer to the first string
+     len1(IN)
+       The length for the first string for comparison
+     str2(IN)
+       Pointer to the second string
+     len2(IN)
+       The length for the second string for comparison.
+     flag(IN)
+       It is used to decide the comparison method. It can be taken one of the
+       following values:
+         OCI_NLS_BINARY: for the binary comparison, this is default value.
+         OCI_NLS_LINGUISTIC: for linguistic comparison specified in the locale.
+       This flag can be ORed with OCI_NLS_CASE_INSENSITIVE for case-insensitive 
+       comparison.
+   }
+{$IFNDEF LinkDynamically}
+  function OCIMultiByteStrncmp(envhp:Pdvoid; str1:POraText; len1:size_t; str2:POraText; len2:size_t;
+             flag:longint):longint;cdecl;external ocilib name 'OCIMultiByteStrncmp';
+{$ELSE}
+  OCIMultiByteStrncmp : function (envhp:Pdvoid; str1:POraText; len1:size_t; str2:POraText; len2:size_t;
+             flag:longint):longint;cdecl;
+{$ENDIF}
+
+  {----------------------- OCIMultiByteStrcat -------------------------------- }
+  {
+     NAME
+       OCIMultiByteStrcat - concatenate multibyte strings
+     REMARKS
+       This function appends a copy of the multi-byte string pointed to by
+       srcstr, including the null-terminator to the end of string pointed to by
+       dststr. It returns the number of bytes in the result string not including
+       the ending null-terminator.
+     RETURNS
+       number of bytes in the result string not including the ending
+       null-terminator.
+     envhp(IN/OUT)
+       Pointer to OCI environment handle
+     dststr(IN/OUT)
+       Pointer to the destination multi-byte string for appending.
+     srcstr(IN)
+       Pointer to the source string to append.
+   }
+{$IFNDEF LinkDynamically}
+  function OCIMultiByteStrcat(envhp:Pdvoid; dststr:POraText; srcstr:POraText):size_t;cdecl;external ocilib name 'OCIMultiByteStrcat';
+{$ELSE}
+  OCIMultiByteStrcat : function (envhp:Pdvoid; dststr:POraText; srcstr:POraText):size_t;cdecl;
+{$ENDIF}
+
+  {------------------------- OCIMultiByteStrcpy ------------------------------ }
+  {
+     NAME
+       OCIMultiByteStrcpy - copy multibyte string
+     REMARKS
+       This function copies the multi-byte string pointed to by srcstr,
+       including the null-terminator, into the array pointed to by dststr. It
+       returns the number of bytes copied not including the ending 
+       null-terminator.
+     RETURNS
+       number of bytes copied not including the ending null-terminator.
+     envhp(IN/OUT)
+       Pointer to the OCI environment handle.
+     srcstr(OUT)
+       Pointer to the destination buffer.
+     dststr(IN)
+       Pointer to the source multi-byte string.
+   }
+{$IFNDEF LinkDynamically}
+  function OCIMultiByteStrcpy(envhp:Pdvoid; dststr:POraText; srcstr:POraText):size_t;cdecl;external ocilib name 'OCIMultiByteStrcpy';
+{$ELSE}
+  OCIMultiByteStrcpy : function (envhp:Pdvoid; dststr:POraText; srcstr:POraText):size_t;cdecl;
+{$ENDIF}
+
+  {----------------------- OCIMultiByteStrlen -------------------------------- }
+  {
+     NAME
+       OCIMultiByteStrlen - Calculate multibyte string length
+     REMARKS
+       This function computes the number of bytes in the multi-byte string
+       pointed to by str, not including the null-terminator, and returns this
+       number. 
+     RETURNS
+       number of bytes not including ending null-terminator.
+     str(IN)
+       Pointer to the source multi-byte string.
+   }
+{$IFNDEF LinkDynamically}
+  function OCIMultiByteStrlen(envhp:Pdvoid; str:POraText):size_t;cdecl;external ocilib name 'OCIMultiByteStrlen';
+{$ELSE}
+  OCIMultiByteStrlen : function (envhp:Pdvoid; str:POraText):size_t;cdecl;
+{$ENDIF}
+
+
+  {----------------------- OCIMultiByteStrncat ------------------------------- }
+  {
+     NAME
+       OCIMultiByteStrncat - concatenate string in length
+     REMARKS
+       This function is similar to OCIMultiBytestrcat(), except that at most n
+       bytes from srcstr are appended to dststr. Note that the null-terminator in
+       srcstr will stop appending and the function will append as many character
+       as possible within n bytes. dststr will be null-terminated. 
+     RETURNS
+       Number of bytes in the result string not including the ending
+       null-terminator.
+     envhp(IN/OUT)
+       Pointer to OCI environment handle.
+     srcstr(IN/OUT)
+       Pointer to the destination multi-byte string for appending.
+     dststr(IN)
+       Pointer to the source multi-byte string to append.
+     n(IN)
+       Number of bytes from srcstr to append.
+   }
+{$IFNDEF LinkDynamically}
+  function OCIMultiByteStrncat(envhp:Pdvoid; dststr:POraText; srcstr:POraText; n:size_t):size_t;cdecl;external ocilib name 'OCIMultiByteStrncat';
+{$ELSE}
+  OCIMultiByteStrncat : function (envhp:Pdvoid; dststr:POraText; srcstr:POraText; n:size_t):size_t;cdecl;
+{$ENDIF}
+
+  {----------------------- OCIMultiByteStrncpy ------------------------------- }
+  {
+     NAME
+       OCIMultiByteStrncpy - copy multibyte string in length
+     REMARKS
+       This function is similar to OCIMultiBytestrcpy(), except that at most n
+       bytes are copied from the array pointed to by srcstr to the array pointed
+       to by dststr. Note that the null-terminator in srcstr will stop coping and
+       the function will copy as many character as possible within n bytes. The 
+       result string will be null-terminated.
+     RETURNS
+       number of bytes copied not including the ending null-terminator.
+     envhp(IN/OUT)
+       Pointer to a OCI environment handle.
+     dststr(IN)
+       Pointer to the source multi-byte string.
+     srcstr(OUT)
+       Pointer to the destination buffer.
+     n(IN)
+       Number of bytes from srcstr to copy.
+   }
+{$IFNDEF LinkDynamically}
+  function OCIMultiByteStrncpy(envhp:Pdvoid; dststr:POraText; srcstr:POraText; n:size_t):size_t;cdecl;external ocilib name 'OCIMultiByteStrncpy';
+{$ELSE}
+  OCIMultiByteStrncpy : function (envhp:Pdvoid; dststr:POraText; srcstr:POraText; n:size_t):size_t;cdecl;
+{$ENDIF}
+
+  {----------------------- OCIMultiByteStrnDisplayLength --------------------- }
+  {
+     NAME
+       OCIMultiByteStrnDisplayLength - calculate the display length for a
+                                       multibyt string
+     REMARKS
+       This function returns the number of display positions occupied by the 
+       complete characters within the range of n bytes.
+     RETURNS
+       number of display positions.
+     envhp(IN/OUT)
+       OCI environment handle.
+     str(IN)
+       Pointer to a multi-byte string.
+     n(IN)
+       Number of bytes to examine.
+   }
+{$IFNDEF LinkDynamically}
+  function OCIMultiByteStrnDisplayLength(envhp:Pdvoid; str1:POraText; n:size_t):size_t;cdecl;external ocilib name 'OCIMultiByteStrnDisplayLength';
+{$ELSE}
+  OCIMultiByteStrnDisplayLength : function (envhp:Pdvoid; str1:POraText; n:size_t):size_t;cdecl;
+{$ENDIF}
+
+  {---------------------- OCIMultiByteStrCaseConversion  --------------------- }
+  {
+     NAME
+       OCIMultiByteStrCaseConversion
+     REMARKS
+       This function convert the multi-byte string pointed to by srcstr into the
+       uppercase or lowercase specified by flag and copies the result into the
+       array pointed to by dststr. The result string will be null-terminated.
+     RETURNS
+       number of bytes for result string not including null-terminator.
+     envhp(IN/OUT)
+       OCI environment handle.
+     dststr(OUT)
+       Pointer to destination array.
+     srcstr(IN)
+       Pointer to source string.
+     flag(IN)
+       Specify the case to convert:
+         OCI_NLS_UPPERCASE: convert to uppercase.
+         OCI_NLS_LOWERCASE: convert to lowercase.
+       This flag can be ORed with OCI_NLS_LINGUISTIC to specify that the 
+       linguistic setting in the locale will be used for case conversion.
+   }
+{$IFNDEF LinkDynamically}
+  function OCIMultiByteStrCaseConversion(envhp:Pdvoid; dststr:POraText; srcstr:POraText; flag:ub4):size_t;cdecl;external ocilib name 'OCIMultiByteStrCaseConversion';
+{$ELSE}
+  OCIMultiByteStrCaseConversion : function (envhp:Pdvoid; dststr:POraText; srcstr:POraText; flag:ub4):size_t;cdecl;
+{$ENDIF}
+
+  {------------------------- OCICharSetToUnicode ----------------------------- }
+  {
+     NAME
+       OCICharSetToUnicode - convert multibyte string into Unicode as UCS2
+     REMARKS
+       This function converts a multi-byte string pointed to by src to Unicode 
+       into the array pointed to by dst. The conversion will stop when it reach
+       to the source limitation or destination limitation. 
+       The function will return number of characters converted into Unicode.
+       If dstlen is zero, it will just return the number of characters for the
+       result without real conversion.
+     RETURNS
+       OCI_SUCCESS, OCI_INVALID_HANDLE or OCI_ERROR
+     envhp(IN/OUT)
+       Pointer to an OCI environment handle
+     dst(OUT)
+       Pointer to a destination buffer
+     dstlen(IN)
+       Size of destination buffer in character
+     src(IN)
+       Pointer to multi-byte source string.
+     srclen(IN)
+       Size of source string in bytes.
+     rsize(OUT)
+       Number of characters converted.
+       If it is a NULL pointer, nothing to return.
+   }
+{$IFNDEF LinkDynamically}
+  function OCICharSetToUnicode(envhp:Pdvoid; dst:Pub2; dstlen:size_t; src:POraText; srclen:size_t;
+             rsize:Psize_t):sword;cdecl;external ocilib name 'OCICharSetToUnicode';
+{$ELSE}
+  OCICharSetToUnicode : function (envhp:Pdvoid; dst:Pub2; dstlen:size_t; src:POraText; srclen:size_t;
+             rsize:Psize_t):sword;cdecl;
+{$ENDIF}
+
+  {------------------------- OCIUnicodeToCharSet ----------------------------- }
+  {
+     NAME
+       OCIUnicodeToCharSet - convert Unicode into multibyte
+     REMARKS
+       This function converts a Unicode string pointed to by src to multi-byte
+       into the array pointed to by dst. The conversion will stop when it reach
+       to the source limitation or destination limitation. The function will
+       return number of bytes converted into multi-byte. If dstlen is zero, it
+       will just return the number of bytes for the result without real 
+       conversion. If a Unicode character is not convertible for the character
+       set specified in OCI environment handle, a replacement character will be
+       used for it. In this case, OCICharSetConversionIsReplacementUsed() will
+       return ture.
+     RETURNS
+       OCI_SUCCESS, OCI_INVALID_HANDLE or OCI_ERROR
+     envhp(IN/OUT)
+       Pointer to an OCI environment handle.
+     dst(OUT)
+       Pointer to a destination buffer.
+     dstlen(IN)
+       Size of destination buffer in byte.
+     src(IN)
+       Pointer to a Unicode string.
+     srclen(IN)
+       Size of source string in characters.
+     rsize(OUT)
+       Number of bytes converted.
+       If it is a NULL pointer, nothing to return.
+   }
+{$IFNDEF LinkDynamically}
+  function OCIUnicodeToCharSet(envhp:Pdvoid; dst:POraText; dstlen:size_t; src:Pub2; srclen:size_t;
+             rsize:Psize_t):sword;cdecl;external ocilib name 'OCIUnicodeToCharSet';
+{$ELSE}
+  OCIUnicodeToCharSet : function (envhp:Pdvoid; dst:POraText; dstlen:size_t; src:Pub2; srclen:size_t;
+             rsize:Psize_t):sword;cdecl;
+{$ENDIF}
+
+  {----------------------- OCINlsCharSetConvert ------------------------------ }
+  {
+     NAME
+       OCINlsCharSetConvert - convert between any two character set.
+     REMARKS
+       This function converts a string pointed to by src in the character set
+       specified with srcid to the array pointed to by dst in the character set
+       specified with dstid. The conversion will stop when it reaches the source
+       limitation or destination limitation. The function will return the number
+       of bytes converted into the destination buffer. Even though either source
+       or destination character set id is OCI_UTF16ID, given and return data
+       length will be represented with the byte length as this function is
+       intended for generic purpose. Note the conversion will not stop at null
+       data.
+       To get character set id from name, OCINlsCharSetNameToId can be used.
+       To check if derived data in the destination buffer contains any
+       replacement character resulting from conversion failure,
+       OCICharSetConversionIsReplacementUsed can be used to get the status.
+       Data alignment should be guaranteed by a caller. For example, UTF-16 data
+       should be aligned to ub2 type.
+  
+     RETURNS
+       OCI_SUCCESS or OCI_ERROR.
+     errhp(IN/OUT)
+       OCI error handle. If there is an error, it is recorded in errhp and this
+       function returns a NULL pointer. Diagnostic information can be obtained
+       by calling OCIErrorGet().
+     dstid(IN)
+       Character set id for the destination buffer.
+     dstp(OUT)
+       Pointer to the destination buffer.
+     dstlen(IN)
+       The maximum byte size of destination buffer.
+     srcid(IN)
+       Character set id for the source buffer.
+     srcp(IN)
+       Pointer to the source buffer.
+     srclen(IN)
+       The length byte size of source buffer.
+     rsize(OUT)
+       The number of characters converted. If it is a NULL pointer, nothing to
+       return.
+   }
+{$IFNDEF LinkDynamically}
+  function OCINlsCharSetConvert(envhp:Pdvoid; errhp:POCIError; dstid:ub2; dstp:Pdvoid; dstlen:size_t;
+             srcid:ub2; srcp:Pdvoid; srclen:size_t; rsize:Psize_t):sword;cdecl;external ocilib name 'OCINlsCharSetConvert';
+{$ELSE}
+  OCINlsCharSetConvert : function (envhp:Pdvoid; errhp:POCIError; dstid:ub2; dstp:Pdvoid; dstlen:size_t;
+             srcid:ub2; srcp:Pdvoid; srclen:size_t; rsize:Psize_t):sword;cdecl;
+{$ENDIF}
+
+  { ------------------- OCICharsetConversionIsReplacementUsed ---------------- }
+  {
+     NAME
+       OCICharsetConversionIsReplacementUsed - chech if replacement is used in 
+                                               conversion
+     REMARKS
+       This function indicates whether or not the replacement character was used
+       for nonconvertible characters in character set conversion in last invoke
+       of OCICharsetUcs2ToMb().
+     RETURNS
+       TRUE is the replacement character was used in last OCICharsetUcs2ToMb()
+       invoking, else FALSE.
+     envhp(IN/OUT)
+       OCI environment handle. This should be the first handle passed to 
+       OCICharsetUcs2ToMb().
+   }
+{$IFNDEF LinkDynamically}
+  function OCICharSetConversionIsReplacementUsed(envhp:Pdvoid):boolean;cdecl;external ocilib name 'OCICharSetConversionIsReplacementUsed';
+{$ELSE}
+  OCICharSetConversionIsReplacementUsed : function (envhp:Pdvoid):boolean;cdecl;
+{$ENDIF}
+
+  {------------------- OCINlsEnvironmentVariableGet ----------------- }
+  {
+     NAME
+       OCINlsEnvironmentVariableGet - get a value of NLS environment variable.
+  
+     DESCRIPTION
+       This function retrieves a value of NLS environment variable to the buffer
+       pointed to by val. Data type is determined by the parameter specified by
+       item. Either numeric data or string data can be retrieved.
+  
+     RETURNS
+       OCI_SUCCESS or OCI_ERROR.
+  
+     PARAMETERS
+     valp(OUT) -
+       Pointer to the buffer.
+     size(IN) -
+       Size of the buffer. This argument is only applicable to string data type,
+       but not to numerical data, in such case, it is ignored.
+     item(IN) -
+       NLS item value, which can be one of following values:
+         OCI_NLS_CHARSET_ID  - NLS_LANG character set id in ub2 data type.
+         OCI_NLS_NCHARSET_ID - NLS_NCHAR character set id in ub2 data type.
+     charset(IN) -
+       Character set id for retrieved string data. If it is 0, NLS_LANG will be
+       used. OCI_UTF16ID is a valid id. In case of numeric data, this argument
+       is ignored.
+     rsize(OUT) -
+       Size of return value.
+  
+     NOTE
+       This functions is mainly used for retrieving character set id from either
+       NLS_LANG or NLS_NCHAR environment variables. If NLS_LANG is not set,
+       the default character set id is returned.
+       For future extension, the buffer is capable for storing other data types.
+   }
+{$IFNDEF LinkDynamically}
+  function OCINlsEnvironmentVariableGet(valp:Pdvoid; size:size_t; item:ub2; charset:ub2; rsize:Psize_t):sword;cdecl;external ocilib name 'OCINlsEnvironmentVariableGet';
+{$ELSE}
+  OCINlsEnvironmentVariableGet : function (valp:Pdvoid; size:size_t; item:ub2; charset:ub2; rsize:Psize_t):sword;cdecl;
+{$ENDIF}
+
+  {------------------------- OCIMessageOpen ---------------------------------- }
+  {
+     NAME
+       OCIMessageOpen - open a locale message file
+     REMARKS
+       This function opens a message handle for facility of product in a language
+       pointed to by envhp. It first try to open the message file corresponding
+       to envhp for the facility. If it successes, it will use that file to
+       initialize a message handle, else it will use the default message file
+       which is for American language for the facility. The function return a
+       pointer pointed to a message handle into msghp parameter.
+     RETURNS
+       OCI_SUCCESS, OCI_INVALID_HANDLE or OCI_ERROR
+     envhp(IN/OUT)
+       A pointer to OCI environment handle for message language.
+     errhp(IN/OUT)
+       The OCI error handle. If there is an error, it is record in errhp and this
+       function returns a NULL pointer. Diagnostic information can be obtained by
+       calling OCIErrorGet().
+     msghp(OUT)
+       a message handle for return
+     product(IN)
+       A pointer to a product name. Product name is used to locate the directory
+       for message in a system dependent way. For example, in Solaris, the
+       directory of message files for the product `rdbms' is
+       `$ORACLE_HOME/rdbms'.
+     facility(IN)
+       A pointer to a facility name in the product. It is used to construct a
+       message file name. A message file name follows the conversion with 
+       facility as prefix. For example, the message file name for facility
+       `img' in American language will be `imgus.msb' where `us' is the 
+       abbreviation of American language and `msb' as message binary file 
+       extension.
+     dur(IN)
+       Duration for memory allocation for the return message handle. It can be
+       the following values:
+          OCI_DURATION_CALL
+          OCI_DURATION_STATEMENT
+          OCI_DURATION_SESSION
+          OCI_DURATION_TRANSACTION
+       For the detail description, please refer to Memory Related Service
+       Interfaces section.
+   }
+{$IFNDEF LinkDynamically}
+  function OCIMessageOpen(envhp:Pdvoid; errhp:POCIError; var msghp:POCIMsg; product:POraText; facility:POraText;
+             dur:OCIDuration):sword;cdecl;external ocilib name 'OCIMessageOpen';
+{$ELSE}
+  OCIMessageOpen : function (envhp:Pdvoid; errhp:POCIError; var msghp:POCIMsg; product:POraText; facility:POraText;
+             dur:OCIDuration):sword;cdecl;
+{$ENDIF}
+
+  {------------------------- OCIMessageGet ----------------------------------- }
+  {
+     NAME
+       OCIMessageGet - get a locale message from a message handle
+     REMARKS
+       This function will get message with message number identified by msgno and
+       if buflen is not zero, the function will copy the message into the buffer
+       pointed to by msgbuf. If buflen is zero, the message will be copied into
+       a message buffer inside the message handle pointed to by msgh. For both
+       cases. it will return the pointer to the null-terminated message string.
+       If it cannot get the message required, it will return a NULL pointer.
+     RETURNS
+       A pointer to a null-terminated message string on success, otherwise a NULL
+       pointer.
+     msgh(IN/OUT)
+       Pointer to a message handle which was previously opened by
+       OCIMessageOpen().
+     msgno(IN)
+       The message number for getting message.
+     msgbuf(OUT)
+       Pointer to a destination buffer to the message retrieved. If buflen is
+       zero, it can be NULL pointer.
+     buflen(IN)
+       The size of the above destination buffer.
+   }
+{$IFNDEF LinkDynamically}
+  function OCIMessageGet(msgh:POCIMsg; msgno:ub4; msgbuf:POraText; buflen:size_t):POraText;cdecl;external ocilib name 'OCIMessageGet';
+{$ELSE}
+  OCIMessageGet : function (msgh:POCIMsg; msgno:ub4; msgbuf:POraText; buflen:size_t):POraText;cdecl;
+{$ENDIF}
+
+  {------------------------- OCIMessageClose --------------------------------- }
+  {
+     NAME
+       OCIMessageClose - close a message handle
+     REMARKS
+       This function closes a message handle pointed to by msgh and frees any
+       memory associated with this handle.
+     RETURNS
+       OCI_SUCCESS, OCI_INVALID_HANDLE or OCI_ERROR
+     envhp(IN/OUT)
+       A pointer to OCI environment handle for message language.
+     errhp(IN/OUT)
+       The OCI error handle. If there is an error, it is record in errhp and this
+       function returns a NULL pointer. Diagnostic information can be obtained by
+       calling OCIErrorGet().
+     msghp(IN/OUT)
+       A pointer to a message handle which was previously opened by
+       OCIMessageOpen().
+   }
+{$IFNDEF LinkDynamically}
+  function OCIMessageClose(envhp:Pdvoid; errhp:POCIError; msghp:POCIMsg):sword;cdecl;external ocilib name 'OCIMessageClose';
+{$ELSE}
+  OCIMessageClose : function (envhp:Pdvoid; errhp:POCIError; msghp:POCIMsg):sword;cdecl;
+{$ENDIF}
+
+  {--------------- End of Extensions to NLS cartridge service ---------------- }
+  {----------------- Extensions to OCI Thread interface --------------------- }
+  {****************************************************************************
+                                DESCRIPTION
+  ******************************************************************************
+  1 Threads Interface
+  
+  The OCIThread package provides a number of commonly used threading
+  primitives for use by Oracle customers.  It offers a portable interface to
+  threading capabilities native to various platforms.  It does not implement
+  threading on platforms which do not have native threading capability.
+  
+  OCIThread does not provide a portable implementation of multithreaded 
+  facilities.  It only serves as a set of portable covers for native 
+  multithreaded facilities.  Therefore, platforms that do not have native 
+  support for multi-threading will only be able to support a limited 
+  implementation of OCIThread.  As a result, products that rely on all of 
+  OCIThread's functionality will not port to all platforms.  Products that must 
+  port to all platforms must use only a subset of OCIThread's functionality.  
+  This issue is discussed further in later sections of this document.
+  
+  The OCIThread API is split into four main parts.  Each part is described
+  briefly here.  The following subsections describe each in greater detail.
+  
+   1. Initialization and Termination Calls
+  
+       These calls deal with the initialization and termination of OCIThread.
+       Initialization of OCIThread initializes the OCIThread context which is
+       a member of the OCI environment or session handle.  This context is 
+       required for other OCIThread calls.
+  
+   2. Passive Threading Primitives
+  
+       The passive threading primitives include primitives to manipulate mutual
+       exclusion (mutex) locks, thread ID's, and thread-specific data keys.
+  
+       The reason that these primitives are described as 'passive' is that while
+       their specifications allow for the existence of multiple threads, they do
+       not require it.  This means that it is possible for these primitives to
+       be implemented according to specification in both single-threaded and
+       multi-threaded environments.
+  
+       As a result, OCIThread clients that use only these primitives will not
+       require the existence of multiple threads in order to work correctly,
+       i.e., they will be able to work in single-threaded environments without 
+       branching code.
+  
+   3. Active Threading Primitives
+  
+       Active threading primitives include primitives dealing with the creation,
+       termination, and other manipulation of threads.
+  
+       The reason that these primitives are described as 'active' is that they
+       can only be used in true multi-threaded environments.  Their
+       specifications explicitly require that it be possible to have multiple
+       threads.  If you need to determine at runtime whether or not you are in a
+       multi-threaded environment, call OCIThreadIsMulti() before calling an
+       OCIThread active primitive.
+  
+  
+  1.1 Initialization & Termination
+  ==================================
+  
+  The types and functions described in this section are associated with the
+  initialization and termination of the OCIThread package.  OCIThread must
+  be properly initialized before any of its functionality can be used.
+  OCIThread's process initialization function, 'OCIThreadProcessInit()',
+  must be called with care; see below.
+  
+  The observed behavior of the initialization and termination functions is the
+  same regardless of whether OCIThread is in single-threaded or multi-threaded
+  environment.  It is OK to call the initialization functions from both generic
+  and operating system specific (OSD) code.
+  
+  1.1.1 Types
+  
+    OCIThreadContext - OCIThread Context
+    -------------------------------------
+  
+      Most calls to OCIThread functions take the OCI environment or session 
+      handle as a parameter.  The OCIThread context is part of the OCI 
+      environment or session handle and it must be initialized by calling 
+      'OCIThreadInit()'.  Termination of the OCIThread context occurs by calling
+      'OCIThreadTerm()'.
+  
+      The OCIThread context is a private data structure.  Clients must NEVER
+      attempt to examine the contents of the context.
+  
+  1.1.2  OCIThreadProcessInit
+  
+    OCIThreadProcessInit - OCIThread Process INITialization
+    --------------------------------------------------------
+  
+      Description
+  
+        This function should be called to perform OCIThread process
+        initialization.
+  
+      Prototype
+  
+        void OCIThreadProcessInit();
+  
+      Returns
+  
+        Nothing.
+  
+      Notes
+  
+        Whether or not this function needs to be called depends on how OCI
+        Thread is going to be used.
+  
+          * In a single-threaded application, calling this function is optional.
+            If it is called at all, the first call to it must occur before calls
+            to any other OCIThread functions.  Subsequent calls can be made
+            without restriction; they will not have any effect.
+  
+          * In a multi-threaded application, this function MUST be called.  The
+            first call to it MUST occur 'strictly before' any other OCIThread
+            calls; i.e., no other calls to OCIThread functions (including other
+            calls to this one) can be concurrent with the first call.
+            Subsequent calls to this function can be made without restriction;
+            they will not have any effect.
+  
+  
+  1.1.3 OCIThreadInit
+  
+    OCIThreadInit - OCIThread INITialize
+    -------------------------------------
+  
+      Description
+  
+        This initializes OCIThread context.
+  
+      Prototype
+  
+        sword OCIThreadInit(dvoid *hndl, OCIError *err);
+  
+          hndl(IN/OUT): The OCI environment or session handle.
+  
+          err(IN/OUT): 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().
+  
+      Returns
+  
+        OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
+  
+      Notes
+  
+        It is illegal for OCIThread clients to try an examine the memory
+        pointed to by the returned pointer.
+  
+        It is safe to make concurrent calls to 'OCIThreadInit()'.  Unlike
+        'OCIThreadProcessInit()',  there is no need to have a first call
+        that occurs before all the others.
+  
+        The first time 'OCIThreadInit()' is called, it initilaizes the OCI
+        Thread context.  It also saves a pointer to the context in some system
+        dependent manner.  Subsequent calls to 'OCIThreadInit()' will return
+        the same context.
+  
+        Each call to 'OCIThreadInit()' must eventually be matched by a call to
+        'OCIThreadTerm()'.
+  
+    OCIThreadTerm - OCIThread TERMinate
+    ------------------------------------
+  
+      Description
+  
+        This should be called to release the OCIThread context.  It should be
+        called exactly once for each call made to 'OCIThreadInit()'.
+  
+      Prototype
+  
+        sword OCIThreadTerm(dvoid *hndl, OCIError *err);
+  
+          hndl(IN/OUT): The OCI environment or session handle.
+  
+          err(IN/OUT): 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().
+  
+      Returns
+  
+        OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
+  
+      Notes
+  
+        It is safe to make concurrent calls to 'OCIThreadTerm()'.
+  
+        'OCIThreadTerm()' will not do anything until it has been called as
+        many times as 'OCIThreadInit()' has been called.  When that happens,
+        it terminates the OCIThread layer and frees the memory allocated for
+        the context.  Once this happens, the context should not be re-used.
+        It will be necessary to obtain a new one by calling 'OCIThreadInit()'.
+  
+  
+    OCIThreadIsMulti - OCIThread Is Multi-Threaded?
+    ------------------------------------------------
+  
+      Description
+  
+        This tells the caller whether the application is running in a
+        multi-threaded environment or a single-threaded environment.
+  
+      Prototype
+        boolean OCIThreadIsMulti(void);
+  
+      Returns
+  
+        TRUE if the environment is multi-threaded;
+        FALSE if the environment is single-threaded.
+  
+  
+  1.2 Passive Threading Primitives
+  ==================================
+  
+  1.2.1 Types
+  
+  The passive threading primitives deal with the manipulation of mutex, 
+  thread ID's, and thread-specific data.  Since the specifications of these 
+  primitives do not require the existence of multiple threads, they can be 
+  used both on multithreaded and single-threaded platforms.
+  
+  1.2.1.1  OCIThreadMutex - OCIThread Mutual Exclusion Lock
+  -----------------------------------------------------------
+  
+    The type 'OCIThreadMutex' is used to represent a mutual exclusion lock
+    (mutex).  A mutex is typically used for one of two purposes: (i) to
+    ensure that only one thread accesses a given set of data at a time, or
+    (ii) to ensure that only one thread executes a given critical section of
+    code at a time.
+  
+    Mutexes pointer can be declared as parts of client structures or as 
+    stand-alone variables.  Before they can be used, they must be initialized 
+    using 'OCIThreadMutexInit()'.  Once they are no longer needed, they must be
+    destroyed using 'OCIThreadMutexDestroy()'.  A mutex pointer must NOT be 
+    used after it is destroyed.
+  
+    A thread can acquire a mutex by using either 'OCIThreadMutexAcquire()' or
+    'OCIThreadMutexTry()'.  They both ensure that only one thread at a time is
+    allowed to hold a given mutex.  A thread that holds a mutex can release it
+    by calling 'OCIThreadMutexRelease()'.
+  
+  
+  1.2.1.2  OCIThreadKey - OCIThread Key for Thread-Specific Data
+  ----------------------------------------------------------------
+  
+    A key can be thought of as a process-wide variable that has a
+    thread-specific value.  What this means is that all the threads in a
+    process can use any given key.  However, each thread can examine or modify
+    that key independently of the other threads.  The value that a thread sees
+    when it examines the key will always be the same as the value that it last
+    set for the key.  It will not see any values set for the key by the other
+    threads.
+  
+    The type of the value held by a key is a 'dvoid *' generic pointer.
+  
+    Keys can be created using 'OCIThreadKeyInit()'.  When a key is created, its
+    value is initialized to 'NULL' for all threads.
+  
+    A thread can set a key's value using 'OCIThreadKeySet()'.  A thread can
+    get a key's value using 'OCIThreadKeyGet()'.
+  
+    The OCIThread key functions will save and retrieve data SPECIFIC TO THE
+    THREAD.  When clients maintain a pool of threads and assign the threads to
+    different tasks, it *may not* be appropriate for a task to use OCIThread
+    key functions to save data associated with it.  Here is a scenario of how
+    things can fail: A thread is assigned to execute the initialization of a
+    task.  During the initialization, the task stored some data related to it
+    in the thread using OCIThread key functions.  After the initialization,
+    the thread is returned back to the threads pool.  Later, the threads pool
+    manager assigned another thread to perform some operations on the task,
+    and the task needs to retrieve those data it stored earlier in
+    initialization.  Since the task is running in another thread, it will not
+    be able to retrieve the same data back!  Applications that use thread
+    pools should be aware of this and be cautious when using OCIThread key
+    functions.
+  
+  
+  1.2.1.3  OCIThreadKeyDestFunc - OCIThread Key Destructor Function Type
+  ------------------------------------------------------------------------
+  
+    This is the type of a pointer to a key's destructor routine.  Keys can be
+    associated with a destructor routine when they are created (see
+    'OCIThreadKeyInit()').
+  
+    A key's destructor routine will be called whenever a thread that has a
+    non-NULL value for the key terminates.
+  
+    The destructor routine returns nothing and takes one parameter.  The
+    parameter will be the value that was set for key when the thread
+    terminated.
+  
+    The destructor routine is guaranteed to be called on a thread's value
+    in the key after the termination of the thread and before process
+    termination.  No more precise guarantee can be made about the timing
+    of the destructor routine call; thus no code in the process may assume
+    any post-condition of the destructor routine.  In particular, the
+    destructor is not guaranteed to execute before a join call on the
+    terminated thread returns.
+  
+  
+  1.2.1.4  OCIThreadId - OCIThread Thread ID
+  --------------------------------------------
+  
+    Type 'OCIThreadId' is the type that will be used to identify a thread.
+    At any given time, no two threads will ever have the same 'OCIThreadId'.
+    However, 'OCIThreadId' values can be recycled; i.e., once a thread dies,
+    a new thread may be created that has the same 'OCIThreadId' as the one
+    that died.  In particular, the thread ID must uniquely identify a thread
+    T within a process, and it must be consistent and valid in all threads U
+    of the process for which it can be guaranteed that T is running
+    concurrently with U.  The thread ID for a thread T must be retrievable
+    within thread T.  This will be done via OCIThreadIdGet().
+  
+    The 'OCIThreadId' type supports the concept of a NULL thread ID: the NULL
+    thread ID will never be the same as the ID of an actual thread.
+  
+  
+  
+  1.2.2 Function prototypes for passive primitives
+  --------------------------------------------------
+  
+  1.2.2.1 Mutex functions
+  -------------------------
+  
+    OCIThreadMutexInit - OCIThread MuteX Initialize
+    -----------------------------------------------
+  
+      Description
+  
+        This allocate and initializes a mutex.  All mutexes must be 
+        initialized prior to use.
+  
+      Prototype
+  
+        sword OCIThreadMutexInit(dvoid *hndl, OCIError *err, 
+                                 OCIThreadMutex **mutex);
+  
+          hndl(IN/OUT): The OCI environment or session handle.
+  
+          err(IN/OUT): 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().
+  
+          mutex(OUT):  The mutex to initialize.
+  
+      Returns
+  
+        OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
+  
+      Notes
+  
+        Multiple threads must not initialize the same mutex simultaneously.
+        Also, a mutex must not be reinitialized until it has been destroyed (see
+        'OCIThreadMutexDestroy()').
+  
+    OCIThreadMutexDestroy - OCIThread MuteX Destroy
+    -----------------------------------------------
+  
+      Description
+  
+        This destroys and deallocate a mutex.  Each mutex must be destroyed 
+        once it is no longer needed.
+  
+      Prototype
+  
+        sword OCIThreadMutexDestroy(dvoid *hndl, OCIError *err,
+                                    OCIThreadMutex **mutex);
+  
+          hndl(IN/OUT): The OCI environment or session handle.
+  
+          err(IN/OUT): 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().
+  
+          mutex(IN/OUT):   The mutex to destroy.
+  
+      Returns
+  
+        OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
+  
+      Notes
+  
+        It is not legal to destroy a mutex that is uninitialized or is currently
+        held by a thread.  The destruction of a mutex must not occur concurrently
+        with any other operations on the mutex.  A mutex must not be used after
+        it has been destroyed.
+  
+  
+    OCIThreadMutexAcquire - OCIThread MuteX Acquire
+    -----------------------------------------------
+  
+      Description
+  
+        This acquires a mutex for the thread in which it is called.  If the mutex
+        is held by another thread, the calling thread is blocked until it can
+        acquire the mutex.
+  
+      Prototype
+  
+       sword OCIThreadMutexAcquire(dvoid *hndl, OCIError *err,
+                                   OCIThreadMutex *mutex);
+  
+          hndl(IN/OUT): The OCI environment or session handle.
+  
+          err(IN/OUT): The OCI error handle.  If there is an error, it is 
+                       recorded in err and this function returns OCI_ERROR.  
+                       Diagnostic information can be obtained by calling 
+                       OCIErrorGet().
+  
+          mutex(IN/OUT):   The mutex to acquire.
+  
+      Returns
+  
+        OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
+  
+      Notes
+  
+        It is illegal to attempt to acquire an uninitialized mutex.
+  
+        This function's behavior is undefined if it is used by a thread to
+        acquire a mutex that is already held by that thread.
+  
+  
+  
+    OCIThreadMutexRelease - OCIThread MuteX Release
+    -----------------------------------------------
+  
+      Description
+  
+        This releases a mutex.  If there are any threads blocked on the mutex,
+        one of them will acquire it and become unblocked.
+  
+      Prototype
+  
+        sword OCIThreadMutexRelease(dvoid *hndl, OCIError *err,
+                                    OCIThreadMutex *mutex);
+  
+          hndl(IN/OUT): The OCI environment or session handle.
+  
+          err(IN/OUT): 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().
+  
+          mutex(IN/OUT):   The mutex to release.
+  
+      Returns
+  
+        OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
+  
+      Notes
+  
+        It is illegal to attempt to release an uninitialized mutex.  It is also
+        illegal for a thread to release a mutex that it does not hold.
+  
+  
+    OCIThreadKeyInit - OCIThread KeY Initialize
+    -------------------------------------------
+  
+      Description
+  
+        This creates a key.  Each call to this routine allocate and generates 
+        a new key that is distinct from all other keys.
+  
+      Prototype
+  
+        sword OCIThreadKeyInit(dvoid *hndl, OCIError *err, OCIThreadKey **key,
+                               OCIThreadKeyDestFunc destFn);
+  
+          hndl(IN/OUT): The OCI environment or session handle.
+  
+          err(IN/OUT): 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().
+  
+          key(OUT):    The 'OCIThreadKey' in which to create the new key.
+  
+          destFn(IN):  The destructor for the key.  NULL is permitted.
+  
+      Returns
+  
+        OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
+  
+      Notes
+  
+        Once 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 to create the
+        same key (i.e., 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 key's 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'.
+  
+  
+    OCIThreadKeyDestroy - OCIThread KeY DESTROY
+    -------------------------------------------
+  
+     Description
+  
+       Destroy and deallocate the key pointed to by 'key'.
+  
+      Prototype
+  
+        sword OCIThreadKeyDestroy(dvoid *hndl, OCIError *err, 
+                                  OCIThreadKey **key);
+  
+          hndl(IN/OUT): The OCI environment or session handle.
+  
+          err(IN/OUT): 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().
+  
+          key(IN/OUT):  The 'OCIThreadKey' in which to destroy the key.
+   
+      Returns
+  
+        OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
+  
+      Notes
+  
+        This is different from the destructor function callback passed to the
+        key create routine.  This new destroy function 'OCIThreadKeyDestroy' is 
+        used to terminate any resources OCI THREAD acquired when it created 
+        'key'.  [The 'OCIThreadKeyDestFunc' callback type is a key VALUE 
+        destructor; it does in no way operate on the key itself.]
+  
+        This must be called once the user has finished using the key.  Not
+        calling the key destroy function may result in memory leaks.
+  
+  
+  
+  
+  1.2.2.2 Thread Key operations
+  -------------------------------
+  
+    OCIThreadKeyGet - OCIThread KeY Get value
+    -----------------------------------------
+  
+      Description
+  
+        This gets the calling thread's current value for a key.
+  
+      Prototype
+  
+        sword OCIThreadKeyGet(dvoid *hndl, OCIError *err, OCIThreadKey *key,
+                              dvoid **pValue);
+  
+          hndl(IN/OUT): The OCI environment or session handle.
+  
+          err(IN/OUT): 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().
+  
+          key(IN):          The key.
+  
+          pValue(IN/OUT):   The location in which to place the thread-specific
+                            key value.
+  
+      Returns
+  
+        OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
+  
+      Notes
+  
+        It is illegal to use this function on a key that has not been created
+        using 'OCIThreadKeyInit()'.
+  
+        If the calling thread has not yet assigned a value to the key, 'NULL' is
+        placed in the location pointed to by 'pValue'.
+  
+  
+    OCIThreadKeySet - OCIThread KeY Set value
+    -----------------------------------------
+  
+      Description
+  
+        This sets the calling thread's value for a key.
+  
+      Prototype
+  
+        sword OCIThreadKeySet(dvoid *hndl, OCIError *err, OCIThreadKey *key,
+                              dvoid *value);
+  
+          hndl(IN/OUT): The OCI environment or session handle.
+  
+          err(IN/OUT): 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().
+  
+          key(IN/OUT): The key.
+  
+          value(IN):   The thread-specific value to set in the key.
+  
+      Returns
+  
+        OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
+  
+      Notes
+  
+        It is illegal to use this function on a key that has not been created
+        using 'OCIThreadKeyInit()'.
+  
+  1.2.2.3  Thread Id
+  --------------------
+  
+    OCIThreadIdInit - OCIThread Thread Id INITialize
+    --------------------------------------------------
+  
+      Description
+  
+        Allocate and initialize the thread id 'tid'.
+  
+      Prototype
+  
+        sword OCIThreadIdInit(dvoid *hndl, OCIError *err, OCIThreadId **tid);
+  
+          hndl(IN/OUT): The OCI environment or session handle.
+  
+          err(IN/OUT): 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().
+  
+          tid (OUT):   Pointer to the thread ID to initialize.
+  
+      Returns
+  
+        OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
+  
+  
+    OCIThreadIdDestroy - OCIThread Thread Id DESTROY
+    --------------------------------------------------
+  
+      Description
+  
+        Destroy and deallocate the thread id 'tid'.
+  
+      Prototype
+  
+        sword OCIThreadIdDestroy(dvoid *hndl, OCIError *err, OCIThreadId **tid);
+  
+          hndl(IN/OUT): The OCI environment or session handle.
+  
+          err(IN/OUT): 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().
+  
+          tid(IN/OUT):        Pointer to the thread ID to destroy.
+  
+      Returns
+  
+        OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
+  
+      Note
+  
+        'tid' should be initialized by OCIThreadIdInit().
+  
+  
+    OCIThreadIdSet - OCIThread Thread Id Set
+    -----------------------------------------
+  
+      Description
+  
+        This sets one 'OCIThreadId' to another.
+  
+      Prototype
+  
+        sword OCIThreadIdSet(dvoid *hndl, OCIError *err, 
+                             OCIThreadId *tidDest,
+                             OCIThreadId *tidSrc);
+  
+          hndl(IN/OUT): The OCI environment or session handle.
+  
+          err(IN/OUT): 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().
+  
+          tidDest(OUT):   This should point to the location of the 'OCIThreadId'
+                          to be set to.
+  
+          tidSrc(IN):     This should point to the 'OCIThreadId' to set from.
+  
+      Returns
+  
+        OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
+  
+      Notes
+  
+        'tid' should be initialized by OCIThreadIdInit().
+  
+  
+    OCIThreadIdSetNull - OCIThread Thread Id Set Null
+    ---------------------------------------------------------
+  
+      Description
+  
+        This sets the NULL thread ID to a given 'OCIThreadId'.
+  
+      Prototype
+  
+        sword OCIThreadIdSetNull(dvoid *hndl, OCIError *err,
+                                 OCIThreadId *tid);
+  
+          hndl(IN/OUT): The OCI environment or session handle.
+  
+          err(IN/OUT): The OCI error handle.  If there is an error, it is 
+                       recorded in err and this function returns OCI_ERROR.  
+                       Diagnostic information can be obtained by calling 
+                       OCIErrorGet().
+  
+          tid(OUT):    This should point to the 'OCIThreadId' in which to put
+                       the NULL thread ID.
+  
+      Returns
+  
+        OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
+  
+      Notes
+  
+        'tid' should be initialized by OCIThreadIdInit().
+  
+  
+    OCIThreadIdGet - OCIThread Thread Id Get
+    ------------------------------------------
+  
+      Description
+  
+        This retrieves the 'OCIThreadId' of the thread in which it is called.
+  
+      Prototype
+  
+        sword OCIThreadIdGet(dvoid *hndl, OCIError *err,
+                             OCIThreadId *tid);
+  
+          hndl(IN/OUT): The OCI environment or session handle.
+  
+          err(IN/OUT): 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().
+  
+          tid(OUT):    This should point to the location in which to place the
+                       ID of the calling thread.
+  
+      Returns
+  
+        OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
+  
+      Notes
+  
+        'tid' should be initialized by OCIThreadIdInit().
+  
+        When OCIThread is used in a single-threaded environment,
+        OCIThreadIdGet() will always place the same value in the location
+        pointed to by 'tid'.  The exact value itself is not important.  The
+        important thing is that it is not the same as the NULL thread ID and
+        that it is always the same value.
+  
+  
+    OCIThreadIdSame - OCIThread Thread Ids Same?
+    ----------------------------------------------
+  
+      Description
+  
+        This determines whether or not two 'OCIThreadId's represent the same
+        thread.
+  
+      Prototype
+  
+        sword OCIThreadIdSame(dvoid *hndl, OCIError *err,
+                              OCIThreadId *tid1, OCIThreadId *tid2,
+                              boolean *result);
+  
+          hndl(IN/OUT): The OCI environment or session handle.
+  
+          err(IN/OUT): 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().
+  
+          tid1(IN):   Pointer to the first 'OCIThreadId'.
+  
+          tid2(IN):   Pointer to the second 'OCIThreadId'.
+          
+          result(IN/OUT): Pointer to the result.
+  
+      Returns
+  
+        OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
+  
+      Notes
+  
+        If 'tid1' and 'tid2' represent the same thread, 'result' is set to TRUE.
+        Otherwise, 'result' is set to FALSE.
+  
+        'result' is set to TRUE if both 'tid1' and 'tid2' are the NULL thread ID.
+  
+        'ti1d' and 'tid2' should be initialized by OCIThreadIdInit().
+  
+  
+    OCIThreadIdNull - OCIThread Thread Id NULL?
+    ---------------------------------------------
+  
+      Description
+  
+        This determines whether or not a given 'OCIThreadId' is the NULL thread
+        ID.
+  
+      Prototype
+  
+        sword OCIThreadIdNull(dvoid *hndl, OCIError *err,
+                              OCIThreadId *tid,
+                              boolean *result);
+  
+          hndl(IN/OUT): The OCI environment or session handle.
+  
+          err(IN/OUT): 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().
+  
+          tid(IN):    Pointer to the 'OCIThreadId' to check.
+  
+          result(IN/OUT): Pointer to the result.
+  
+      Returns
+  
+        OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
+  
+      Notes
+  
+        If 'tid' is the NULL thread ID, 'result' is set to TRUE.  Otherwise, 
+        'result' is set to FALSE.
+  
+        'tid' should be initialized by OCIThreadIdInit().
+  
+  
+  1.3 Active Threading Primitives
+  =================================
+  
+  The active threading primitives deal with the manipulation of actual
+  threads.  Because the specifications of most of these primitives require
+  that it be possible to have multiple threads, they work correctly only in
+  the enabled OCIThread; In the disabled OCIThread, they always return
+  failure.  The exception is OCIThreadHandleGet(); it may be called in a 
+  single-threaded environment, in which case it will have no effect.
+  
+  Active primitives should only be called by code running in a multi-threaded
+  environment.  You can call OCIThreadIsMulti() to determine whether the 
+  environment is multi-threaded or single-threaded.
+  
+  
+  1.3.1  Types
+  --------------
+  
+  1.3.1.1    OCIThreadHandle - OCIThread Thread Handle
+  ------------------------------------------------------
+  
+    Type 'OCIThreadHandle' is used to manipulate a thread in the active
+    primitives:  OCIThreadJoin()and OCIThreadClose().  A thread handle opened by
+    OCIThreadCreate() must be closed in a matching call to
+    OCIThreadClose().  A thread handle is invalid after the call to
+    OCIThreadClose().
+  
+    The distinction between a thread ID and a thread handle in OCIThread usage
+    follows the distinction between the thread ID and the thread handle on
+    Windows NT.  On many platforms, the underlying native types are the same.
+  
+  
+  1.3.2  Functions
+  ------------------
+  
+    OCIThreadHndInit - OCIThread HaNDle Initialize
+    ----------------------------------------------
+  
+      Description
+  
+        Allocate and initialize the thread handle.
+  
+      Prototype
+  
+        sword OCIThreadHndInit(dvoid *hndl, OCIError *err, 
+                               OCIThreadHandle **thnd);
+  
+          hndl(IN/OUT): The OCI environment or session handle.
+  
+          err(IN/OUT): 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().
+  
+          thnd(OUT):   The address of pointer to the thread handle to initialize.
+  
+      Returns
+  
+        OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
+  
+  
+    OCIThreadHndDestroy - OCIThread HaNDle Destroy
+    ----------------------------------------------
+  
+      Description
+  
+        Destroy and deallocate the thread handle.
+  
+      Prototype
+  
+        sword OCIThreadHndDestroy(dvoid *hndl, OCIError *err, 
+                                  OCIThreadHandle **thnd);
+  
+          hndl(IN/OUT): The OCI environment or session handle.
+  
+          err(IN/OUT): 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().
+  
+          thnd(IN/OUT):  The address of pointer to the thread handle to destroy.
+  
+      Returns
+  
+        OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
+  
+      Notes
+  
+        'thnd' should be initialized by OCIThreadHndInit().
+  
+  
+    OCIThreadCreate - OCIThread Thread Create
+    -----------------------------------------
+  
+      Description
+  
+        This creates a new thread.
+  
+      Prototype
+  
+        sword OCIThreadCreate(dvoid *hndl, OCIError *err,
+                              void (*start)(dvoid *), dvoid *arg,
+                              OCIThreadId *tid, OCIThreadHandle *tHnd);
+  
+          hndl(IN/OUT): The OCI environment or session handle.
+  
+          err(IN/OUT): 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().
+  
+          start(IN):    The function in which the new thread should begin
+                        execution.
+  
+          arg(IN):      The argument to give the function pointed to by 'start'.
+  
+          tid(IN/OUT):  If not NULL, gets the ID for the new thread.
+  
+          tHnd(IN/OUT): If not NULL, gets the handle for the new thread.
+  
+      Returns
+  
+        OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
+  
+      Notes
+  
+        The new thread will start by executing a call to the function pointed
+        to by 'start' with the argument given by 'arg'.  When that function
+        returns, the new thread will terminate.  The function should not
+        return a value and should accept one parameter, a 'dvoid *'.
+  
+        The call to OCIThreadCreate() must be matched by a call to
+        OCIThreadClose() if and only if tHnd is non-NULL.
+  
+        If tHnd is NULL, a thread ID placed in *tid will not be valid in the
+        calling thread because the timing of the spawned thread's termination
+        is unknown.
+  
+        'tid' should be initialized by OCIThreadIdInit().
+  
+        'thnd' should be initialized by OCIThreadHndInit().
+  
+  
+  
+    OCIThreadJoin - OCIThread Thread Join
+    -------------------------------------
+  
+      Description
+  
+        This function allows the calling thread to 'join' with another thread.
+        It blocks the caller until the specified thread terminates.
+  
+      Prototype
+  
+        sword OCIThreadJoin(dvoid *hndl, OCIError *err, OCIThreadHandle *tHnd);
+  
+          hndl(IN/OUT): The OCI environment or session handle.
+  
+          err(IN/OUT): 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().
+  
+          tHnd(IN):    The 'OCIThreadHandle' of the thread to join with.
+  
+      Returns
+  
+        OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
+  
+      Notes
+  
+        'thnd' should be initialized by OCIThreadHndInit().
+  
+        The result of multiple threads all trying to join with the same thread is
+        undefined.
+  
+  
+    OCIThreadClose - OCIThread Thread Close
+    ---------------------------------------
+  
+     Description
+  
+       This function should be called to close a thread handle.
+  
+     Prototype
+  
+       sword OCIThreadClose(dvoid *hndl, OCIError *err, OCIThreadHandle *tHnd);
+  
+          hndl(IN/OUT): The OCI environment or session handle.
+  
+          err(IN/OUT): 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().
+  
+          tHnd(IN/OUT):    The OCIThread thread handle to close.
+  
+     Returns
+  
+        OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
+  
+     Notes
+  
+        'thnd' should be initialized by OCIThreadHndInit().
+  
+        Both thread handle and the thread ID that was returned by the same call
+        to OCIThreadCreate() are invalid after the call to OCIThreadClose().
+  
+  
+  
+    OCIThreadHandleGet - OCIThread Thread Get Handle
+    ------------------------------------------------
+  
+      Description
+  
+        Retrieve the 'OCIThreadHandle' of the thread in which it is called.
+  
+      Prototype
+  
+        sword OCIThreadHandleGet(dvoid *hndl, OCIError *err,
+                                 OCIThreadHandle *tHnd);
+  
+          hndl(IN/OUT): The OCI environment or session handle.
+  
+          err(IN/OUT): 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().
+  
+          tHnd(IN/OUT):      If not NULL, the location to place the thread
+                             handle for the thread.
+  
+       Returns
+  
+        OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
+  
+      Notes
+  
+        'thnd' should be initialized by OCIThreadHndInit().   
+  
+        The thread handle 'tHnd' retrieved by this function must be closed 
+        with OCIThreadClose() and destroyed by OCIThreadHndDestroy() after it
+        is used.
+  
+  
+  
+  
+  1.4 Using OCIThread
+  =====================
+  
+  This section summarizes some of the more important details relating to the use
+  of OCIThread.
+  
+    * Process initialization
+  
+      OCIThread only requires that the process initialization function
+      ('OCIThreadProcessInit()') be called when OCIThread is being used in a
+      multi-threaded application.  Failing to call 'OCIThreadProcessInit()' in
+      a single-threaded application is not an error.
+  
+    * OCIThread initialization
+  
+      Separate calls to 'OCIThreadInit()' will all return the same OCIThread
+      context.
+  
+      Also, remember that each call to 'OCIThreadInit()' must eventually be
+      matched by a call to 'OCIThreadTerm()'.
+  
+    * Active vs. Passive Threading primitives
+  
+      OCIThread client code written without using any active primitives can be
+      compiled and used without change on both single-threaded and
+      multi-threaded platforms.
+  
+      OCIThread client code written using active primitives will only work
+      correctly on multi-threaded platforms.  In order to write a version of the
+      same application to run on single-threaded platform, it is necessary to 
+      branch the your code, whether by branching versions of the source file or 
+      by branching at runtime with the OCIThreadIsMulti() call.
+  
+  ***************************************************************************** }
+  {****************************************************************************
+                           ACTUAL PROTOTYPE DECLARATIONS
+  ***************************************************************************** }
+{$IFNDEF LinkDynamically}
+  procedure OCIThreadProcessInit;cdecl;external ocilib name 'OCIThreadProcessInit';
+
+  function OCIThreadInit(hndl:Pdvoid; err:POCIError):sword;cdecl;external ocilib name 'OCIThreadInit';
+
+  function OCIThreadTerm(hndl:Pdvoid; err:POCIError):sword;cdecl;external ocilib name 'OCIThreadTerm';
+
+  function OCIThreadIsMulti:boolean;cdecl;external ocilib name 'OCIThreadIsMulti';
+
+  function OCIThreadMutexInit(hndl:Pdvoid; err:POCIError; var mutex:POCIThreadMutex):sword;cdecl;external ocilib name 'OCIThreadMutexInit';
+
+  function OCIThreadMutexDestroy(hndl:Pdvoid; err:POCIError; var mutex:POCIThreadMutex):sword;cdecl;external ocilib name 'OCIThreadMutexDestroy';
+
+  function OCIThreadMutexAcquire(hndl:Pdvoid; err:POCIError; mutex:POCIThreadMutex):sword;cdecl;external ocilib name 'OCIThreadMutexAcquire';
+
+  function OCIThreadMutexRelease(hndl:Pdvoid; err:POCIError; mutex:POCIThreadMutex):sword;cdecl;external ocilib name 'OCIThreadMutexRelease';
+
+  function OCIThreadKeyInit(hndl:Pdvoid; err:POCIError; var key:POCIThreadKey; destFn:OCIThreadKeyDestFunc):sword;cdecl;external ocilib name 'OCIThreadKeyInit';
+
+  function OCIThreadKeyDestroy(hndl:Pdvoid; err:POCIError; var key:POCIThreadKey):sword;cdecl;external ocilib name 'OCIThreadKeyDestroy';
+
+  function OCIThreadKeyGet(hndl:Pdvoid; err:POCIError; key:POCIThreadKey; pValue:PPdvoid):sword;cdecl;external ocilib name 'OCIThreadKeyGet';
+
+  function OCIThreadKeySet(hndl:Pdvoid; err:POCIError; key:POCIThreadKey; value:Pdvoid):sword;cdecl;external ocilib name 'OCIThreadKeySet';
+
+  function OCIThreadIdInit(hndl:Pdvoid; err:POCIError; var tid:POCIThreadId):sword;cdecl;external ocilib name 'OCIThreadIdInit';
+
+  function OCIThreadIdDestroy(hndl:Pdvoid; err:POCIError; var tid:POCIThreadId):sword;cdecl;external ocilib name 'OCIThreadIdDestroy';
+
+  function OCIThreadIdSet(hndl:Pdvoid; err:POCIError; tidDest:POCIThreadId; tidSrc:POCIThreadId):sword;cdecl;external ocilib name 'OCIThreadIdSet';
+
+  function OCIThreadIdSetNull(hndl:Pdvoid; err:POCIError; tid:POCIThreadId):sword;cdecl;external ocilib name 'OCIThreadIdSetNull';
+
+  function OCIThreadIdGet(hndl:Pdvoid; err:POCIError; tid:POCIThreadId):sword;cdecl;external ocilib name 'OCIThreadIdGet';
+
+  function OCIThreadIdSame(hndl:Pdvoid; err:POCIError; tid1:POCIThreadId; tid2:POCIThreadId; result:Pboolean):sword;cdecl;external ocilib name 'OCIThreadIdSame';
+
+  function OCIThreadIdNull(hndl:Pdvoid; err:POCIError; tid:POCIThreadId; result:Pboolean):sword;cdecl;external ocilib name 'OCIThreadIdNull';
+
+  function OCIThreadHndInit(hndl:Pdvoid; err:POCIError; var thnd:POCIThreadHandle):sword;cdecl;external ocilib name 'OCIThreadHndInit';
+
+  function OCIThreadHndDestroy(hndl:Pdvoid; err:POCIError; var thnd:POCIThreadHandle):sword;cdecl;external ocilib name 'OCIThreadHndDestroy';
+{$ELSE}
+var OCIThreadProcessInit : procedure;cdecl;
+
+   OCIThreadInit : function (hndl:Pdvoid; err:POCIError):sword;cdecl;
+
+   OCIThreadTerm : function (hndl:Pdvoid; err:POCIError):sword;cdecl;
+
+   OCIThreadIsMulti: function : boolean;cdecl;
+
+   OCIThreadMutexInit : function (hndl:Pdvoid; err:POCIError; var mutex:POCIThreadMutex):sword;cdecl;
+
+   OCIThreadMutexDestroy : function (hndl:Pdvoid; err:POCIError; var mutex:POCIThreadMutex):sword;cdecl;
+
+   OCIThreadMutexAcquire : function (hndl:Pdvoid; err:POCIError; mutex:POCIThreadMutex):sword;cdecl;
+
+   OCIThreadMutexRelease : function (hndl:Pdvoid; err:POCIError; mutex:POCIThreadMutex):sword;cdecl;
+
+   OCIThreadKeyInit : function (hndl:Pdvoid; err:POCIError; var key:POCIThreadKey; destFn:OCIThreadKeyDestFunc):sword;cdecl;
+
+   OCIThreadKeyDestroy : function (hndl:Pdvoid; err:POCIError; var key:POCIThreadKey):sword;cdecl;
+
+   OCIThreadKeyGet : function (hndl:Pdvoid; err:POCIError; key:POCIThreadKey; pValue:PPdvoid):sword;cdecl;
+
+   OCIThreadKeySet : function (hndl:Pdvoid; err:POCIError; key:POCIThreadKey; value:Pdvoid):sword;cdecl;
+
+   OCIThreadIdInit : function (hndl:Pdvoid; err:POCIError; var tid:POCIThreadId):sword;cdecl;
+
+   OCIThreadIdDestroy : function (hndl:Pdvoid; err:POCIError; var tid:POCIThreadId):sword;cdecl;
+
+   OCIThreadIdSet : function (hndl:Pdvoid; err:POCIError; tidDest:POCIThreadId; tidSrc:POCIThreadId):sword;cdecl;
+
+   OCIThreadIdSetNull : function (hndl:Pdvoid; err:POCIError; tid:POCIThreadId):sword;cdecl;
+
+   OCIThreadIdGet : function (hndl:Pdvoid; err:POCIError; tid:POCIThreadId):sword;cdecl;
+
+   OCIThreadIdSame : function (hndl:Pdvoid; err:POCIError; tid1:POCIThreadId; tid2:POCIThreadId; result:Pboolean):sword;cdecl;
+
+   OCIThreadIdNull : function (hndl:Pdvoid; err:POCIError; tid:POCIThreadId; result:Pboolean):sword;cdecl;
+
+   OCIThreadHndInit : function (hndl:Pdvoid; err:POCIError; var thnd:POCIThreadHandle):sword;cdecl;
+
+   OCIThreadHndDestroy : function (hndl:Pdvoid; err:POCIError; var thnd:POCIThreadHandle):sword;cdecl;
+{$ENDIF}
+
+  type
+    tstart = procedure (_para1:Pdvoid);
+
+{$IFNDEF LinkDynamically}
+  function OCIThreadCreate(hndl:Pdvoid; err:POCIError; start :tstart; arg:Pdvoid; tid:POCIThreadId;
+             tHnd:POCIThreadHandle):sword;cdecl;external ocilib name 'OCIThreadCreate';
+
+  function OCIThreadJoin(hndl:Pdvoid; err:POCIError; tHnd:POCIThreadHandle):sword;cdecl;external ocilib name 'OCIThreadJoin';
+
+  function OCIThreadClose(hndl:Pdvoid; err:POCIError; tHnd:POCIThreadHandle):sword;cdecl;external ocilib name 'OCIThreadClose';
+
+  function OCIThreadHandleGet(hndl:Pdvoid; err:POCIError; tHnd:POCIThreadHandle):sword;cdecl;external ocilib name 'OCIThreadHandleGet';
+{$ELSE}
+var OCIThreadCreate : function (hndl:Pdvoid; err:POCIError; start :tstart; arg:Pdvoid; tid:POCIThreadId;
+             tHnd:POCIThreadHandle):sword;cdecl;
+
+  OCIThreadJoin : function (hndl:Pdvoid; err:POCIError; tHnd:POCIThreadHandle):sword;cdecl;
+
+  OCIThreadClose : function (hndl:Pdvoid; err:POCIError; tHnd:POCIThreadHandle):sword;cdecl;
+
+  OCIThreadHandleGet : function (hndl:Pdvoid; err:POCIError; tHnd:POCIThreadHandle):sword;cdecl;
+{$ENDIF}
+
+  {----------------- End OCI Thread interface Extensions --------------------- }
+  {------------------ Begin OCI Row Callback Interfaces ---------------------- }
+
+  type
+
+     OCIBindRowCallback = function (ctx:Pdvoid):sword;cdecl;
+
+     OCIFetchRowCallback = function (ctx:Pdvoid):sword;cdecl;
+  {------------------ Begin OCI Row Callback Interfaces ---------------------- }
+  {--------------- Begin OCI Client Notification Interfaces ------------------ }
+
+     OCISubscriptionNotify = function (ctx:Pdvoid; subscrhp:POCISubscription; pay:Pdvoid; payl:ub4; desc:Pdvoid; 
+                  mode:ub4):ub4;cdecl;
+
+{$IFNDEF LinkDynamically}
+  function OCISubscriptionRegister(svchp:POCISvcCtx; var subscrhpp:POCISubscription; count:ub2; errhp:POCIError; mode:ub4):sword;cdecl;external ocilib name 'OCISubscriptionRegister';
+
+  function OCISubscriptionPost(svchp:POCISvcCtx; var subscrhpp:POCISubscription; count:ub2; errhp:POCIError; mode:ub4):sword;cdecl;external ocilib name 'OCISubscriptionPost';
+
+  function OCISubscriptionUnRegister(svchp:POCISvcCtx; subscrhp:POCISubscription; errhp:POCIError; mode:ub4):sword;cdecl;external ocilib name 'OCISubscriptionUnRegister';
+
+  function OCISubscriptionDisable(subscrhp:POCISubscription; errhp:POCIError; mode:ub4):sword;cdecl;external ocilib name 'OCISubscriptionDisable';
+
+  function OCISubscriptionEnable(subscrhp:POCISubscription; errhp:POCIError; mode:ub4):sword;cdecl;external ocilib name 'OCISubscriptionEnable';
+
+  {------------------- End OCI Publish/Subscribe Interfaces ------------------ }
+  {----------------- Extensions to Datetime interfaces ----------------------- }
+  {--------------------- Actual Prototypes ----------------------------------- }
+  function OCIDateTimeGetTime(hndl:Pdvoid; err:POCIError; datetime:POCIDateTime; hr:Pub1; mm:Pub1; 
+             ss:Pub1; fsec:Pub4):sword;cdecl;external ocilib name 'OCIDateTimeGetTime';
+
+  function OCIDateTimeGetDate(hndl:Pdvoid; err:POCIError; date:POCIDateTime; yr:Psb2; mnth:Pub1;
+             dy:Pub1):sword;cdecl;external ocilib name 'OCIDateTimeGetDate';
+
+  function OCIDateTimeGetTimeZoneOffset(hndl:Pdvoid; err:POCIError; datetime:POCIDateTime; hr:Psb1; mm:Psb1):sword;cdecl;external ocilib name 'OCIDateTimeGetTimeZoneOffset';
+
+  function OCIDateTimeConstruct(hndl:Pdvoid; err:POCIError; datetime:POCIDateTime; yr:sb2; mnth:ub1; 
+             dy:ub1; hr:ub1; mm:ub1; ss:ub1; fsec:ub4; 
+             timezone:POraText; timezone_length:size_t):sword;cdecl;external ocilib name 'OCIDateTimeConstruct';
+
+  function OCIDateTimeSysTimeStamp(hndl:Pdvoid; err:POCIError; sys_date:POCIDateTime):sword;cdecl;external ocilib name 'OCIDateTimeSysTimeStamp';
+
+  function OCIDateTimeAssign(hndl:Pdvoid; err:POCIError; from:POCIDateTime; cto:POCIDateTime):sword;cdecl;external ocilib name 'OCIDateTimeAssign';
+
+  function OCIDateTimeToText(hndl:Pdvoid; err:POCIError; date:POCIDateTime; fmt:POraText; fmt_length:ub1;
+             fsprec:ub1; lang_name:POraText; lang_length:size_t; buf_size:Pub4; buf:POraText):sword;cdecl;external ocilib name 'OCIDateTimeToText';
+
+  function OCIDateTimeFromText(hndl:Pdvoid; err:POCIError; date_str:POraText; dstr_length:size_t; fmt:POraText;
+             fmt_length:ub1; lang_name:POraText; lang_length:size_t; date:POCIDateTime):sword;cdecl;external ocilib name 'OCIDateTimeFromText';
+
+  function OCIDateTimeCompare(hndl:Pdvoid; err:POCIError; date1:POCIDateTime; date2:POCIDateTime; result:Psword):sword;cdecl;external ocilib name 'OCIDateTimeCompare';
+
+  function OCIDateTimeCheck(hndl:Pdvoid; err:POCIError; date:POCIDateTime; valid:Pub4):sword;cdecl;external ocilib name 'OCIDateTimeCheck';
+
+  function OCIDateTimeConvert(hndl:Pdvoid; err:POCIError; indate:POCIDateTime; outdate:POCIDateTime):sword;cdecl;external ocilib name 'OCIDateTimeConvert';
+
+  function OCIDateTimeSubtract(hndl:Pdvoid; err:POCIError; indate1:POCIDateTime; indate2:POCIDateTime; inter:POCIInterval):sword;cdecl;external ocilib name 'OCIDateTimeSubtract';
+
+  function OCIDateTimeIntervalAdd(hndl:Pdvoid; err:POCIError; datetime:POCIDateTime; inter:POCIInterval; outdatetime:POCIDateTime):sword;cdecl;external ocilib name 'OCIDateTimeIntervalAdd';
+
+  function OCIDateTimeIntervalSub(hndl:Pdvoid; err:POCIError; datetime:POCIDateTime; inter:POCIInterval; outdatetime:POCIDateTime):sword;cdecl;external ocilib name 'OCIDateTimeIntervalSub';
+
+  function OCIIntervalSubtract(hndl:Pdvoid; err:POCIError; minuend:POCIInterval; subtrahend:POCIInterval; result:POCIInterval):sword;cdecl;external ocilib name 'OCIIntervalSubtract';
+
+  function OCIIntervalAdd(hndl:Pdvoid; err:POCIError; addend1:POCIInterval; addend2:POCIInterval; result:POCIInterval):sword;cdecl;external ocilib name 'OCIIntervalAdd';
+
+  function OCIIntervalMultiply(hndl:Pdvoid; err:POCIError; inter:POCIInterval; nfactor:POCINumber; result:POCIInterval):sword;cdecl;external ocilib name 'OCIIntervalMultiply';
+
+  function OCIIntervalDivide(hndl:Pdvoid; err:POCIError; dividend:POCIInterval; divisor:POCINumber; result:POCIInterval):sword;cdecl;external ocilib name 'OCIIntervalDivide';
+
+  function OCIIntervalCompare(hndl:Pdvoid; err:POCIError; inter1:POCIInterval; inter2:POCIInterval; result:Psword):sword;cdecl;external ocilib name 'OCIIntervalCompare';
+
+  function OCIIntervalFromNumber(hndl:Pdvoid; err:POCIError; inter:POCIInterval; number:POCINumber):sword;cdecl;external ocilib name 'OCIIntervalFromNumber';
+
+  function OCIIntervalFromText(hndl:Pdvoid; err:POCIError; inpstr:POraText; str_len:size_t; result:POCIInterval):sword;cdecl;external ocilib name 'OCIIntervalFromText';
+
+  function OCIIntervalToText(hndl:Pdvoid; err:POCIError; inter:POCIInterval; lfprec:ub1; fsprec:ub1;
+             buffer:POraText; buflen:size_t; resultlen:Psize_t):sword;cdecl;external ocilib name 'OCIIntervalToText';
+
+  function OCIIntervalToNumber(hndl:Pdvoid; err:POCIError; inter:POCIInterval; number:POCINumber):sword;cdecl;external ocilib name 'OCIIntervalToNumber';
+
+  function OCIIntervalCheck(hndl:Pdvoid; err:POCIError; interval:POCIInterval; valid:Pub4):sword;cdecl;external ocilib name 'OCIIntervalCheck';
+
+  function OCIIntervalAssign(hndl:Pdvoid; err:POCIError; ininter:POCIInterval; outinter:POCIInterval):sword;cdecl;external ocilib name 'OCIIntervalAssign';
+
+  function OCIIntervalSetYearMonth(hndl:Pdvoid; err:POCIError; yr:sb4; mnth:sb4; result:POCIInterval):sword;cdecl;external ocilib name 'OCIIntervalSetYearMonth';
+
+  function OCIIntervalGetYearMonth(hndl:Pdvoid; err:POCIError; yr:Psb4; mnth:Psb4; result:POCIInterval):sword;cdecl;external ocilib name 'OCIIntervalGetYearMonth';
+
+  function OCIIntervalSetDaySecond(hndl:Pdvoid; err:POCIError; dy:sb4; hr:sb4; mm:sb4; 
+             ss:sb4; fsec:sb4; result:POCIInterval):sword;cdecl;external ocilib name 'OCIIntervalSetDaySecond';
+
+  function OCIIntervalGetDaySecond(hndl:Pdvoid; err:POCIError; dy:Psb4; hr:Psb4; mm:Psb4;
+             ss:Psb4; fsec:Psb4; result:POCIInterval):sword;cdecl;external ocilib name 'OCIIntervalGetDaySecond';
+
+  function OCIDateTimeToArray(hndl:Pdvoid; err:POCIError; datetime:POCIDateTime; reftz:POCIInterval; outarray:Pub1;
+             len:Pub4; fsprec:ub1):sword;cdecl;external ocilib name 'OCIDateTimeToArray';
+
+  function OCIDateTimeFromArray(hndl:Pdvoid; err:POCIError; inarray:Pub1; len:ub4; _type:ub1;
+             datetime:POCIDateTime; reftz:POCIInterval; fsprec:ub1):sword;cdecl;external ocilib name 'OCIDateTimeFromArray';
+
+  function OCIDateTimeGetTimeZoneName(hndl:Pdvoid; err:POCIError; datetime:POCIDateTime; buf:Pub1; buflen:Pub4):sword;cdecl;external ocilib name 'OCIDateTimeGetTimeZoneName';
+
+  function OCIIntervalFromTZ(hndl:Pdvoid; err:POCIError; inpstring:Poratext; str_len:size_t; result:POCIInterval):sword;cdecl;external ocilib name 'OCIIntervalFromTZ';
+
+  {----------------- End Datetime interface Extensions ----------------------- }
+  {----------------- Connection Pooling prototypes --------------------------- }
+  function OCIConnectionPoolCreate(envhp:POCIEnv; errhp:POCIError; poolhp:POCICPool; var poolName:POraText; poolNameLen:Psb4;
+             dblink:POraText; dblinkLen:sb4; connMin:ub4; connMax:ub4; connIncr:ub4; 
+             poolUserName:POraText; poolUserLen:sb4; poolPassword:POraText; poolPassLen:sb4; mode:ub4):sword;cdecl;external ocilib name 'OCIConnectionPoolCreate';
+
+  function OCIConnectionPoolDestroy(poolhp:POCICPool; errhp:POCIError; mode:ub4):sword;cdecl;external ocilib name 'OCIConnectionPoolDestroy';
+
+  {----------------- End Connection Pooling prototypes ----------------------- }
+  {-------------------- Session Pooling prototypes --------------------------- }
+  function OCISessionPoolCreate(envhp:POCIEnv; errhp:POCIError; spoolhp:POCISPool; var poolName:POraText; poolNameLen:Pub4;
+             connStr:POraText; connStrLen:ub4; sessMin:ub4; sessMax:ub4; sessIncr:ub4; 
+             userid:POraText; useridLen:ub4; password:POraText; passwordLen:ub4; mode:ub4):sword;cdecl;external ocilib name 'OCISessionPoolCreate';
+
+  function OCISessionPoolDestroy(spoolhp:POCISPool; errhp:POCIError; mode:ub4):sword;cdecl;external ocilib name 'OCISessionPoolDestroy';
+
+  function OCISessionGet(envhp:POCIEnv; errhp:POCIError; var svchp:POCISvcCtx; authhp:POCIAuthInfo; poolName:POraText;
+             poolName_len:ub4; tagInfo:POraText; tagInfo_len:ub4; var retTagInfo:POraText; retTagInfo_len:Pub4;
+             found:Pboolean; mode:ub4):sword;cdecl;external ocilib name 'OCISessionGet';
+
+  function OCISessionRelease(svchp:POCISvcCtx; errhp:POCIError; tag:POraText; tag_len:ub4; mode:ub4):sword;cdecl;external ocilib name 'OCISessionRelease';
+
+  {-------------------- End Session Pooling prototypes ----------------------- }
+  { --------------------- OCI Application Context -------------------------- }
+  function OCIAppCtxSet(sesshndl:pointer; nsptr:Pdvoid; nsptrlen:ub4; attrptr:Pdvoid; attrptrlen:ub4; 
+             valueptr:Pdvoid; valueptrlen:ub4; errhp:POCIError; mode:ub4):sword;cdecl;external ocilib name 'OCIAppCtxSet';
+
+  function OCIAppCtxClearAll(sesshndl:pointer; nsptr:Pdvoid; nsptrlen:ub4; errhp:POCIError; mode:ub4):sword;cdecl;external ocilib name 'OCIAppCtxClearAll';
+
+  {-------------------------------- OCIPing ---------------------------------- }
+  function OCIPing(svchp:POCISvcCtx; errhp:POCIError; mode:ub4):sword;cdecl;external ocilib name 'OCIPing';
+
+  {----------------- Kerberos Authentication prototypes ---------------------- }
+  function OCIKerbAttrSet(trgthndlp:POCISession; cred_use:ub4; ftgt_ticket:Pub1; ticket_len:ub4; session_key:Pub1; 
+             skey_len:ub4; ftgt_keytype:ub2; ftgt_ticket_flags:ub4; ftgt_auth_time:sb4; ftgt_start_time:sb4; 
+             ftgt_end_time:sb4; ftgt_renew_time:sb4; ftgt_client_principal:Ptext; ftgt_client_principal_len:ub4; ftgt_client_realm:Ptext; 
+             ftgt_client_realm_len:ub4; errhp:POCIError):sword;cdecl;external ocilib name 'OCIKerbAttrSet';
+
+  {------------------- End Kerberos Authentication prototypes ---------------- }
+  {------------------- Database Startup/Shutdown prototypes ------------------ }
+  function OCIDBStartup(svchp:POCISvcCtx; errhp:POCIError; admhp:POCIAdmin; mode:ub4; flags:ub4):sword;cdecl;external ocilib name 'OCIDBStartup';
+
+  function OCIDBShutdown(svchp:POCISvcCtx; errhp:POCIError; admhp:POCIAdmin; mode:ub4):sword;cdecl;external ocilib name 'OCIDBShutdown';
+
+  {------------------ End Database Startup/Shutdown prototypes --------------- }
+  {----------------------- OCIClientVersion ------------------------------ }
+  procedure OCIClientVersion(major_version:Psword; minor_version:Psword; update_num:Psword; patch_num:Psword; port_update_num:Psword);cdecl;external ocilib name 'OCIClientVersion';
+
+  {----------------------- End OCIClientVersion -------------------------- }
+  {----------------------- HA Event prototypes ------------------------------ }
+  function OCIInitEventHandle(errhp:POCIError; event:POCIEvent; str:Ptext; size:ub4):sword;cdecl;external ocilib name 'OCIInitEventHandle';
+
+  {----------------------- End HA Event prototypes -------------------------- }
+
+{$ELSE}
+
+var OCISubscriptionRegister : function (svchp:POCISvcCtx; var subscrhpp:POCISubscription; count:ub2; errhp:POCIError; mode:ub4):sword;cdecl;
+
+   OCISubscriptionPost : function (svchp:POCISvcCtx; var subscrhpp:POCISubscription; count:ub2; errhp:POCIError; mode:ub4):sword;cdecl;
+
+   OCISubscriptionUnRegister : function (svchp:POCISvcCtx; subscrhp:POCISubscription; errhp:POCIError; mode:ub4):sword;cdecl;
+
+   OCISubscriptionDisable : function (subscrhp:POCISubscription; errhp:POCIError; mode:ub4):sword;cdecl;
+
+   OCISubscriptionEnable : function (subscrhp:POCISubscription; errhp:POCIError; mode:ub4):sword;cdecl;
+
+  {------------------- End OCI Publish/Subscribe Interfaces ------------------ }
+  {----------------- Extensions to Datetime interfaces ----------------------- }
+  {--------------------- Actual Prototypes ----------------------------------- }
+   OCIDateTimeGetTime : function (hndl:Pdvoid; err:POCIError; datetime:POCIDateTime; hr:Pub1; mm:Pub1;
+             ss:Pub1; fsec:Pub4):sword;cdecl;
+
+   OCIDateTimeGetDate : function (hndl:Pdvoid; err:POCIError; date:POCIDateTime; yr:Psb2; mnth:Pub1;
+             dy:Pub1):sword;cdecl;
+
+   OCIDateTimeGetTimeZoneOffset : function (hndl:Pdvoid; err:POCIError; datetime:POCIDateTime; hr:Psb1; mm:Psb1):sword;cdecl;
+
+   OCIDateTimeConstruct : function (hndl:Pdvoid; err:POCIError; datetime:POCIDateTime; yr:sb2; mnth:ub1;
+             dy:ub1; hr:ub1; mm:ub1; ss:ub1; fsec:ub4;
+             timezone:POraText; timezone_length:size_t):sword;cdecl;
+
+   OCIDateTimeSysTimeStamp : function (hndl:Pdvoid; err:POCIError; sys_date:POCIDateTime):sword;cdecl;
+
+   OCIDateTimeAssign : function (hndl:Pdvoid; err:POCIError; from:POCIDateTime; cto:POCIDateTime):sword;cdecl;
+
+   OCIDateTimeToText : function (hndl:Pdvoid; err:POCIError; date:POCIDateTime; fmt:POraText; fmt_length:ub1;
+             fsprec:ub1; lang_name:POraText; lang_length:size_t; buf_size:Pub4; buf:POraText):sword;cdecl;
+
+   OCIDateTimeFromText : function (hndl:Pdvoid; err:POCIError; date_str:POraText; dstr_length:size_t; fmt:POraText;
+             fmt_length:ub1; lang_name:POraText; lang_length:size_t; date:POCIDateTime):sword;cdecl;
+
+   OCIDateTimeCompare : function (hndl:Pdvoid; err:POCIError; date1:POCIDateTime; date2:POCIDateTime; result:Psword):sword;cdecl;
+
+   OCIDateTimeCheck : function (hndl:Pdvoid; err:POCIError; date:POCIDateTime; valid:Pub4):sword;cdecl;
+
+   OCIDateTimeConvert : function (hndl:Pdvoid; err:POCIError; indate:POCIDateTime; outdate:POCIDateTime):sword;cdecl;
+
+   OCIDateTimeSubtract : function (hndl:Pdvoid; err:POCIError; indate1:POCIDateTime; indate2:POCIDateTime; inter:POCIInterval):sword;cdecl;
+
+   OCIDateTimeIntervalAdd : function (hndl:Pdvoid; err:POCIError; datetime:POCIDateTime; inter:POCIInterval; outdatetime:POCIDateTime):sword;cdecl;
+
+   OCIDateTimeIntervalSub : function (hndl:Pdvoid; err:POCIError; datetime:POCIDateTime; inter:POCIInterval; outdatetime:POCIDateTime):sword;cdecl;
+
+   OCIIntervalSubtract : function (hndl:Pdvoid; err:POCIError; minuend:POCIInterval; subtrahend:POCIInterval; result:POCIInterval):sword;cdecl;
+
+   OCIIntervalAdd : function (hndl:Pdvoid; err:POCIError; addend1:POCIInterval; addend2:POCIInterval; result:POCIInterval):sword;cdecl;
+
+   OCIIntervalMultiply : function (hndl:Pdvoid; err:POCIError; inter:POCIInterval; nfactor:POCINumber; result:POCIInterval):sword;cdecl;
+
+   OCIIntervalDivide : function (hndl:Pdvoid; err:POCIError; dividend:POCIInterval; divisor:POCINumber; result:POCIInterval):sword;cdecl;
+
+   OCIIntervalCompare : function (hndl:Pdvoid; err:POCIError; inter1:POCIInterval; inter2:POCIInterval; result:Psword):sword;cdecl;
+
+   OCIIntervalFromNumber : function (hndl:Pdvoid; err:POCIError; inter:POCIInterval; number:POCINumber):sword;cdecl;
+
+   OCIIntervalFromText : function (hndl:Pdvoid; err:POCIError; inpstr:POraText; str_len:size_t; result:POCIInterval):sword;cdecl;
+
+   OCIIntervalToText : function (hndl:Pdvoid; err:POCIError; inter:POCIInterval; lfprec:ub1; fsprec:ub1;
+             buffer:POraText; buflen:size_t; resultlen:Psize_t):sword;cdecl;
+
+   OCIIntervalToNumber : function (hndl:Pdvoid; err:POCIError; inter:POCIInterval; number:POCINumber):sword;cdecl;
+
+   OCIIntervalCheck : function (hndl:Pdvoid; err:POCIError; interval:POCIInterval; valid:Pub4):sword;cdecl;
+
+   OCIIntervalAssign : function (hndl:Pdvoid; err:POCIError; ininter:POCIInterval; outinter:POCIInterval):sword;cdecl;
+
+   OCIIntervalSetYearMonth : function (hndl:Pdvoid; err:POCIError; yr:sb4; mnth:sb4; result:POCIInterval):sword;cdecl;
+
+   OCIIntervalGetYearMonth : function (hndl:Pdvoid; err:POCIError; yr:Psb4; mnth:Psb4; result:POCIInterval):sword;cdecl;
+
+   OCIIntervalSetDaySecond : function (hndl:Pdvoid; err:POCIError; dy:sb4; hr:sb4; mm:sb4;
+             ss:sb4; fsec:sb4; result:POCIInterval):sword;cdecl;
+
+   OCIIntervalGetDaySecond : function (hndl:Pdvoid; err:POCIError; dy:Psb4; hr:Psb4; mm:Psb4;
+             ss:Psb4; fsec:Psb4; result:POCIInterval):sword;cdecl;
+
+   OCIDateTimeToArray : function (hndl:Pdvoid; err:POCIError; datetime:POCIDateTime; reftz:POCIInterval; outarray:Pub1;
+             len:Pub4; fsprec:ub1):sword;cdecl;
+
+   OCIDateTimeFromArray : function (hndl:Pdvoid; err:POCIError; inarray:Pub1; len:ub4; _type:ub1;
+             datetime:POCIDateTime; reftz:POCIInterval; fsprec:ub1):sword;cdecl;
+
+   OCIDateTimeGetTimeZoneName : function (hndl:Pdvoid; err:POCIError; datetime:POCIDateTime; buf:Pub1; buflen:Pub4):sword;cdecl;
+
+   OCIIntervalFromTZ : function (hndl:Pdvoid; err:POCIError; inpstring:Poratext; str_len:size_t; result:POCIInterval):sword;cdecl;
+
+  {----------------- End Datetime interface Extensions ----------------------- }
+  {----------------- Connection Pooling prototypes --------------------------- }
+   OCIConnectionPoolCreate : function (envhp:POCIEnv; errhp:POCIError; poolhp:POCICPool; var poolName:POraText; poolNameLen:Psb4;
+             dblink:POraText; dblinkLen:sb4; connMin:ub4; connMax:ub4; connIncr:ub4;
+             poolUserName:POraText; poolUserLen:sb4; poolPassword:POraText; poolPassLen:sb4; mode:ub4):sword;cdecl;
+
+   OCIConnectionPoolDestroy : function (poolhp:POCICPool; errhp:POCIError; mode:ub4):sword;cdecl;
+
+  {----------------- End Connection Pooling prototypes ----------------------- }
+  {-------------------- Session Pooling prototypes --------------------------- }
+   OCISessionPoolCreate : function (envhp:POCIEnv; errhp:POCIError; spoolhp:POCISPool; var poolName:POraText; poolNameLen:Pub4;
+             connStr:POraText; connStrLen:ub4; sessMin:ub4; sessMax:ub4; sessIncr:ub4;
+             userid:POraText; useridLen:ub4; password:POraText; passwordLen:ub4; mode:ub4):sword;cdecl;
+
+   OCISessionPoolDestroy : function (spoolhp:POCISPool; errhp:POCIError; mode:ub4):sword;cdecl;
+
+   OCISessionGet : function (envhp:POCIEnv; errhp:POCIError; var svchp:POCISvcCtx; authhp:POCIAuthInfo; poolName:POraText;
+             poolName_len:ub4; tagInfo:POraText; tagInfo_len:ub4; var retTagInfo:POraText; retTagInfo_len:Pub4;
+             found:Pboolean; mode:ub4):sword;cdecl;
+
+   OCISessionRelease : function (svchp:POCISvcCtx; errhp:POCIError; tag:POraText; tag_len:ub4; mode:ub4):sword;cdecl;
+
+  {-------------------- End Session Pooling prototypes ----------------------- }
+  { --------------------- OCI Application Context -------------------------- }
+   OCIAppCtxSet : function (sesshndl:pointer; nsptr:Pdvoid; nsptrlen:ub4; attrptr:Pdvoid; attrptrlen:ub4;
+             valueptr:Pdvoid; valueptrlen:ub4; errhp:POCIError; mode:ub4):sword;cdecl;
+
+   OCIAppCtxClearAll : function (sesshndl:pointer; nsptr:Pdvoid; nsptrlen:ub4; errhp:POCIError; mode:ub4):sword;cdecl;
+
+  {-------------------------------- OCIPing ---------------------------------- }
+   OCIPing : function (svchp:POCISvcCtx; errhp:POCIError; mode:ub4):sword;cdecl;
+
+  {----------------- Kerberos Authentication prototypes ---------------------- }
+   OCIKerbAttrSet : function (trgthndlp:POCISession; cred_use:ub4; ftgt_ticket:Pub1; ticket_len:ub4; session_key:Pub1;
+             skey_len:ub4; ftgt_keytype:ub2; ftgt_ticket_flags:ub4; ftgt_auth_time:sb4; ftgt_start_time:sb4;
+             ftgt_end_time:sb4; ftgt_renew_time:sb4; ftgt_client_principal:Ptext; ftgt_client_principal_len:ub4; ftgt_client_realm:Ptext;
+             ftgt_client_realm_len:ub4; errhp:POCIError):sword;cdecl;
+
+  {------------------- End Kerberos Authentication prototypes ---------------- }
+  {------------------- Database Startup/Shutdown prototypes ------------------ }
+   OCIDBStartup : function (svchp:POCISvcCtx; errhp:POCIError; admhp:POCIAdmin; mode:ub4; flags:ub4):sword;cdecl;
+
+   OCIDBShutdown : function (svchp:POCISvcCtx; errhp:POCIError; admhp:POCIAdmin; mode:ub4):sword;cdecl;
+
+  {------------------ End Database Startup/Shutdown prototypes --------------- }
+  {----------------------- OCIClientVersion ------------------------------ }
+   OCIClientVersion : procedure (major_version:Psword; minor_version:Psword; update_num:Psword; patch_num:Psword; port_update_num:Psword);cdecl;
+
+  {----------------------- End OCIClientVersion -------------------------- }
+  {----------------------- HA Event prototypes ------------------------------ }
+   OCIInitEventHandle : function (errhp:POCIError; event:POCIEvent; str:Ptext; size:ub4):sword;cdecl;
+
+  {----------------------- End HA Event prototypes -------------------------- }
+
+
+{$ENDIF}
+  {---------------------------------------------------------------------------
+                            PRIVATE FUNCTIONS
+    --------------------------------------------------------------------------- }
+  { the following functions are depracated and should not be used  }
+{$ifdef NEVER}
+
+  function OCIStmtBindByPos(stmtp:POCIStmt; bindp:POCIBind; errhp:POCIError; position:ub4; valuep:Pdvoid; 
+             value_sz:sb4; dty:ub2; indp:Pdvoid; alenp:Pub2; rcodep:Pub2; 
+             maxarr_len:ub4; curelep:Pub4; mode:ub4):sword;cdecl;external ocilib name 'OCIStmtBindByPos';
+
+(* Const before type ignored *)
+  function OCIStmtBindByName(stmtp:POCIStmt; bindp:POCIBind; errhp:POCIError; placeholder:POraText; placeh_len:sb4; 
+             valuep:Pdvoid; value_sz:sb4; dty:ub2; indp:Pdvoid; alenp:Pub2; 
+             rcodep:Pub2; maxarr_len:ub4; curelep:Pub4; mode:ub4):sword;cdecl;external ocilib name 'OCIStmtBindByName';
+
+  function ocidefn(stmtp:POCIStmt; defnp:POCIDefine; errhp:POCIError; position:ub4; valuep:Pdvoid; 
+             value_sz:sb4; dty:ub2; indp:Pdvoid; rlenp:Pub2; rcodep:Pub2; 
+             mode:ub4):sword;cdecl;external ocilib name 'ocidefn';
+
+{$endif}
+  { NEVER  }
+{$endif}
+  { OCIAP_ORACLE  }
+
+

+ 336 - 0
packages/base/oracle/ocidfn.inc

@@ -0,0 +1,336 @@
+
+{
+  Automatically converted by H2Pas 1.0.0 from ocidfn.h
+  The following command line parameters were used:
+    -p
+    -D
+    -l
+    jojo.so
+    ocidfn.h
+}
+
+{$PACKRECORDS C}
+
+  {
+   * $Header: ocidfn.h 25-nov-2002.11:03:03 srseshad Exp $ 
+    }
+  { Copyright (c) 1991, 2002, Oracle Corporation.  All rights reserved.   }
+  { Copyright (c) 1991, 2002, Oracle Corporation.  All rights reserved.   }
+  {
+     NAME
+       ocidfn.h - OCI Definations
+     NOTES
+       Shipped to users.
+     MODIFIED   (MM/DD/YY)
+      srseshad   11/25/02 - change binary float/double codes
+      srseshad   11/14/02 - Add SQLT_IBFLOAT, SQLT_IBDOUBLE
+      mxyang     09/17/02 - grabtrans 'mmorsi_obj_float'
+      srseshad   09/06/02 - Add binary float/double
+      aahluwal   06/04/02 - bug 2360115
+      kmuthukk   05/02/00 - add SQLT_PNTY
+      amangal    07/30/99 - Merge into 8.1.6 : Bug 879031
+      tnbui      07/28/99 - Remove SQLT_TIMESTAMP_ITZ                            
+      tnbui      07/21/99 - SQLT_TIMESTAMP_LTZ                                   
+      tnbui      06/16/99 - TIMESTAMP WITH IMPLICIT TIME ZONE                    
+      whe        04/07/99 - bug#810075
+      whe        03/19/99 - lrg 32079 etc.: move HDA def from ocidem.h to ocidfn.
+      skmishra   05/10/98 -
+      vyanaman   04/16/98 - update sql92 datatypes
+      khnguyen   01/16/98 -
+      khnguyen   12/23/97 - SQLT* for datetimes and intervals
+      tanguyen   08/19/97 -
+      dchatter   03/18/97 -  porting exception 390897
+      dchatter   05/02/97 -   merge porting exception
+      dalpern    12/04/96 -   SQLCS_LIT_NULL added
+      cxcheng    11/14/96 -   add SQLT_BFILE/SQLT_CFILE to fix compile prob
+      cxcheng    11/12/96 -   add SQLT_NCO for named collection
+      lchidamb   10/17/96 -   add SQLT_VST and SQLT_ODT
+      sgollapu   10/14/96 -   Mutual exclusion of ocidfn and sqldef
+      sgollapu   10/07/96 -   OCI Simplification
+      aroy       09/09/96 -   add SQLCS* definitions
+      slari      08/07/96 -  add SQLT_RDD, rowid descriptor
+      slari      06/12/96 -  remove SQLT_TTBL
+      dchatter   04/21/96 -  prepare for merge into main
+      slari      08/24/95 -  b299432, define CDA_SIZE
+      zwalcott   02/28/96 -  add SQLT_BFILEE and SQLT_CFILEE.
+      lchidamb   02/22/96 -  make dtys consistent with dtydef.h
+      lchidamb   02/16/96 -  add SQLT_BFILEE and SQLT_CFILEE
+      lchidamb   01/30/96 -  rename new datatypes for v8
+      lchidamb   09/06/95 -  add new datatypes
+      slari      05/11/95 -  add OCI_EV_DEF and OCI_EV_TSF
+      dchatter   04/06/95 -  add ifdef flags around OCI_flags
+      dchatter   03/08/95 -  piece values
+      dchatter   03/06/95 -  merge changes from branch 1.2.720.3
+      jfbrown    02/17/95 -  merge changes from branch 1.2.720.2
+      dchatter   02/08/95 -  olog call modes
+      jfbrown    02/03/95 -  remove non-printable characters
+      lchidamb   12/06/94 -  merge changes from branch 1.2.720.1
+      lchidamb   10/04/94 -  added field chk to cda_head, cda_def
+      dchatter   07/05/94 -  SQLT_CUR added
+      rkooi2     11/27/92 -  Changing e* datatypes to s* 
+      rkooi2     10/26/92 -  More portability mods 
+      rkooi2     10/22/92 -  Added #ifndef ORATYPES ... 
+      rkooi2     10/18/92 -  Changes to make it portable. 
+      sjain      03/16/92 -  Creation 
+   }
+  {
+   *  ocidfn.h
+   *
+   *  Common header file for OCI C sample programs.
+   *  This header declares the cursor and logon data area structure.
+   *  The types used are defined in <oratypes.h>.
+   *
+    }
+  { The cda_head struct is strictly PRIVATE.  It is used
+     internally only. Do not use this struct in OCI programs.  }
+  type
+     Pdvoid  = pointer;
+     Ppdvoid  = ^Pdvoid;
+     PPpdvoid  = ^PPdvoid;
+
+  type
+     Pcda_head = ^cda_head;
+     cda_head = record
+          v2_rc : sb2;
+          ft : ub2;
+          rpc : ub4;
+          peo : ub2;
+          fc : ub1;
+          rcs1 : ub1;
+          rc : ub2;
+          wrn : ub1;
+          rcs2 : ub1;
+          rcs3 : sword;
+          rid : record
+               rd : record
+                    rcs4 : ub4;
+                    rcs5 : ub2;
+                    rcs6 : ub1;
+                 end;
+               rcs7 : ub4;
+               rcs8 : ub2;
+            end;
+          ose : sword;
+          chk : ub1;
+          rcsp : Pdvoid;
+       end;
+
+  {
+  ** Size of HDA area:
+  ** 512 for 64 bit arquitectures
+  ** 256 for 32 bit arquitectures
+   }
+{ $if defined(SS_64BIT_SERVER) || defined(__64BIT__)}
+
+//  const
+//     HDA_SIZE = 512;
+{ $else}
+
+  const
+     HDA_SIZE = 256;
+{ $endif}
+{ $if defined(SS_64BIT_SERVER) || defined(__64BIT__)}
+
+//  const
+//     CDA_SIZE = 88;
+{ $else}
+
+  const
+     CDA_SIZE = 64;     
+{ $endif}
+  { the real CDA, padded to CDA_SIZE bytes in size  }
+  { V2 return code  }
+  { SQL function type  }
+  { rows processed count  }
+  { parse error offset  }
+  { OCI function code  }
+  { filler area  }
+  { V7 return code  }
+  { warning flags  }
+  { reserved  }
+  { reserved  }
+  { rowid structure  }
+  { OSD dependent error  }
+  { pointer to reserved area  }
+  {  ub1          rcs9[CDA_SIZE - sizeof (struct cda_head)];        filler  }
+
+  type
+     Pcda_def = ^cda_def;
+     cda_def = record
+          v2_rc : sb2;
+          ft : ub2;
+          rpc : ub4;
+          peo : ub2;
+          fc : ub1;
+          rcs1 : ub1;
+          rc : ub2;
+          wrn : ub1;
+          rcs2 : ub1;
+          rcs3 : sword;
+          rid : record
+               rd : record
+                    rcs4 : ub4;
+                    rcs5 : ub2;
+                    rcs6 : ub1;
+                 end;
+               rcs7 : ub4;
+               rcs8 : ub2;
+            end;
+          ose : sword;
+          chk : ub1;
+          rcsp : Pdvoid;
+       end;
+
+  { the logon data area (LDA)
+     is the same shape as the CDA  }
+     Lda_def = cda_Def;
+     PLda_def = ^Lda_def;
+  { OCI Environment Modes for opinit call  }
+  { default single-threaded environment  }
+
+  const
+     OCI_EV_DEF = 0;     
+  { thread-safe environment  }
+     OCI_EV_TSF = 1;     
+  { OCI Logon Modes for olog call  }
+  { default login  }
+     OCI_LM_DEF = 0;     
+  { non-blocking logon  }
+     OCI_LM_NBL = 1;     
+  { 
+   * since sqllib uses both ocidef and ocidfn the following defines
+   * need to be guarded
+    }
+
+  { OCI_*_PIECE defines the piece types that are returned or set
+   }
+  { there or this is the only piece  }
+
+  const
+     OCI_ONE_PIECE = 0;     
+  { the first of many pieces  }
+     OCI_FIRST_PIECE = 1;     
+  { the next of many pieces  }
+     OCI_NEXT_PIECE = 2;     
+  { the last piece of this column  }
+     OCI_LAST_PIECE = 3;     
+
+  { input data types  }
+  { (ORANET TYPE) character string  }
+
+  const
+     SQLT_CHR = 1;     
+  { (ORANET TYPE) oracle numeric  }
+     SQLT_NUM = 2;     
+  { (ORANET TYPE) integer  }
+     SQLT_INT = 3;     
+  { (ORANET TYPE) Floating point number  }
+     SQLT_FLT = 4;     
+  { zero terminated string  }
+     SQLT_STR = 5;     
+  { NUM with preceding length byte  }
+     SQLT_VNU = 6;     
+  { (ORANET TYPE) Packed Decimal Numeric  }
+     SQLT_PDN = 7;     
+  { long  }
+     SQLT_LNG = 8;     
+  { Variable character string  }
+     SQLT_VCS = 9;     
+  { Null/empty PCC Descriptor entry  }
+     SQLT_NON = 10;     
+  { rowid  }
+     SQLT_RID = 11;     
+  { date in oracle format  }
+     SQLT_DAT = 12;     
+  { binary in VCS format  }
+     SQLT_VBI = 15;     
+  { Native Binary float }
+     SQLT_BFLOAT = 21;     
+  { NAtive binary double  }
+     SQLT_BDOUBLE = 22;     
+  { binary data(DTYBIN)  }
+     SQLT_BIN = 23;     
+  { long binary  }
+     SQLT_LBI = 24;     
+  { unsigned integer  }
+     SQLT_UIN = 68;     
+  { Display sign leading separate  }
+     SQLT_SLS = 91;     
+  { Longer longs (char)  }
+     SQLT_LVC = 94;     
+  { Longer long binary  }
+     SQLT_LVB = 95;     
+  { Ansi fixed char  }
+     SQLT_AFC = 96;     
+  { Ansi Var char  }
+     SQLT_AVC = 97;     
+  { binary float canonical  }
+     SQLT_IBFLOAT = 100;     
+  { binary double canonical  }
+     SQLT_IBDOUBLE = 101;     
+  { cursor  type  }
+     SQLT_CUR = 102;     
+  { rowid descriptor  }
+     SQLT_RDD = 104;     
+  { label type  }
+     SQLT_LAB = 105;     
+  { oslabel type  }
+     SQLT_OSL = 106;     
+  { named object type  }
+     SQLT_NTY = 108;     
+  { ref type  }
+     SQLT_REF = 110;     
+  { character lob  }
+     SQLT_CLOB = 112;     
+  { binary lob  }
+     SQLT_BLOB = 113;     
+  { binary file lob  }
+     SQLT_BFILEE = 114;     
+  { character file lob  }
+     SQLT_CFILEE = 115;     
+  { result set type  }
+     SQLT_RSET = 116;     
+  { named collection type (varray or nested table)  }
+     SQLT_NCO = 122;     
+  { OCIString type  }
+     SQLT_VST = 155;     
+  { OCIDate type  }
+     SQLT_ODT = 156;     
+  { datetimes and intervals  }
+  { ANSI Date  }
+     SQLT_DATE = 184;     
+  { TIME  }
+     SQLT_TIME = 185;     
+  { TIME WITH TIME ZONE  }
+     SQLT_TIME_TZ = 186;     
+  { TIMESTAMP  }
+     SQLT_TIMESTAMP = 187;     
+  { TIMESTAMP WITH TIME ZONE  }
+     SQLT_TIMESTAMP_TZ = 188;     
+  { INTERVAL YEAR TO MONTH  }
+     SQLT_INTERVAL_YM = 189;     
+  { INTERVAL DAY TO SECOND  }
+     SQLT_INTERVAL_DS = 190;     
+  { TIMESTAMP WITH LOCAL TZ  }
+     SQLT_TIMESTAMP_LTZ = 232;     
+  { pl/sql representation of named types  }
+     SQLT_PNTY = 241;     
+  { cxcheng: this has been added for backward compatibility -
+     it needs to be here because ocidfn.h can get included ahead of sqldef.h  }
+  { binary file lob  }
+     SQLT_FILE = SQLT_BFILEE;     
+     SQLT_CFILE = SQLT_CFILEE;     
+     SQLT_BFILE = SQLT_BFILEE;     
+  { CHAR/NCHAR/VARCHAR2/NVARCHAR2/CLOB/NCLOB char set "form" information  }
+  { for CHAR, VARCHAR2, CLOB w/o a specified set  }
+     SQLCS_IMPLICIT = 1;     
+  { for NCHAR, NCHAR VARYING, NCLOB  }
+     SQLCS_NCHAR = 2;     
+  { for CHAR, etc, with "CHARACTER SET ..." syntax  }
+     SQLCS_EXPLICIT = 3;     
+  { for PL/SQL "flexible" parameters  }
+     SQLCS_FLEXIBLE = 4;     
+  { for typecheck of NULL and empty_clob() lits  }
+     SQLCS_LIT_NULL = 5;     
+
+

+ 8 - 0
packages/base/oracle/ocidyn.pp

@@ -0,0 +1,8 @@
+unit OCIdyn;
+
+{$DEFINE LinkDynamically}
+
+{$i oci.inc}
+
+end.
+

+ 282 - 0
packages/base/oracle/oratypes.pp

@@ -0,0 +1,282 @@
+
+unit oratypes;
+interface
+
+{
+  Automatically converted by H2Pas 1.0.0 from oratypes.h
+  The following command line parameters were used:
+    -p
+    -D
+    -l
+    jojo
+    oratypes.h
+}
+
+    { Pointers to basic pascal types, inserted by h2pas conversion program.}
+    Type
+      PLongint  = ^Longint;
+      PSmallInt = ^SmallInt;
+      PByte     = ^Byte;
+      PWord     = ^Word;
+      PDWord    = ^DWord;
+      PDouble   = ^Double;
+
+
+{$PACKRECORDS C}
+
+
+  { $RCSfile: oratypes.h $ $Date: 20-jul-00.13:44:19 
+     ----------------------------------------------------------------------
+     Copyright (c) 1982, 2003, Oracle.  All rights reserved.
+     ----------------------------------------------------------------------  }
+{$define ORATYPES}
+{$define SX_ORACLE}  
+{$define SX3_ORACLE}  
+
+{$ifndef ORASTDDEF}
+{ $include <stddef.h>}
+{ $define ORASTDDEF}
+{$endif}
+
+{$ifndef ORALIMITS}
+{ $include <limits.h>}
+{ $define ORALIMITS}
+{$endif}
+
+
+// Not needed for pascal
+{  const
+     TRUE = 1;     
+     FALSE = 0;     }
+
+  { --- Signed/Unsigned one-byte scalar (sb1/ub1) ---  }
+
+  type
+
+     Pub1 = ^ub1;
+     ub1 = byte;
+
+     Psb1 = ^sb1;
+     sb1 = shortint;
+
+     Peb1 = ^eb1;
+     eb1 = char;
+
+  const
+     UB1MAXVAL:ub1 = 255;
+     UB1MINVAL:ub1 = 0;
+     SB1MAXVAL:sb1 = 127;
+     SB1MINVAL:sb1 = -128;
+     MINUB1MAXVAL:ub1 = 255;
+     MAXUB1MINVAL:ub1 = 0;
+     MINSB1MAXVAL:sb1 = 127;
+     MAXSB1MINVAL:sb1 = -127;
+     EB1MAXVAL:eb1 = #255;
+     EB1MINVAL:eb1 = #0;
+     MINEB1MAXVAL:eb1 =#127;
+     MAXEB1MINVAL:eb1 =#0;
+
+  const
+     UB1BITS = 8;
+
+  { was #define dname def_expr }
+  function UB1MASK : longint;
+      { return type might be wrong }
+
+  { backwards compatibility  }
+  type
+
+     Pb1 = ^b1;
+     b1 = sb1;
+
+  const
+     B1MAXVAL:b1 = 127;  // was SB1MAXVAL
+     B1MINVAL:b1 = -128; // was SB1MINVAL
+  { --- Signed/Unsigned two-byte scalar (sb2/ub2) ---  }
+
+  type
+
+     Pub2 = ^ub2;
+     ub2 = word;
+
+     Psb2 = ^sb2;
+     sb2 = smallint;
+
+     Peb2 = ^eb2;
+     eb2 = smallint;
+
+  const
+     UB2MAXVAL:ub2 = 65535;
+     UB2MINVAL:ub2 = 0;
+     SB2MAXVAL:sb2 = 32767;
+     SB2MINVAL:sb2 = -32768;
+     MINUB2MAXVAL:ub2 = 65535;
+     MAXUB2MINVAL:ub2 = 0;
+     MINSB2MAXVAL:sb2 = 32767;
+     MAXSB2MINVAL:sb2 = -32767;
+     EB2MAXVAL:eb2 = 32767;
+     EB2MINVAL:eb2 = 0;
+     MINEB2MAXVAL:eb2 = 32767;
+     MAXEB2MINVAL:eb2 = 0;
+
+  { backwards compatibility  }
+  type
+
+     Pb2 = ^b2;
+     b2 = sb2;
+
+  const
+     B2MAXVAL = 32767;  // was SB2MAXVAL
+     B2MINVAL = -32768; // was SB2MINVAL;
+  { --- Signed/Unsigned four-byte scalar (sb4/ub4) ---  }
+
+  type
+
+     Pub4 = ^ub4;
+     ub4 = dword;
+
+     Psb4 = ^sb4;
+     sb4 = longint;
+
+     Peb4 = ^eb4;
+     eb4 = longint;
+
+
+  const
+     UB4MAXVAL:ub4 = 4294967295;
+     UB4MINVAL:ub4 = 0;
+     SB4MAXVAL:sb4 = 2147483647;
+     SB4MINVAL:sb4 = -2147483648;
+     MINUB4MAXVAL:ub4 = 4294967295;
+     MAXUB4MINVAL:ub4 = 0;
+     MINSB4MAXVAL:sb4 = 2147483647;
+     MAXSB4MINVAL:sb4 = -2147483647;
+     EB4MAXVAL:eb4 = 2147483647;
+     EB4MINVAL:eb4 =0;
+     MINEB4MAXVAL:eb4 = 2147483647;
+     MAXEB4MINVAL:eb4 = 0;
+
+  { --- Signed/Unsigned eight-byte scalar (orasb8/oraub8) ---  }
+  type
+
+     Poraub8 = ^oraub8;
+     oraub8 = qword;
+
+     Porasb8 = ^orasb8;
+     orasb8 = int64;
+
+  type
+
+     Pub8 = ^ub8;
+     ub8 = oraub8;
+
+     Psb8 = ^sb8;
+     sb8 = orasb8;
+
+  const
+     ORAUB8MINVAL:oraub8=0;
+     ORAUB8MAXVAL:oraub8=18446744073709551615;
+     ORASB8MINVAL:orasb8=-9223372036854775808;
+     ORASB8MAXVAL:orasb8= 9223372036854775807;
+     MAXORAUB8MINVAL:oraub8=0;
+     MINORAUB8MAXVAL:oraub8=18446744073709551615;
+     MAXORASB8MINVAL:orasb8=-9223372036854775807;
+     MINORASB8MAXVAL:orasb8=9223372036854775807;
+
+  { backwards compatibility  }
+
+  type
+
+     Pb4 = ^b4;
+     b4 = sb4;
+
+  const
+     B4MAXVAL = 2147483647;  // was SB4MAXVAL
+     B4MINVAL = -2147483648; // was SB4MINVAL
+  { --- Character pointer ---  }
+
+  type
+     Poratext = ^oratext;
+     oratext = char;
+
+
+  type
+
+     Ptext = ^text;
+     text = oratext;
+
+    type
+       Putext = ^utext;
+       utext = word;
+
+    { --- Other data types ---  }
+    type
+
+       Peword = ^eword;
+       eword = longint;
+
+       Puword = ^uword;
+       uword = dword;
+
+       Psword = ^sword;
+       sword = longint;
+       
+
+  const
+       EWORDMAXVAL:eword = 2147483647;
+       EWORDMINVAL:eword = 0;
+       UWORDMAXVAL:uword = 4294967295;
+       UWORDMINVAL:uword = 0;
+       SWORDMAXVAL:sword = 2147483647;
+       SWORDMINVAL:sword = -2147483648;
+       MINEWORDMAXVAL:eword = 2147483647;
+       MAXEWORDMINVAL:eword = 0;
+       MINUWORDMAXVAL:uword = 4294967295;
+       MAXUWORDMINVAL:uword = 0;
+       MINSWORDMAXVAL:sword = 2147483647;
+       MAXSWORDMINVAL:sword = -2147483647;
+
+
+    type
+
+       Pubig_ora = ^ubig_ora;
+       ubig_ora = dword;
+
+       Psbig_ora = ^sbig_ora;
+       sbig_ora = longint;
+
+  const
+       UBIG_ORAMAXVAL:ubig_ora = 2147483647;
+       UBIG_ORAMINVAL:ubig_ora = 0;
+       SBIG_ORAMAXVAL:sbig_ora = 2147483647;
+       SBIG_ORAMINVAL:sbig_ora = -2147483648;
+       MINUBIG_ORAMAXVAL:ubig_ora = 4294967295;
+       MAXUBIG_ORAMINVAL:ubig_ora = 0;
+       MINSBIG_ORAMAXVAL:sbig_ora = 2147483647;
+       MAXSBIG_ORAMINVAL:sbig_ora = -2147483647;
+
+(* error 
+#define UBIGORABITS      (UB1BITS * sizeof(ubig_ora))
+in define line 272 *)
+
+    type
+
+       lgenfp_t = procedure (_para1:pointer);cdecl;
+
+    const
+       SIZE_TMAXVAL = 2147483647; // was UBIG_ORAMAXVAL;
+
+//    const
+//       MINSIZE_TMAXVAL:size_t = 4294967295;
+
+implementation
+
+  function UB1MASK : longint;
+      { return type might be wrong }
+      begin
+//         UB1MASK:=(1 shl (uword(CHAR_BIT)))-1;
+      end;
+
+
+
+end.

+ 3911 - 0
packages/base/oracle/orl.inc

@@ -0,0 +1,3911 @@
+
+{
+  Automatically converted by H2Pas 1.0.0 from orl.h
+  The following command line parameters were used:
+    -p
+    -D
+    -l
+    jojo.so
+    orl.h
+}
+
+{$PACKRECORDS C}
+
+  { Copyright (c) 1993, 2003, Oracle Corporation.  All rights reserved.   }
+  {
+    Author:             Srinath Krishnaswamy
+    Date:               11/24/93
+    Source documents:   "Functional Specification for C Language Mapping of
+                        OTS Types, Object Management Subsystem", "Oracle C
+                        Coding Standards version 2.2", and the header file
+                        template
+    Rule sets:          the generic and .h file rule sets
+    Quality status:     not exited
+    Identification tag: [ one or more letters to identify the .h file ]
+    Revision code:      11/24/93
+   
+    NAME
+  
+      ORL - ORacle's external C Language interface to primitive OTS types
+   
+    DESCRIPTION
+  
+      This header file contains C langauge interface to the OTS primitive
+      types. The interface includes C mapping of OTS primitive types and
+      the prototype of the pre-defined operations on the primitive types.
+   
+      ***********************************************************************
+      *** NOTE: The OCI functions for objects requires the                ***
+      ***       application to be running in OBJECT mode. That is, during ***
+      ***       process initialization OCIInitialize(), the mode          ***
+      ***       specified should be OBJECT mode.                          ***
+      **                OCIInitialize(OCI_OBJECT, ..);                    ***
+      ***********************************************************************
+  
+    RELATED DOCUMENTS
+  
+      [1] Krishnaswamy, Srinath and Nguyen, Tin A., "Functional Specification
+          for C Language Mapping of OTS Types, Object Management Subsystem",
+          March 1994.
+      [2] Nguyen, Tin A., "The Open Type System", Oracle Corporation,
+          February 1994.
+      [3] Klein, Jonathan D., "Large Field Management", Oracle Corporation,
+          October 1993.
+   
+    PUBLIC FUNCTIONS
+   
+      OCI - OCI functions to manipulate Oracle Number, float and decimal
+        ARITHMETIC
+          OCINumberInc - OCINumber INCrement (optimized)
+          OCINumberDec - OCINumber DECrement (optimized)
+          OCINumberAdd - OCINumber ADD numbers
+          OCINumberSub - OCINumber SUBtract numbers
+          OCINumberMul - OCINumber MULtiply numbers
+          OCINumberDiv - OCINumber DIVide numbers
+          OCINumberMod - OCINumber MODulo division
+          OCINumberIntPower - OCINumber integer PoWeR
+          OCINumberShift - OCINumber decimal ShiFT number
+          OCINumberNeg - OCINumber NEGate number
+          OCINumberAbs - OCINumber ABSolute value
+          OCINumberCeil - OCINumber CEiling of number
+          OCINumberFloor - OCINumber FLooR of number
+          OCINumberSqrt - OCINumber SQuare Root of number
+          OCINumberSign - OCINumber get SIGN of number
+        NATIVE TYPE CONVERSION
+          OCINumberToInt  - OCINumber convert number TO machine-format Integer
+          OCINumberFromInt - OCINumber convert machine-format Integer TO Number
+          OCINumberToReal  - OCINumber convert number TO machine-format Real
+          OCINumberToRealArray  - OCINumber convert array of numbers TO
+                                  machine-format Real
+          OCINumberFromReal - OCINumber convert machine-format Real TO Number
+        TEXT STRING CONVERSION
+          OCINumberToText  - OCINumber convert number TO String
+          OCINumberFromText - OCINumber convert String TO Number
+        COMPARISON
+          OCINumberCmp - OCINumber CoMPare numbers
+          OCINumberIsZero - OCINumber comparison with ZERo
+          OCINumberIsInt - OCINumber Is an Integer
+        ASSIGNMENT
+          OCINumberAssign - OCINumber ASsiGn number
+          OCINumberSetZero - OCINumber Set number to Zero value
+          OCINumberSetPi - OCINumber Set number to Pi
+        ROUNDING
+          OCINumberTrunc - OCINumber TRUncate an Oracle number
+          OCINumberRound - OCINumber ROUnd number
+          OCINumberPrec - OCINumber round to Precision digits
+        TRANSCENDENTAL
+          OCINumberSin - OCINumber SINe
+          OCINumberArcSin - OCINumber Arc SINe
+          OCINumberHypSin - OCINumber SiNe Hyperbolic
+          OCINumberCos - OCINumber COSine
+          OCINumberArcCos - OCINumber Arc COSine
+          OCINumberHypCos - OCINumber CoSine Hyperbolic
+          OCINumberTan - OCINumber TANgent
+          OCINumberArcTan - OCINumber Arc TANgent
+          OCINumberArcTan2 - OCINumber Arc TaNgent 2
+          OCINumberHypTan - OCINumber TaNgent Hyperbolic
+          OCINumberPower - OCINumber arbitrary Base EXponentiation
+          OCINumberExp - OCINumber EXPonentiation to base e
+          OCINumberLn  - OCINumber Logarithm Natural
+          OCINumberLog - OCINumber LOGarithm to arbitrary base
+  
+      OCIDate - OCI functions to manipulate OCI Date
+        OCIDateToExternal - OCIDate convert date to external form
+        OCIDateFromExternal - OCIDate convert external form of date into OCIDate
+        OCIDateAssign - OCIDate Assignment
+        OCIDateToText  - OCIDate convert date TO String
+        OCIDateFromText - OCIDate convert String TO Date
+        OCIDateZoneToZone - OCIDate convert date from one time 
+                          Zone TO another Zone
+        OCIDateCompare - OCIDate CoMPare dates
+        OCIDateAddMonths - OCIDate ADd or subtract Months
+        OCIDateAddDays - OCIDate ADd or subtract Days
+        OCIDateLastDay - OCIDate get date of LaST day of month
+        OCIDateDaysBetween - OCIDate get number of days BeTWeen two dates
+        OCIDateNextDay - OCIDate get date of Next DaY
+        OCIDateCheck - OCIDate CHecK if the given date is valid
+        OCIDateSysDate - OCIDate get current SYStem date and time
+  
+      OCIString - OCI String functions to manipulate Variable-length string
+        OCIStringAssign - OCIString Assign string to string
+        OCIStringAssignText - OCIString Assign Text string to string
+        OCIStringResize - OCIString ReSiZe string
+        OCIStringSize - OCIString get String Size
+        OCIStringPtr - OCIString get String PoinTeR
+        OCIStringAllocSize - OCIString get Allocated SiZe
+   
+      OCIRaw - OCI Raw functions to manipulate variable-length raW
+        OCIRawAssignRaw - OCIRaw Assign Raw (of type OCIRaw*) to raw
+                          (of type OCIRaw*)
+        OCIRawResize - OCIRaw Resize raw
+        OCIRawSize - OCIRaw get Raw Size
+        OCIRawPtr  - OCIRaw get Raw data Pointer
+        OCIRawAllocSize - OCIRaw get Allocated Size
+  
+      OCIColl - OCI Collection generic functions. These functions can be 
+                  used to manipulate both variable-length array (varray) and 
+                  nested table.
+        OCICollSize  - OCIColl return current SIZe of the given collection
+                  (in number of elements)
+        OCICollMax  - OCIColl return the MAXimum number of elements in the
+                  collection (i.e. upper-bound)
+        OCICollGetElem  - OCIColl GET pointer to the element at the given 
+                  position
+        OCICollAssignElem  - OCIColl assign to element at given index
+        OCICollAssign  - OCIColl ASsiGn collection; perform deep-copy of source 
+                  collection to target collection
+        OCICollAppend  - OCIColl aPPend the given element to the end of the
+                  collection
+        OCICollTrim  - OCIColl trim (delete) the given number of elements 
+                  from the end of the collection
+        OCICollIsLocator - OCIColl indicates whether a collection is locator
+                           based or not.
+        OCIIterCreate  - OCIColl Create an ITerator to scan the collection 
+                  elements
+        OCIIterDelete  - OCIColl Delete ITerator
+        OCIIterInit  - OCIColl Initialize ITerator to scan the given collection
+        OCIIterGetCurrent - OCIColl Iterator based, get CURrent 
+                  collection element
+        OCIIterNext - OCIColl Iterator based, get NeXT collection element
+        OCIIterPrev - OCIColl Iterator based, get PReVious collection element
+   
+        OCITable - OCI functions to manipulate nested Table. The OCIColl*() and 
+                  OCITable*() functions can be used to manipulate nested table
+        OCITableDelete(i) - OCITable if element(i) exists then the element is 
+                  marked as deleted else the function returns false. So 
+                  delete's create "holes".
+        OCITableExists(i) - OCITable return true iff an element at
+                  position i EXIsts
+        OCITableFirst  - OCITable return the smallest value of i for which
+                  exists(i) is true.
+        OCITableLast  - OCITable return the largest value of i for which 
+                  exists(i) is true.
+        OCITableNext(i) - OCITable return pointer to the smallest position j, 
+                  greater than i, such that OCITableExists(j) is true
+        OCITablePrev(i) - OCITable return pointer to the largest position j,
+                  less than i, such that OCITableExists(j) is true
+        OCITableSize - OCITable return current SIZe of the given nested table not
+                  including deleted elements
+  
+      OCIRef - OCI functions to manipulate object Reference
+        OCIRefClear  - OCIRef CLeaR or nullify a ref
+        OCIRefAssign  - OCIRef ASsiGn a ref to another
+        OCIRefIsEqual  - OCIRef compare two refs for EQUality
+        OCIRefIsNull  - OCIRef test if a ref is NULl 
+        OCIRefFromHex  - OCIRef convert a Hexadecimal string TO a Ref
+        OCIRefToHex   - OCIRef convert a ref to a Hexadecimal string
+        OCIRefHexSize  - OCIRef get size of buffer in bytes to store hexadecimal
+                  string
+  
+    OBSOLETE: to be replaced by functions from oci.h:
+  
+      ORLL - ORL functions to manipulate lob Locators
+        orllasg   - ORLL AsiGn one locator to another
+        orllequ   - ORLL compare two locators for EQUality
+        orlliini  - ORLL Is the locator INItialized?
+        orllgsz   - ORLL Get locator SiZe
+        orllgcid  - ORLL Get Character set ID
+  
+        NOTE: The following are specific to FILE lobs:
+  
+        orllsnm - ORLL Set directory alias and file NaMe in the locator
+        orllgnm - ORLL Get directory alias and file NaMe from the locator
+   
+    EXAMPLES
+  
+      Examples are given in the description of each function where
+      relevant.
+   
+    NOTES
+  
+      This file has been subsetted to contain ONLY the routines that will
+      be in the first release.
+   
+    QUESTIONS
+       
+    MODIFIED
+      srseshad   03/12/03 - convert oci public api to ansi
+      rpingte    11/21/02 - Add OCICollGetElemArray and OCINumberToRealArray
+      aahluwal   06/03/02 - bug 2360115
+      gayyappa   02/01/02 - fix 2210776 : change Dom to DOM 
+      whe        09/25/01 - add OCIXMLType & OCIDomDocument opaque types
+      bpalaval   02/09/01   - Change text to oratext.
+      rkasamse   09/20/99 -   lint changes
+      whe        09/01/99 -   976457:check __cplusplus for C++ code
+      hsbedi     08/11/99 -   Add macro
+      rxgovind   10/14/98 -  make non exposed calls (OCIRowType etc) private
+      rxgovind   06/09/98 -  update OCIRowTypeCreate
+      nmantrav   05/11/98 -  add OCIRowTypeGetCount
+      rxgovind   03/29/98 -  add OCIRowType and OCIRowData interfaces
+      jwijaya    05/06/98  - add OCICollIsLocator                                
+      rxgovind   03/18/98 -  opaque types: move to kolo.h
+      etucker    02/02/98 -  add comments for Dec and Inc
+      etucker    01/29/98 -  Finish core5 integration
+      rxgovind   11/11/97 -  opaque types
+      etucker    10/28/97 -  add ORLN functions for SDK
+      cxcheng    07/28/97 -  remove OCILobLocator #define
+      skmishra   05/13/97 -  stdcc compatibility changes
+      skrishna   04/25/97 -  rename OCINumber*(): Exp Power TanHyp Zero Init
+                             TanToArc Sqr Truncate and Compare 
+      skotsovo   03/31/97 -  remove OCILobLocatorSize
+      skrishna   03/25/97 -  remove orld2i and orldi2d
+      skrishna   03/18/97 -  fix ifdef for supporting ansi and k&r proto-types
+      cxcheng    02/06/97 -  take out short name support except with SLSHORTNAME
+      skrishna   01/06/97 -  update OCITableSize() comments
+      skrishna   12/27/96 -  fix OCIDateGet/OCIDateSet
+      skrishna   12/12/96 -  update OCICollGelElem comments
+      skrishna   11/07/96 -  OCICollGetElem: interface change
+      skrishna   11/05/96 -  add OCIDate Get/Set and OCIDateAssign
+      cxcheng    10/31/96 -  change OCINumberTanHyp to OCINumberHypTan
+      cxcheng    10/30/96 -  #define orll short names to long names
+      dchatter   10/26/96 -  fix some OCI file long names
+      cxcheng    10/24/96 -  remove unnecessary comment in front
+      cxcheng    10/14/96 -  disable long name mapping for LOB functions
+      skrishna   10/13/96 -  continue beautification
+      skotsovo   10/16/96 -  update ocilob names
+      cxcheng    10/09/96 -  add structure members in #define for date/time
+      cxcheng    10/09/96 -  more lint fixes
+      skrishna   10/09/96 -  continue beautification
+      cxcheng    10/09/96 -  more fixes
+      skrishna   10/09/96 -  change fixed-char rep. to orlvstr*
+      jwijaya    10/08/96 -  continue beautification
+      jwijaya    10/07/96 -  beautify
+      cxcheng    10/07/96 -  more changes
+      cxcheng    10/04/96 -  replace short names with long names
+      skrishna   10/01/96 -  orlcsiz, orltsiz: change prototype to take errhdl
+      skrishna   09/23/96 -  fix lint errors
+      skotsovo   09/23/96 -  remove orllmkcur().
+      jwijaya    09/17/96 -  comments on null ref
+      skrishna   09/19/96 -  change orlraw format
+      skotsovo   09/19/96 -  add orlliini and remove orllnul
+      skrishna   08/14/96 -  orlvstr: change format to ub4 followed by text
+      jboonleu   08/06/96 -  update comment
+      skotsovo   08/08/96 -  revert to locators instead of descriptors as input t
+      jboonleu   07/23/96 -  remove orlrcur
+      skrishna   07/06/96 -  add orltsiz
+      skrishna   07/05/96 -  add orld2i and orldi2d
+      jwijaya    07/03/96 -  add ANSI prototypes
+      skrishna   06/27/96 -  document default string format in orlds2d & orld2s
+      skrishna   06/25/96 -  change max date value
+      skrishna   06/18/96 -  modify orld2s() comments
+      skotsovo   06/13/96 -  orll functions take lob descriptors instead of locat
+      rxgovind   06/05/96 -  change prototype of orlrcur to take ocienvh
+      skrishna   05/30/96 -  support collection trimming
+      skrishna   05/30/96 -  remove orlralo/fre and orllalo/fre instead use 
+                             orionew/fre
+      skrishna   05/28/96 -  add orlt*() and modify orla*()
+      skotsovo   05/23/96 -  add orlbl typedefs for pro*c
+      jboonleu   05/14/96 -  add orlrcur
+      rxgovind   05/08/96 -  changes for 3gl callbacks
+      skotsovo   05/01/96 -  in orllasg, no need to alloc orlbl*
+      skrishna   04/21/96 -  merge changes from 960418 object branch into big
+      skrishna   04/17/96 -  rename orlrcpy to orlrasg
+      skrishna   04/12/96 -  add orlr2h and orlrh2r functions
+      skotsovo   04/15/96 -  add fnt to make the lob locator current
+      skrishna   04/08/96 -  change orl*() to take ocienvh* and ocierrh* instead
+                             of oroenv*
+      skotsovo   03/22/96 -  add locator functions
+      skotsovo   03/22/96 -  add locator functions
+      skrishna   02/27/96 -  remove mlslabel interface
+      skotsovo   02/20/96 -  remove orlbty and use dty type instead.
+      skotsovo   02/14/96 -  add text file lobs.
+      skrishna   01/31/96 -  update comments of orln2r, orldchk, orlds2d & orld2s
+      skrishna   01/31/96 -  change orld2s() and orln2s() to return string length
+      skrishna   01/21/96 -  remove old raw interface 
+      skrishna   12/14/95 -  add raw interface
+      skotsovo   01/03/96 -  change LOB offsets and lengths from ub4 to ubig_ora
+                             to support 64 bit machines.
+      skotsovo   10/30/95 -  add orlblsiz() to get lob locator size
+      skrishna   10/24/95 -  move ref functions from ori and update the ref
+                             functions to support variable-length ref
+      cxcheng    10/20/95 -  add more comments on number versions
+      cxcheng    10/13/95 -  add more number functions
+      cxcheng    08/29/95 -  Support for segmented varrays
+      cxcheng    08/18/95 -  modifiy orlmls structure
+      skrishna   06/06/95 -  rename orln, orld, orlvs and orlva to orlnum,
+                             orldat, orlvstr and orlvary respectively 
+      skrishna   11/15/94 -  remove orlnget() function 
+      skrishna   09/20/94 -  modify orldbtw() to return number of days only 
+      skrishna   08/24/94 -  change format string length type from ub4 to ub1 
+      skrishna   07/19/94 -  Rename orln2c & orlnc2n to orln2s & orlns2n 
+      skrishna   06/29/94 -  Add blob interface; add examples 
+      skrishna   06/23/94 -  Update comments and format 
+      skrishna   05/19/94 -  update varray append comments 
+      skrishna    05/05/94 -  Subsetting 
+      skrishna    11/24/93 -  Creation
+   }
+  {--------------------------------------------------------------------------- }
+  {                         SHORT NAMES SUPPORT SECTION                        }
+  {--------------------------------------------------------------------------- }
+{$ifdef SLSHORTNAME}
+  { the following are short names that are only supported on IBM mainframes
+     with the SLSHORTNAME defined.
+     With this all subsequent long names will actually be substituted with
+     the short names here  }
+
+  const
+     OCIArray = orlvary;     
+     OCIColl = orlcol;     
+     OCICollAppend = orlcapp;     
+     OCICollAssign = orlcasg;     
+     OCICollAssignElem = orlcase;     
+     OCICollGetElem = orlcget;     
+     OCICollGetElemArray = orlcgeta;     
+     OCICollMax = orlcmax;     
+     OCICollSize = orlcsiz;     
+     OCICollTrim = orlctrm;     
+     OCICollIsLocator = orlcilc;     
+     OCIDate = orldat;     
+     OCIDateAddDays = orldadd;     
+     OCIDateAddMonths = orldadm;     
+     OCIDateCheck = orldchk;     
+     OCIDateCompare = orldcmp;     
+     OCIDateDD = day_orldat;     
+     OCIDateDaysBetween = orldbtw;     
+     OCIDateFromText = orlds2d;     
+     OCIDateLastDay = orldlst;     
+     OCIDateMM = mon_orldat;     
+     OCIDateNextDay = orldndy;     
+     OCIDateSysDate = orldsys;     
+     OCIDateTime = time_orldat;     
+     OCIDateYYYY = gye_orldat;     
+     OCIDateZoneToZone = orldz2z;     
+     OCIIter = orlcitr;     
+     OCIIterCreate = orlccit;     
+     OCIIterDelete = orlcdit;     
+     OCIIterGetCurrent = orlcicur;     
+     OCIIterInit = orlciit;     
+     OCIIterNext = orlcinxt;     
+     OCIIterPrev = orlciprv;     
+     OCINumber = orlnum;     
+     OCINumberAbs = orlnabs;     
+     OCINumberAdd = orlnadd;     
+     OCINumberArcCos = orlnacos;     
+     OCINumberArcSin = orlnasin;     
+     OCINumberArcTan = orlnatan;     
+     OCINumberAssign = orlnasg;     
+     OCINumberCeil = orlncel;     
+     OCINumberCos = orlncos;     
+     OCINumberDiv = orlndiv;     
+     OCINumberPower = orlnbex;     
+     OCINumberFloor = orlnflr;     
+     OCINumberFromInt = orlni2n;     
+     OCINumberFromReal = orlnr2n;     
+     OCINumberFromText = orlns2n;     
+     OCINumberHypCos = orlncsh;     
+     OCINumberHypSin = orlnsnh;     
+     OCINumberSetZero = orlnini;     
+     OCINumberSetPi = orlnspi;     
+     OCINumberInc = orlninc;     
+     OCINumberDec = orlndec;     
+     OCINumberIntPower = orlnpwr;     
+     OCINumberLn = orlnln;     
+     OCINumberLog = orlnlog;     
+     OCINumberMod = orlnmod;     
+     OCINumberMul = orlnmul;     
+     OCINumberNeg = orlnneg;     
+     OCINumberPart = orlnpart;     
+     OCINumberExp = orlnexp;     
+     OCINumberRound = orlnrou;     
+     OCINumberPrec = orlnpre;     
+     OCINumberShift = orlnsft;     
+     OCINumberSign = orlnsgn;     
+     OCINumberSin = orlnsin;     
+     OCINumberSqrt = orlnsqr;     
+     OCINumberSub = orlnsub;     
+     OCINumberTan = orlntan;     
+     OCINumberHypTan = orlntnh;     
+     OCINumberArcTan2 = orlnatn2;     
+     OCINumberToInt = orln2i;     
+     OCINumberToReal = orln2r;     
+     OCINumberToRealArray = orln2ra;     
+     OCINumberToText = orln2s;     
+     OCINumberTrunc = orlntru;     
+     OCINumberCmp = orlncmp;     
+     OCINumberIsZero = orlnzer;     
+     OCINumberIsInt = orlnint;     
+     OCIRaw = orlraw;     
+     OCIRawAllocSize = orlwasz;     
+     OCIRawAssignBytes = orlwabr;     
+     OCIRawAssignRaw = orlwarr;     
+     OCIRawPtr = orlwgrp;     
+     OCIRawResize = orlwrsz;     
+     OCIRawSize = orlwgsz;     
+     OCIRefAssign = orlrasg;     
+     OCIRefClear = orlrclr;     
+     OCIRefFromHex = orlrh2r;     
+     OCIRefHexSize = orlrhsz;     
+     OCIRefIsEqual = orlrequ;     
+     OCIRefIsNull = orlrnul;     
+     OCIRefToHex = orlr2h;     
+     OCIString = orlvstr;     
+     OCIStringAllocSize = orlvasz;     
+     OCIStringAssign = orlvass;     
+     OCIStringAssignText = orlvats;     
+     OCIStringPtr = orlvgsp;     
+     OCIStringResize = orlvrsz;     
+     OCIStringSize = orlvgsz;     
+     OCITable = orltbl;     
+     OCITableDelete = orltdel;     
+     OCITableExists = orltexi;     
+     OCITableFirst = orltfst;     
+     OCITableLast = orltlst;     
+     OCITableNext = orltnxt;     
+     OCITablePrev = orltprv;     
+     OCITableSize = orltsiz;     
+     OCITime = orldtm;     
+     OCITimeHH = orldtmhh;     
+     OCITimeMI = orldtmmm;     
+     OCITimeSS = orldtmss;     
+     OCI_LOBMODE_READONLY = ORLBMORO;     
+     OCI_LOBMODE_READWRITE = ORLBMORW;     
+{$endif}
+  { SLSHORTNAME  }
+  {*************************************************************************** }
+  {                         NUMBER/FLOAT/DECIMAL TYPE                          }
+  {*************************************************************************** }
+
+  const
+     OCI_NUMBER_SIZE = 22;     
+
+  type
+     POCINumber = ^OCINumber;
+     OCINumber = record
+          OCINumberPart : array[0..(OCI_NUMBER_SIZE)-1] of ub1;
+       end;
+
+  { 
+   * OCINumber - OCI Number mapping in c
+   *
+   * The OTS types: NUMBER, NUMERIC, INT, SHORTINT, REAL, DOUBLE PRECISION,
+   * FLOAT and DECIMAL are represented by OCINumber.
+   * The contents of OCINumber is opaque to clients. 
+   *
+   * For binding variables of type OCINumber in OCI calls (OCIBindByName(),
+   * OCIBindByPos(), and OCIDefineByPos()) use the type code SQLT_VNU.
+    }
+  {
+     EXAMPLE 
+  
+     The following example shows how to manipulate an attribute of type 
+     oracle number.
+    
+       struct person
+       
+         OCINumber sal;
+       ;
+       typedef struct person person;
+  
+       OCIError *err;
+       person* joe;
+       person* tom;
+       person* debbie;
+       OCINumber  *joesal;
+       OCINumber  *tomsal;
+       OCINumber *debsal;
+       sword   status;
+       int     inum;
+       double  dnum;
+       OCINumber ornum;
+       char    buffer[21];
+       ub4     buflen;
+       sword   result;
+       
+       /o See oci.h for an example of how to initialize OCIError.
+        o For this example, assume the OCIEnv and OCIError has been
+        o initialized.
+        o/
+  
+       /o Pin joe, tom and debbie person objects in the object cache. See ori.h
+        o for an example on pinning objects. For this example, assume that
+        o joe, tom and debbie are pointing to pinned objects.
+        o/
+       joesal = &joe->sal;
+       tomsal = &tom->sal;
+       debsal = &debbie->sal;
+  
+       /o initialize joe's salary to be $12,000 o/
+       inum = 12000;
+       status = OCINumberFromInt(err, &inum, sizeof(inum), OCI_NUMBER_SIGNED,
+                                 joesal);
+       if (status != OCI_SUCCESS)
+                                /o goto to handle error from OCINumberFromInt o/;
+  
+       /o initialize tom's salary to be same as joe o/
+       OCINumberAssign(err, joesal, tomsal);
+  
+       /o initialize debbie's salary to be 20% more than joe's o/
+       dnum = 1.2;
+       status = OCINumberFromReal(err, &dnum, sizeof(double), &ornum);
+       if (status != OCI_SUCCESS)
+                              /o goto to handle error from OCINumberFromReal o/;
+       status = OCINumberMul(err, joesal, &ornum, debsal);
+       if (status != OCI_SUCCESS)  /o goto to handle error from OCINumberMul o/;
+  
+       /o give tom a 50% raise o/
+       dnum = 1.5;
+       status = OCINumberFromReal(err, &dnum, sizeof(double), &ornum);
+       if (status != OCI_SUCCESS)
+                              /o goto to handle error from OCINumberFromReal o/;
+       status = OCINumberMul(err, tomsal, &ornum, tomsal);
+       if (status != OCI_SUCCESS)  /o goto to handle error from OCINumberMul o/;
+  
+       /o double joe's salary o/
+       status = OCINumberAdd(err, joesal, joesal, joesal);
+       if (status != OCI_SUCCESS)  /o goto to handle error from OCINumberAdd o/;
+  
+       /o get joe's salary in integer o/
+       status = OCINumberToInt(err, joesal, sizeof(inum), OCI_NUMBER_SIGNED,
+                               &inum);
+       if (status != OCI_SUCCESS)/o goto to handle error from OCINumberToInt o/;
+       /o inum is set to 24000 o/
+  
+       /o get debbie's salary in double o/
+       status = OCINumberToReal(err, debsal, sizeof(dnum), &dnum);
+       if (status != OCI_SUCCESS)/o goto to handle error from OCINumberToReal o/;
+       /o dnum is set to 14400 o/
+  
+       /o print tom's salary as DEM0001`8000.00 o/
+       buflen = sizeof(buffer);
+       status = OCINumberToText(err, tomsal, "C0999G9999D99", 13, 
+                   "NLS_NUMERIC_CHARACTERS='.`' NLS_ISO_CURRENCY='Germany'", 54,
+                   &buflen, buffer);
+       if (status != OCI_SUCCESS)/o goto to handle error from OCINumberToText o/;
+       printf("tom's salary = %s\n", buffer);
+  
+       /o compare joe and tom's salary o/
+       status = OCINumberCmp(err, joesal, tomsal, &result);
+       if (status != OCI_SUCCESS)  /o goto to handle error from OCINumberCmp o/;
+       /o result is positive o/
+  
+       /o read debbie's new salary from string o/
+       status = OCINumberFromText(err, "48`000.00", 9, "99G999D99", 9,
+                        "NLS_NUMERIC_CHARACTERS='.`'", 27, debsal);
+       if (status != OCI_SUCCESS)
+                              /o goto to handle error from OCINumberFromText o/;
+       /o debbie's salary is now 48000.00 o/
+  
+   }
+  {----------------------------- OCINumberInc -------------------------------- }
+
+{$IFNDEF LinkDynamically}
+  function OCINumberInc(err:POCIError; number:POCINumber):sword;cdecl;external ocilib name 'OCINumberInc';
+{$ELSE}
+var OCINumberInc : function (err:POCIError; number:POCINumber):sword;cdecl;
+{$ENDIF}
+  {
+     NAME: OCINumberInc - OCINumber INCrement numbers
+     PARAMETERS:
+          err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+          number (IN/OUT) a positive Oracle number to be incremented
+     DESCRIPTION:
+          Increment Oracle number in place. It is assumed that the input is
+          an integer between 0 and 100^21-2. If the is input too large, it will
+          be treated as 0 - the result will be an Oracle number 1. If the input
+          is not a positive integer, the result will be unpredictable.
+     RETURNS:
+          OCI_SUCCESS if the function completes successfully.
+          OCI_INVALID_HANDLE if 'err' is NULL.
+          OCI_ERROR if
+            any of the number arguments is null
+    }
+  {----------------------------- OCINumberDec -------------------------------- }
+{$IFNDEF LinkDynamically}
+  function OCINumberDec(err:POCIError; number:POCINumber):sword;cdecl;external ocilib name 'OCINumberDec';
+{$ELSE}
+  OCINumberDec : function (err:POCIError; number:POCINumber):sword;cdecl;
+{$ENDIF}
+
+  {
+     NAME: OCINumberDec - OCINumber DECrement numbers
+     PARAMETERS:
+          err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+          number (IN/OUT) - a positive Oracle number to be decremented
+     DESCRIPTION:
+          Decrement Oracle number in place. It is assumed that the input is an
+          integer between 1 and 100^21-2. If the input is too large, it will be
+          treated as 1 - the result will be an Oracle number 0. If the input is
+          not a positive integer, the result will be unpredictable.
+     RETURNS:
+          OCI_SUCCESS if the function completes successfully.
+          OCI_INVALID_HANDLE if 'err' is NULL.
+          OCI_ERROR if
+            any of the number arguments is null
+    }
+  {-------------------------- OCINumberSetZero ------------------------------- }
+{$IFNDEF LinkDynamically}
+  procedure OCINumberSetZero(err:POCIError; num:POCINumber);cdecl;external ocilib name 'OCINumberSetZero';
+{$ELSE}
+  OCINumberSetZero : procedure (err:POCIError; num:POCINumber);cdecl;
+{$ENDIF}
+
+  {
+     NAME: OCINumberSetZero - OCINumber Set number to Zero value
+     PARAMETERS:
+          err (IN/OUT) - pointer to OCI error handle
+          num (OUT) - set to zero value
+     DESCRIPTION:
+          Initialize the given number to value 0.
+    }
+  {--------------------------- OCINumberSetPi -------------------------------- }
+{$IFNDEF LinkDynamically}
+  procedure OCINumberSetPi(err:POCIError; num:POCINumber);cdecl;external ocilib name 'OCINumberSetPi';
+{$ELSE}
+  OCINumberSetPi : procedure (err:POCIError; num:POCINumber);cdecl;
+{$ENDIF}
+  {
+     NAME: OCINumberSetPi - OCINumber Set number to Pi
+          err (IN/OUT) - pointer to OCI error handle
+          num (OUT) - set to zero value
+     DESCRIPTION:
+          Initialize the given number to value Pi.
+    }
+  {----------------------------- OCINumberAdd -------------------------------- }
+{$IFNDEF LinkDynamically}
+  function OCINumberAdd(err:POCIError; number1:POCINumber; number2:POCINumber; result:POCINumber):sword;cdecl;external ocilib name 'OCINumberAdd';
+{$ELSE}
+  OCINumberAdd : function (err:POCIError; number1:POCINumber; number2:POCINumber; result:POCINumber):sword;cdecl;
+{$ENDIF}
+
+  {
+     NAME: OCINumberAdd - OCINumber ADD numbers
+     PARAMETERS:
+          err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+          number1, number2 (IN) - numbers to be added
+          result (OUT) - result of adding 'number1' with 'number2'
+     DESCRIPTION:
+          Add 'number1' with 'number2' and return result in 'result'.
+     RETURNS:
+          OCI_SUCCESS if the function completes successfully.
+          OCI_INVALID_HANDLE if 'err' is NULL.
+          OCI_ERROR if
+            any of the number arguments is null
+    }
+  {----------------------------- OCINumberSub -------------------------------- }
+{$IFNDEF LinkDynamically}
+  function OCINumberSub(err:POCIError; number1:POCINumber; number2:POCINumber; result:POCINumber):sword;cdecl;external ocilib name 'OCINumberSub';
+{$ELSE}
+  OCINumberSub : function (err:POCIError; number1:POCINumber; number2:POCINumber; result:POCINumber):sword;cdecl;
+{$ENDIF}
+
+  {
+     NAME: OCINumberSub - OCINumber SUBtract numbers
+     PARAMETERS:
+          err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+          number1, number2 (IN) - 'number2' subtracted from 'number1'
+          result (OUT) - subtraction result
+     DESCRIPTION:
+          Subtract 'number2' from 'number1' and return result in 'result'.
+     RETURNS:
+          OCI_SUCCESS if the function completes successfully.
+          OCI_INVALID_HANDLE if 'err' is NULL.
+          OCI_ERROR if
+            any of the number arguments is null
+    }
+  {----------------------------- OCINumberMul -------------------------------- }
+{$IFNDEF LinkDynamically}
+  function OCINumberMul(err:POCIError; number1:POCINumber; number2:POCINumber; result:POCINumber):sword;cdecl;external ocilib name 'OCINumberMul';
+{$ELSE}
+  OCINumberMul : function (err:POCIError; number1:POCINumber; number2:POCINumber; result:POCINumber):sword;cdecl;
+{$ENDIF}
+
+  {
+     NAME: OCINumberMul - OCINumber MULtiply numbers
+     PARAMETERS:
+          err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+          number1, number2 (IN) - numbers to be multiplied
+          result (OUT) - multiplication result
+     DESCRIPTION:
+          Multiply 'number1' with 'number2' and return result in 'result'.
+     RETURNS:
+          OCI_SUCCESS if the function completes successfully.
+          OCI_INVALID_HANDLE if 'err' is NULL.
+          OCI_ERROR if
+            any of the number arguments is null
+    }
+  {----------------------------- OCINumberDiv -------------------------------- }
+{$IFNDEF LinkDynamically}
+  function OCINumberDiv(err:POCIError; number1:POCINumber; number2:POCINumber; result:POCINumber):sword;cdecl;external ocilib name 'OCINumberDiv';
+{$ELSE}
+  OCINumberDiv : function (err:POCIError; number1:POCINumber; number2:POCINumber; result:POCINumber):sword;cdecl;
+{$ENDIF}
+
+  {
+     NAME: OCINumberDiv - OCINumber DIVide numbers
+     PARAMETERS:
+          err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+          number1 (IN) - pointer to the numerator
+          number2 (IN) - pointer to the denominator
+          result (OUT) - division result
+     DESCRIPTION:
+          Divide 'number1' by 'number2' and return result in 'result'.
+     RETURNS:
+          OCI_SUCCESS if the function completes successfully.
+          OCI_INVALID_HANDLE if 'err' is NULL.
+          OCI_ERROR if
+            any of the number arguments is null
+            underflow errorr
+            overflow errorr
+            divide by zero errorr
+    }
+  {----------------------------- OCINumberMod -------------------------------- }
+{$IFNDEF LinkDynamically}
+  function OCINumberMod(err:POCIError; number1:POCINumber; number2:POCINumber; result:POCINumber):sword;cdecl;external ocilib name 'OCINumberMod';
+{$ELSE}
+  OCINumberMod : function (err:POCIError; number1:POCINumber; number2:POCINumber; result:POCINumber):sword;cdecl;
+{$ENDIF}
+
+  {
+     NAME: OCINumberMod - OCINumber MODulous
+     PARAMETERS:
+          err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+          number1 (IN) - pointer to the numerator
+          number2 (IN) - pointer to the denominator
+          result (OUT) - remainder of the result
+     DESCRIPTION:
+          Finds the remainder of the division of two Oracle numbers.
+     RETURNS:
+          OCI_SUCCESS if the function completes successfully.
+          OCI_INVALID_HANDLE if 'err' is NULL.
+          OCI_ERROR if
+            any of the number arguments is null
+            divide by zero errorr
+    }
+  {------------------------ OCINumberIntPower -------------------------------- }
+{$IFNDEF LinkDynamically}
+  function OCINumberIntPower(err:POCIError; base:POCINumber; exp:sword; result:POCINumber):sword;cdecl;external ocilib name 'OCINumberIntPower';
+{$ELSE}
+  OCINumberIntPower : function (err:POCIError; base:POCINumber; exp:sword; result:POCINumber):sword;cdecl;
+{$ENDIF}
+
+  {
+     NAME: OCINumberIntPower - OCINumber takes an arbitary base to an arbitary
+                               integer PoWeR
+     PARAMETERS:
+          err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+          base (IN) - base of the exponentiation
+          exp (IN) - exponent to which the base is to be raised
+          result (OUT) - output of exponentiation
+     DESCRIPTION:
+          Takes an arbitary base to an arbitary integer power.
+     RETURNS:
+          OCI_SUCCESS if the function completes successfully.
+          OCI_INVALID_HANDLE if 'err' is NULL.
+          OCI_ERROR if
+            any of the number arguments is null
+    }
+  {-------------------------- OCINumberShift --------------------------------- }
+{$IFNDEF LinkDynamically}
+  function OCINumberShift(err:POCIError; number:POCINumber; nDig:sword; result:POCINumber):sword;cdecl;external ocilib name 'OCINumberShift';
+{$ELSE}
+  OCINumberShift : function (err:POCIError; number:POCINumber; nDig:sword; result:POCINumber):sword;cdecl;
+{$ENDIF}
+
+  {
+     NAME: OCINumberShift - OCINumber multiplies by a power of 10.
+  
+     PARAMETERS:
+          err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+          number (IN) - Oracle Number to be shifted.
+          nDig   (IN) - number of decimal places to shift.
+          result (OUT) - shift result.
+     DESCRIPTION:
+          Multiplies number by 10^NDig and sets product to the result.
+     RETURNS:
+          OCI_SUCCESS if the function completes successfully.
+          OCI_INVALID_HANDLE if 'err' is NULL.
+          OCI_ERROR if
+            any of the number arguments is null
+    }
+  {----------------------------- OCINumberNeg -------------------------------- }
+{$IFNDEF LinkDynamically}
+  function OCINumberNeg(err:POCIError; number:POCINumber; result:POCINumber):sword;cdecl;external ocilib name 'OCINumberNeg';
+{$ELSE}
+  OCINumberNeg : function (err:POCIError; number:POCINumber; result:POCINumber):sword;cdecl;
+{$ENDIF}
+
+  {
+     NAME: OCINumberNeg - OCINumber NEGate number
+     PARAMETERS:
+          err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+          number (IN) - number to be negated
+          result (OUT) - will contain negated value of 'number'
+     DESCRIPTION:
+          Negates an Oracle number.
+     RETURNS:
+          OCI_SUCCESS if the function completes successfully.
+          OCI_INVALID_HANDLE if 'err' is NULL.
+          OCI_ERROR if
+            any of the number arguments is null
+    }
+  {------------------------- OCINumberToText --------------------------------- }
+{$IFNDEF LinkDynamically}
+  function OCINumberToText(err:POCIError; number:POCINumber; fmt:Poratext; fmt_length:ub4; nls_params:Poratext;
+             nls_p_length:ub4; buf_size:Pub4; buf:Poratext):sword;cdecl;external ocilib name 'OCINumberToText';
+{$ELSE}
+  OCINumberToText : function (err:POCIError; number:POCINumber; fmt:Poratext; fmt_length:ub4; nls_params:Poratext;
+             nls_p_length:ub4; buf_size:Pub4; buf:Poratext):sword;cdecl;
+{$ENDIF}
+
+  {
+     NAME: OCINumberToText - OCINumber convert number TO String 
+     PARAMETERS:
+          err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+          number (IN) - Oracle number to be converted
+          fmt (IN) - conversion format
+          fmt_length (IN) - length of the 'fmt' parameter
+          nls_params (IN) - nls format specification, if null string 
+                  i.e. (oratext *)0, then the default parameters for the 
+                  session is used
+          nls_p_length (IN) - length of the 'nls_params' parameter
+          buf_size (IN/OUT) - size of the buffer must be passed as input by
+                  the caller, this function will return the length of the 
+                  resulting string in bytes via this parameter. The length 
+                  does not include the terminating null ('\0').
+          buf (OUT) - buffer into which the converted string is placed. The
+                  resulting string is null terminated.
+     DESCRIPTION:
+          Converts the given number to a character string 
+          according to the specified format. Refer to "TO_NUMBER" conversion
+          function described in "Oracle SQL Language Reference Manual" for a
+          description of format and NLS parameters.
+          The converted number string is stored in the buffer 'buf', up to 
+          a max of '*buf_size' bytes. Length of the resulting string is
+          returned via 'buf_size'.
+     RETURNS:
+          OCI_SUCCESS if the function completes successfully.
+          OCI_INVALID_HANDLE if 'err' is NULL.
+          OCI_ERROR if
+            'number' or 'buf' is null
+            buffer too small
+            invalid format
+            invalid nls format
+            number to text translation for the given format causes overflow
+    }
+  {-------------------------- OCINumberFromText ------------------------------ }
+{$IFNDEF LinkDynamically}
+  function OCINumberFromText(err:POCIError; str:Poratext; str_length:ub4; fmt:Poratext; fmt_length:ub4;
+             nls_params:Poratext; nls_p_length:ub4; number:POCINumber):sword;cdecl;external ocilib name 'OCINumberFromText';
+{$ELSE}
+  OCINumberFromText : function (err:POCIError; str:Poratext; str_length:ub4; fmt:Poratext; fmt_length:ub4;
+             nls_params:Poratext; nls_p_length:ub4; number:POCINumber):sword;cdecl;
+{$ENDIF}
+
+  {
+     NAME: OCINumberFromText - OCINumber convert String TO Number
+     PARAMETERS:
+          err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+          str (IN) - input string to be converted to Oracle number
+          str_length (IN) - size of the input string
+          fmt (IN) - conversion format
+          fmt_length (IN) - length of the 'fmt' parameter
+          nls_params (IN) - nls format specification, if null string 
+                  i.e. (oratext *)0, then the default parameters for the 
+                  session is used
+          nls_p_length (IN) - length of the 'nls_params' parameter
+          number (OUT) - given string converted to number
+     DESCRIPTION:
+          Converts the given string to a number
+          according to the specified format. Refer to "TO_NUMBER" conversion
+          function described in "Oracle SQL Language Reference Manual" for a
+          description of format and NLS parameters.
+     RETURNS:
+          OCI_SUCCESS if the function completes successfully.
+          OCI_INVALID_HANDLE if 'err' is NULL.
+          OCI_ERROR if
+            'number' or 'str' is null
+            'str_length' is 0
+            invalid format
+            invalid nls format
+            invalid input string
+    }
+  {-------------------------- OCINumberToInt --------------------------------- }
+  { Unsigned type -- ubX  }
+
+  const
+     OCI_NUMBER_UNSIGNED = 0;     
+  { Signed type -- sbX  }
+     OCI_NUMBER_SIGNED = 2;     
+
+{$IFNDEF LinkDynamically}
+  function OCINumberToInt(err:POCIError; number:POCINumber; rsl_length:uword; rsl_flag:uword; rsl:Pdvoid):sword;cdecl;external ocilib name 'OCINumberToInt';
+{$ELSE}
+var OCINumberToInt : function (err:POCIError; number:POCINumber; rsl_length:uword; rsl_flag:uword; rsl:Pdvoid):sword;cdecl;
+{$ENDIF}
+
+  {
+     NAME: OCINumberToInt - OCINumber convert number TO Integer
+     PARAMETERS:
+          err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+          number (IN) - number to be converted
+          rsl_length (IN) - size of the desired result
+          rsl_s_flag (IN) - flag denoting the desired sign of the output; valid 
+                  values are OCI_NUMBER_UNSIGNED, OCI_NUMBER_SIGNED
+          rsl (OUT) - pointer to space for the result
+     DESCRIPTION:
+          Native type conversion function.
+          Converts the given Oracle number into an xbx (e.g. ub2, ub4, sb2 etc.)
+     RETURNS:
+          OCI_SUCCESS if the function completes successfully.
+          OCI_INVALID_HANDLE if 'err' is NULL.
+          OCI_ERROR if
+            'number' or 'rsl' is null
+            integer value of 'number' is too big -- overflow
+            integer value of 'number' is too small -- underflow
+            invalid sign flag value ('rsl_s_flag')
+    }
+  {--------------------------- OCINumberFromInt ------------------------------ }
+{$IFNDEF LinkDynamically}
+  function OCINumberFromInt(err:POCIError; inum:Pdvoid; inum_length:uword; inum_s_flag:uword; number:POCINumber):sword;cdecl;external ocilib name 'OCINumberFromInt';
+{$ELSE}
+  OCINumberFromInt : function (err:POCIError; inum:Pdvoid; inum_length:uword; inum_s_flag:uword; number:POCINumber):sword;cdecl;
+{$ENDIF}
+
+  {
+     NAME: OCINumberFromInt - OCINumber convert Integer TO Number 
+     PARAMETERS:
+          err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+          inum (IN) - pointer to the integer to be converted
+          inum_length (IN) - size of the integer
+          inum_s_flag (IN) - flag that designates the sign of the integer; valid 
+                  values are OCI_NUMBER_UNSIGNED, OCI_NUMBER_SIGNED
+          number (OUT) - given integer converted to Oracle number
+     DESCRIPTION:
+          Native type conversion function. Converts any Oracle standard
+          machine-native integer type (xbx) to an Oracle number.
+     RETURNS:
+          OCI_SUCCESS if the function completes successfully.
+          OCI_INVALID_HANDLE if 'err' is NULL.
+          OCI_ERROR if
+            'number' or 'inum' is null
+            integer too BIG -- the number is too large to fit into an Oracle
+                  number
+            invalid sign flag value ('inum_s_flag')
+    }
+  {------------------------- OCINumberToReal --------------------------------- }
+{$IFNDEF LinkDynamically}
+  function OCINumberToReal(err:POCIError; number:POCINumber; rsl_length:uword; rsl:Pdvoid):sword;cdecl;external ocilib name 'OCINumberToReal';
+{$ELSE}
+  OCINumberToReal : function (err:POCIError; number:POCINumber; rsl_length:uword; rsl:Pdvoid):sword;cdecl;
+{$ENDIF}
+
+  {
+     NAME: OCINumberToReal - OCINumber convert number TO Real
+     PARAMETERS:
+          err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+          number (IN) - number to be converted
+          rsl_length (IN) - is the size of the desired result, 
+                  sizeof( float | double | long double)
+          rsl (OUT) - pointer to space for storing the result
+     DESCRIPTION:
+          Native type conversion function. Converts an Oracle number into a
+          machine-native real type. This function only converts numbers up to
+          LDBL_DIG, DBL_DIG, or FLT_DIG digits of precision and removes
+          trailing zeroes. The above constants are defined in float.h
+     RETURNS:
+          OCI_SUCCESS if the function completes successfully.
+          OCI_INVALID_HANDLE if 'err' is NULL.
+          OCI_ERROR if
+            'number' or 'rsl' is null
+            'rsl_length' is 0
+    }
+  {------------------------- OCINumberToRealArray ---------------------------- }
+{$IFNDEF LinkDynamically}
+  function OCINumberToRealArray(err:POCIError; var number:POCINumber; elems:uword; rsl_length:uword; rsl:Pdvoid):sword;cdecl;external ocilib name 'OCINumberToRealArray';
+{$ELSE}
+  OCINumberToRealArray : function (err:POCIError; var number:POCINumber; elems:uword; rsl_length:uword; rsl:Pdvoid):sword;cdecl;
+{$ENDIF}
+
+  {
+     NAME: OCINumberToRealArray - OCINumber convert array of numbers TO Real
+     PARAMETERS:
+          err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+          number (IN) - Pointer to array of number to be converted
+          elems (IN) - Upper bound of number array
+          rsl_length (IN) - is the size of the desired result,
+                                            sizeof( float | double | long double)
+          rsl (OUT) - pointer to array of space for storing the result
+     DESCRIPTION:
+          Native type conversion function. Converts an Oracle number into a
+          machine-native real type. This function only converts numbers up to
+          LDBL_DIG, DBL_DIG, or FLT_DIG digits of precision and removes
+          trailing zeroes. The above constants are defined in float.h
+     RETURNS:
+          OCI_SUCCESS if the function completes successfully.
+          OCI_INVALID_HANDLE if 'err' is NULL.
+          OCI_ERROR if
+            'number' or 'rsl' is null
+            'rsl_length' is 0
+    }
+  {-------------------------- OCINumberFromReal ------------------------------ }
+{$IFNDEF LinkDynamically}
+  function OCINumberFromReal(err:POCIError; rnum:Pdvoid; rnum_length:uword; number:POCINumber):sword;cdecl;external ocilib name 'OCINumberFromReal';
+{$ELSE}
+  OCINumberFromReal : function (err:POCIError; rnum:Pdvoid; rnum_length:uword; number:POCINumber):sword;cdecl;
+{$ENDIF}
+
+  {
+     NAME: OCINumberFromReal - OCINumber convert Real TO Number 
+     PARAMETERS:
+          err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+          rnum (IN) - pointer to the floating point number to be converted
+          rnum_length (IN) - size of the desired result, i.e.
+                  sizeof(float | double | long double)
+          number (OUT) - given float converted to Oracle number
+     DESCRIPTION:
+          Native type conversion function. Converts a machine-native floating
+          point type to an Oracle number.
+     RETURNS:
+          OCI_SUCCESS if the function completes successfully.
+          OCI_INVALID_HANDLE if 'err' is NULL.
+          OCI_ERROR if
+            'number' or 'rnum' is null
+            'rnum_length' is 0
+    }
+  {----------------------------- OCINumberCmp -------------------------------- }
+{$IFNDEF LinkDynamically}
+  function OCINumberCmp(err:POCIError; number1:POCINumber; number2:POCINumber; result:Psword):sword;cdecl;external ocilib name 'OCINumberCmp';
+{$ELSE}
+  OCINumberCmp : function (err:POCIError; number1:POCINumber; number2:POCINumber; result:Psword):sword;cdecl;
+{$ENDIF}
+
+  {
+     NAME: OCINumberCmp - OCINumber CoMPare numbers 
+     PARAMETERS:
+          err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+          number1, number2 (IN) - numbers to be compared
+          result (OUT) - 0 if equal, negative if number1 < number2, 
+                  positive if number1 > number2 
+     DESCRIPTION:
+          The function OCINumberCmp compares two numbers.
+     RETURNS:
+          OCI_SUCCESS if the function completes successfully.
+          OCI_INVALID_HANDLE if 'err' is NULL.
+          OCI_ERROR if
+              'number1' or 'number2' or 'result' is null 
+    }
+  {---------------------------- OCINumberSign -------------------------------- }
+{$IFNDEF LinkDynamically}
+  function OCINumberSign(err:POCIError; number:POCINumber; result:Psword):sword;cdecl;external ocilib name 'OCINumberSign';
+{$ELSE}
+  OCINumberSign : function (err:POCIError; number:POCINumber; result:Psword):sword;cdecl;
+{$ENDIF}
+
+  {
+     NAME: OCINumberSign - OCINumber obtains SiGN of an Oracle number
+     PARAMETERS:
+          err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+          number (IN) - number whose sign is returned
+          result (OUT) - 0 if number == 0, -1 if number < 0, 
+                  1 if number > 0 
+     DESCRIPTION:
+          Obtains sign of an Oracle number
+     RETURNS:
+          OCI_SUCCESS if the function completes successfully.
+          OCI_INVALID_HANDLE if 'err' is NULL.
+          OCI_ERROR if
+              'number' or 'result' is null
+    }
+  {---------------------------- OCINumberIsZero ------------------------------ }
+{$IFNDEF LinkDynamically}
+  function OCINumberIsZero(err:POCIError; number:POCINumber; result:Pboolean):sword;cdecl;external ocilib name 'OCINumberIsZero';
+{$ELSE}
+  OCINumberIsZero : function (err:POCIError; number:POCINumber; result:Pboolean):sword;cdecl;
+{$ENDIF}
+
+  {
+     NAME: OCINumberIsZero - OCINumber comparison with ZERo
+     PARAMETERS:
+          err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+          number (IN) - numbers to be compared
+          result (OUT) - set to TRUE if equal to zero else FALSE
+     DESCRIPTION:
+          Test if the given number is equal to zero.
+     RETURNS:
+          OCI_SUCCESS if the function completes successfully.
+          OCI_INVALID_HANDLE if 'err' is NULL.
+          OCI_ERROR if
+              'number' or 'result' is null
+    }
+  {---------------------------- OCINumberIsInt ------------------------------- }
+{$IFNDEF LinkDynamically}
+  function OCINumberIsInt(err:POCIError; number:POCINumber; result:Pboolean):sword;cdecl;external ocilib name 'OCINumberIsInt';
+{$ELSE}
+  OCINumberIsInt : function (err:POCIError; number:POCINumber; result:Pboolean):sword;cdecl;
+{$ENDIF}
+
+  {
+     NAME: OCINumberIsInt - OCINumber Is Integer value.
+     PARAMETERS:
+          err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+          number (IN) - number to be tested
+          result (OUT) - set to TRUE if integer value else FALSE
+     DESCRIPTION:
+          Test if the given number is an integer value.
+     RETURNS:
+          OCI_SUCCESS if the function completes successfully.
+          OCI_INVALID_HANDLE if 'err' is NULL.
+          OCI_ERROR if
+              'number' or 'result' is null
+    }
+  {-------------------------- OCINumberAssign -------------------------------- }
+{$IFNDEF LinkDynamically}
+  function OCINumberAssign(err:POCIError; from:POCINumber; cto:POCINumber):sword;cdecl;external ocilib name 'OCINumberAssign';
+{$ELSE}
+  OCINumberAssign : function (err:POCIError; from:POCINumber; cto:POCINumber):sword;cdecl;
+{$ENDIF}
+
+  {
+     NAME: OCINumberAssign - OCINumber ASsiGn number
+     PARAMETERS:
+          err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+          from (IN) - number to be assigned
+          to (OUT) - number copied into
+     DESCRIPTION:
+          Assign number 'from' to 'to'.
+     RETURNS:
+          OCI_SUCCESS if the function completes successfully.
+          OCI_INVALID_HANDLE if 'err' is NULL.
+          OCI_ERROR if
+            'from' or 'to' is null
+    }
+  {----------------------------- OCINumberAbs -------------------------------- }
+{$IFNDEF LinkDynamically}
+  function OCINumberAbs(err:POCIError; number:POCINumber; result:POCINumber):sword;cdecl;external ocilib name 'OCINumberAbs';
+{$ELSE}
+  OCINumberAbs : function (err:POCIError; number:POCINumber; result:POCINumber):sword;cdecl;
+{$ENDIF}
+
+  {
+     NAME: OCINumberAbs - OCINumber compute ABSolute value
+     PARAMETERS:
+          err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+          number (IN) - input number
+          result (OUT) - output which will contain the absolue value of the
+                  input number
+     DESCRIPTION:
+          Computes the absolute value of an Oracle number.
+     RETURNS:
+          OCI_SUCCESS if the function completes successfully.
+          OCI_INVALID_HANDLE if 'err' is NULL.
+          OCI_ERROR if
+            any of the number arguments is null
+    }
+  {---------------------------- OCINumberCeil -------------------------------- }
+{$IFNDEF LinkDynamically}
+  function OCINumberCeil(err:POCIError; number:POCINumber; result:POCINumber):sword;cdecl;external ocilib name 'OCINumberCeil';
+{$ELSE}
+  OCINumberCeil : function (err:POCIError; number:POCINumber; result:POCINumber):sword;cdecl;
+{$ENDIF}
+
+  {
+     NAME: OCINumberCeil - OCINumber compute the CEiL value of an Oracle number
+     PARAMETERS:
+          err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+          number (IN) - input number
+          result (OUT) - output which will contain the ceil value of the
+                  input number
+     DESCRIPTION:
+          Computes the ceil value of an Oracle number.
+     RETURNS:
+          OCI_SUCCESS if the function completes successfully.
+          OCI_INVALID_HANDLE if 'err' is NULL.
+          OCI_ERROR if
+            any of the number arguments is null
+    }
+  {--------------------------- OCINumberFloor -------------------------------- }
+{$IFNDEF LinkDynamically}
+  function OCINumberFloor(err:POCIError; number:POCINumber; result:POCINumber):sword;cdecl;external ocilib name 'OCINumberFloor';
+{$ELSE}
+  OCINumberFloor : function (err:POCIError; number:POCINumber; result:POCINumber):sword;cdecl;
+{$ENDIF}
+
+  {
+     NAME: OCINumberFloor - OCINumber compute the FLooR value of an Oracle number
+     PARAMETERS:
+          err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+          number (IN) - input number
+          result (OUT) - output which will contain the floor value of the
+                  input number
+     DESCRIPTION:
+          Computes the floor value of an Oracle number.
+     RETURNS:
+          OCI_SUCCESS if the function completes successfully.
+          OCI_INVALID_HANDLE if 'err' is NULL.
+          OCI_ERROR if
+            any of the number arguments is null
+    }
+  {----------------------------- OCINumberSqrt ------------------------------- }
+{$IFNDEF LinkDynamically}
+  function OCINumberSqrt(err:POCIError; number:POCINumber; result:POCINumber):sword;cdecl;external ocilib name 'OCINumberSqrt';
+{$ELSE}
+  OCINumberSqrt : function (err:POCIError; number:POCINumber; result:POCINumber):sword;cdecl;
+{$ENDIF}
+
+  {
+     NAME: OCINumberSqrt - OCINumber compute the SQuare Root of an Oracle number
+     PARAMETERS:
+          err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+          number (IN) - input number
+          result (OUT) - output which will contain the square root of the
+                  input number
+     DESCRIPTION:
+          Computes the square root of an Oracle number.
+     RETURNS:
+          OCI_SUCCESS if the function completes successfully.
+          OCI_INVALID_HANDLE if 'err' is NULL.
+          OCI_ERROR if
+            any of the number arguments is null
+            'number' is negative
+    }
+  {--------------------------- OCINumberTrunc -------------------------------- }
+{$IFNDEF LinkDynamically}
+  function OCINumberTrunc(err:POCIError; number:POCINumber; decplace:sword; result:POCINumber):sword;cdecl;external ocilib name 'OCINumberTrunc';
+{$ELSE}
+  OCINumberTrunc : function (err:POCIError; number:POCINumber; decplace:sword; result:POCINumber):sword;cdecl;
+{$ENDIF}
+
+  {
+     NAME: OCINumberTrunc - OCINumber TRUncate an Oracle number at a 
+                            specified decimal place
+     PARAMETERS:
+          err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+          number (IN) - input number
+          decplace (IN) - number of decimal digits to the right of the 
+                  decimal point to truncate at. Negative values are allowed.
+          result (OUT) - output of truncation
+     DESCRIPTION:
+          Truncate an Oracle number at a specified decimal place
+     RETURNS:
+          OCI_SUCCESS if the function completes successfully.
+          OCI_INVALID_HANDLE if 'err' is NULL.
+          OCI_ERROR if
+            any of the number arguments is null
+    }
+  {----------------------------- OCINumberPower ------------------------------ }
+{$IFNDEF LinkDynamically}
+  function OCINumberPower(err:POCIError; base:POCINumber; number:POCINumber; result:POCINumber):sword;cdecl;external ocilib name 'OCINumberPower';
+{$ELSE}
+  OCINumberPower : function (err:POCIError; base:POCINumber; number:POCINumber; result:POCINumber):sword;cdecl;
+{$ENDIF}
+
+  {
+     NAME: OCINumberPower - OCINumber takes an arbitary Base to an 
+                            arbitary Power
+     PARAMETERS:
+          err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+          base (IN) - base of the exponentiation
+          number (IN) - exponent to which the base is to be raised
+          result (OUT) - output of exponentiation
+     DESCRIPTION:
+          Takes an arbitary base to an arbitary power.
+     RETURNS:
+          OCI_SUCCESS if the function completes successfully.
+          OCI_INVALID_HANDLE if 'err' is NULL.
+          OCI_ERROR if
+            any of the number arguments is null
+    }
+  {--------------------------- OCINumberRound -------------------------------- }
+{$IFNDEF LinkDynamically}
+  function OCINumberRound(err:POCIError; number:POCINumber; decplace:sword; result:POCINumber):sword;cdecl;external ocilib name 'OCINumberRound';
+{$ELSE}
+  OCINumberRound : function (err:POCIError; number:POCINumber; decplace:sword; result:POCINumber):sword;cdecl;
+{$ENDIF}
+
+  {
+     NAME: OCINumberRound - OCINumber ROUnds an Oracle number to a specified 
+                    decimal place
+     PARAMETERS:
+          err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+          number (IN) - round this number and return result in 'result'
+          decplace (IN) - number of decimal digits to the right of the 
+                  decimal point to round to. Negative values are allowed.
+          result (OUT) - output of rounding
+     DESCRIPTION:
+          Rounds an Oracle number to a specified decimal place
+     RETURNS:
+          OCI_SUCCESS if the function completes successfully.
+          OCI_INVALID_HANDLE if 'err' is NULL.
+          OCI_ERROR if
+            any of the number arguments is null
+    }
+  {--------------------------- OCINumberPrec --------------------------------- }
+{$IFNDEF LinkDynamically}
+  function OCINumberPrec(err:POCIError; number:POCINumber; nDigs:eword; result:POCINumber):sword;cdecl;external ocilib name 'OCINumberPrec';
+{$ELSE}
+  OCINumberPrec : function (err:POCIError; number:POCINumber; nDigs:eword; result:POCINumber):sword;cdecl;
+{$ENDIF}
+
+  {
+     NAME: OCINumberPrec - Rounds an Oracle number to a specified number of
+                           decimal digits.
+     PARAMETERS:
+          err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+          number (IN) - number for which to set precision.
+          nDig   (IN) - number of decimal digits desired in the result.
+          result (OUT) - result.
+     DESCRIPTION:
+          Performs a floating point round with respect to the number
+          of digits.
+     RETURNS:
+          OCI_SUCCESS if the function completes successfully.
+          OCI_INVALID_HANDLE if 'err' is NULL.
+          OCI_ERROR if
+            any of the number arguments is null
+    }
+  {----------------------------- OCINumberSin -------------------------------- }
+{$IFNDEF LinkDynamically}
+  function OCINumberSin(err:POCIError; number:POCINumber; result:POCINumber):sword;cdecl;external ocilib name 'OCINumberSin';
+{$ELSE}
+  OCINumberSin : function (err:POCIError; number:POCINumber; result:POCINumber):sword;cdecl;
+{$ENDIF}
+
+  {
+     NAME: OCINumberSin - OCINumber takes the SINe of an Oracle number
+     PARAMETERS:
+          err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+          number (IN) - argument of the sine in radians
+          result (OUT) - result of the sine
+     DESCRIPTION:
+          Takes the sine in radians of an Oracle number.
+     RETURNS:
+          OCI_SUCCESS if the function completes successfully.
+          OCI_INVALID_HANDLE if 'err' is NULL.
+          OCI_ERROR if
+            any of the number arguments is null
+    }
+  {-------------------------- OCINumberArcSin -------------------------------- }
+{$IFNDEF LinkDynamically}
+  function OCINumberArcSin(err:POCIError; number:POCINumber; result:POCINumber):sword;cdecl;external ocilib name 'OCINumberArcSin';
+{$ELSE}
+  OCINumberArcSin : function (err:POCIError; number:POCINumber; result:POCINumber):sword;cdecl;
+{$ENDIF}
+
+  {
+     NAME: OCINumberArcSin - OCINumber takes the Arc SINe of an Oracle number
+     PARAMETERS:
+          err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+          number (IN) - argument of the arc sine
+          result (OUT) - result of the arc sine in radians
+     DESCRIPTION:
+          Takes the arc sine in radians of an Oracle number.
+     RETURNS:
+          OCI_SUCCESS if the function completes successfully.
+          OCI_INVALID_HANDLE if 'err' is NULL.
+          OCI_ERROR if
+            any of the number arguments is null
+            'number' is < -1 or 'number' is > 1.
+    }
+  {-------------------------- OCINumberHypSin -------------------------------- }
+{$IFNDEF LinkDynamically}
+  function OCINumberHypSin(err:POCIError; number:POCINumber; result:POCINumber):sword;cdecl;external ocilib name 'OCINumberHypSin';
+{$ELSE}
+  OCINumberHypSin : function (err:POCIError; number:POCINumber; result:POCINumber):sword;cdecl;
+{$ENDIF}
+
+  {
+     NAME: OCINumberHypSin - OCINumber takes the SiNe Hyperbolic of an 
+                             Oracle number
+     PARAMETERS:
+          err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+          number (IN) - argument of the sine hyperbolic
+          result (OUT) - result of the sine hyperbolic
+     DESCRIPTION:
+          Takes the hyperbolic sine of an Oracle number.
+     RETURNS:
+          OCI_SUCCESS if the function completes successfully.
+          OCI_INVALID_HANDLE if 'err' is NULL.
+          OCI_ERROR if
+            any of the number arguments is null
+     NOTES:
+          An Oracle number overflow causes an unpredictable result value.
+    }
+  {----------------------------- OCINumberCos -------------------------------- }
+{$IFNDEF LinkDynamically}
+  function OCINumberCos(err:POCIError; number:POCINumber; result:POCINumber):sword;cdecl;external ocilib name 'OCINumberCos';
+{$ELSE}
+  OCINumberCos : function (err:POCIError; number:POCINumber; result:POCINumber):sword;cdecl;
+{$ENDIF}
+
+  {
+     NAME: OCINumberCos - OCINumber takes the COSine of an Oracle number
+     PARAMETERS:
+          err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+          number (IN) - argument of the cosine in radians
+          result (OUT) - result of the cosine
+     DESCRIPTION:
+          Takes the cosine in radians of an Oracle number.
+     RETURNS:
+          OCI_SUCCESS if the function completes successfully.
+          OCI_INVALID_HANDLE if 'err' is NULL.
+          OCI_ERROR if
+            any of the number arguments is null
+    }
+  {-------------------------- OCINumberArcCos -------------------------------- }
+{$IFNDEF LinkDynamically}
+  function OCINumberArcCos(err:POCIError; number:POCINumber; result:POCINumber):sword;cdecl;external ocilib name 'OCINumberArcCos';
+{$ELSE}
+  OCINumberArcCos : function (err:POCIError; number:POCINumber; result:POCINumber):sword;cdecl;
+{$ENDIF}
+
+  {
+     NAME: OCINumberArcCos - OCINumber takes the Arc COSine of an Oracle number
+     PARAMETERS:
+          err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+          number (IN) - argument of the arc cosine
+          result (OUT) - result of the arc cosine in radians
+     DESCRIPTION:
+          Takes the arc cosine in radians of an Oracle number.
+     RETURNS:
+          OCI_SUCCESS if the function completes successfully.
+          OCI_INVALID_HANDLE if 'err' is NULL.
+          OCI_ERROR if
+            any of the number arguments is null
+            'number' is < -1 or 'number' is > 1.
+    }
+  {-------------------------- OCINumberHypCos -------------------------------- }
+{$IFNDEF LinkDynamically}
+  function OCINumberHypCos(err:POCIError; number:POCINumber; result:POCINumber):sword;cdecl;external ocilib name 'OCINumberHypCos';
+{$ELSE}
+  OCINumberHypCos : function (err:POCIError; number:POCINumber; result:POCINumber):sword;cdecl;
+{$ENDIF}
+
+  {
+     NAME: OCINumberHypCos - OCINumber takes the CoSine Hyperbolic of an 
+                             Oracle number
+     PARAMETERS:
+          err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+          number (IN) - argument of the cosine hyperbolic
+          result (OUT) - result of the cosine hyperbolic
+     DESCRIPTION:
+          Takes the hyperbolic cosine of an Oracle number.
+     RETURNS:
+          OCI_SUCCESS if the function completes successfully.
+          OCI_INVALID_HANDLE if 'err' is NULL.
+          OCI_ERROR if
+            any of the number arguments is null
+     NOTES:
+          An Oracle number overflow causes an unpredictable result value.
+    }
+  {----------------------------- OCINumberTan -------------------------------- }
+{$IFNDEF LinkDynamically}
+  function OCINumberTan(err:POCIError; number:POCINumber; result:POCINumber):sword;cdecl;external ocilib name 'OCINumberTan';
+{$ELSE}
+  OCINumberTan : function (err:POCIError; number:POCINumber; result:POCINumber):sword;cdecl;
+{$ENDIF}
+
+  {
+     NAME: OCINumberTan - OCINumber takes the TANgent of an Oracle number
+     PARAMETERS:
+          err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+          number (IN) - argument of the tangent in radians
+          result (OUT) - result of the tangent
+     DESCRIPTION:
+          Takes the tangent in radians of an Oracle number.
+     RETURNS:
+          OCI_SUCCESS if the function completes successfully.
+          OCI_INVALID_HANDLE if 'err' is NULL.
+          OCI_ERROR if
+            any of the number arguments is null
+    }
+  {-------------------------- OCINumberArcTan -------------------------------- }
+{$IFNDEF LinkDynamically}
+  function OCINumberArcTan(err:POCIError; number:POCINumber; result:POCINumber):sword;cdecl;external ocilib name 'OCINumberArcTan';
+{$ELSE}
+  OCINumberArcTan : function (err:POCIError; number:POCINumber; result:POCINumber):sword;cdecl;
+{$ENDIF}
+
+  {
+     NAME: OCINumberArcTan - OCINumber takes the Arc TANgent of an Oracle number
+     PARAMETERS:
+          err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+          number (IN) - argument of the arc tangent
+          result (OUT) - result of the arc tangent in radians
+     DESCRIPTION:
+          Takes the arc tangent in radians of an Oracle number.
+     RETURNS:
+          OCI_SUCCESS if the function completes successfully.
+          OCI_INVALID_HANDLE if 'err' is NULL.
+          OCI_ERROR if
+            any of the number arguments is null
+    }
+  {------------------------ OCINumberArcTan2 --------------------------------- }
+{$IFNDEF LinkDynamically}
+  function OCINumberArcTan2(err:POCIError; number1:POCINumber; number2:POCINumber; result:POCINumber):sword;cdecl;external ocilib name 'OCINumberArcTan2';
+{$ELSE}
+  OCINumberArcTan2 : function (err:POCIError; number1:POCINumber; number2:POCINumber; result:POCINumber):sword;cdecl;
+{$ENDIF}
+
+  {
+     NAME: OCINumberArcTan2 - OCINumber takes the ATan2 of 2 Oracle numbers
+     PARAMETERS:
+          err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+          number1 (IN) - first argument of atan2(y,x) function which 
+                  corresponds to 'y' parameter in the function
+          number2 (IN) - second argument of atan2(y,x) function which 
+                  corresponds to 'x' parameter in the function
+          result (OUT) - result of the atan2() in radians
+     DESCRIPTION:
+          Takes the atan2(number1, number2).
+     RETURNS:
+          OCI_SUCCESS if the function completes successfully.
+          OCI_INVALID_HANDLE if 'err' is NULL.
+          OCI_ERROR if
+            any of the number arguments is null
+            'number2' is 0
+    }
+  {----------------------------- OCINumberHypTan ----------------------------- }
+{$IFNDEF LinkDynamically}
+  function OCINumberHypTan(err:POCIError; number:POCINumber; result:POCINumber):sword;cdecl;external ocilib name 'OCINumberHypTan';
+{$ELSE}
+  OCINumberHypTan : function (err:POCIError; number:POCINumber; result:POCINumber):sword;cdecl;
+{$ENDIF}
+
+  {
+     NAME: OCINumberHypTan - OCINumber takes the TaNgent Hyperbolic of an Oracle
+                             number
+     PARAMETERS:
+          err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+          number (IN) - argument of the tangent hyperbolic
+          result (OUT) - result of the tangent hyperbolic
+     DESCRIPTION:
+          Takes the hyperbolic tangent of an Oracle number.
+     RETURNS:
+          OCI_SUCCESS if the function completes successfully.
+          OCI_INVALID_HANDLE if 'err' is NULL.
+          OCI_ERROR if
+            any of the number arguments is null
+     NOTES:
+          An Oracle number overflow causes an unpredictable result value.
+    }
+  {--------------------------- OCINumberExp ---------------------------------- }
+{$IFNDEF LinkDynamically}
+  function OCINumberExp(err:POCIError; number:POCINumber; result:POCINumber):sword;cdecl;external ocilib name 'OCINumberExp';
+{$ELSE}
+  OCINumberExp : function (err:POCIError; number:POCINumber; result:POCINumber):sword;cdecl;
+{$ENDIF}
+
+  {
+     NAME: OCINumberExp - OCINumber EXPonential
+     PARAMETERS:
+          err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+          number (IN) - e raised to this Oracle number power
+          result (OUT) - output of exponentiation
+     DESCRIPTION:
+          Raises e to the specified Oracle number power
+     RETURNS:
+          OCI_SUCCESS if the function completes successfully.
+          OCI_INVALID_HANDLE if 'err' is NULL.
+          OCI_ERROR if
+            any of the number arguments is null
+    }
+  {----------------------------- OCINumberLn --------------------------------- }
+{$IFNDEF LinkDynamically}
+  function OCINumberLn(err:POCIError; number:POCINumber; result:POCINumber):sword;cdecl;external ocilib name 'OCINumberLn';
+{$ELSE}
+  OCINumberLn : function(err:POCIError; number:POCINumber; result:POCINumber):sword;cdecl;
+{$ENDIF}
+
+  {
+     NAME: OCINumberLn - OCINumber Logarithm Natural
+     PARAMETERS:
+          err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+          number (IN) - logarithm of this number is computed
+          result (OUT) - logarithm result
+     DESCRIPTION:
+          Takes the logarithm of the given Oracle number with respect
+          to the given base.
+     RETURNS:
+          OCI_SUCCESS if the function completes successfully.
+          OCI_INVALID_HANDLE if 'err' is NULL.
+          OCI_ERROR if
+            any of the number arguments is null
+            'number' is <= 0
+    }
+  {----------------------------- OCINumberLog -------------------------------- }
+{$IFNDEF LinkDynamically}
+  function OCINumberLog(err:POCIError; base:POCINumber; number:POCINumber; result:POCINumber):sword;cdecl;external ocilib name 'OCINumberLog';
+{$ELSE}
+  OCINumberLog : function (err:POCIError; base:POCINumber; number:POCINumber; result:POCINumber):sword;cdecl;
+{$ENDIF}
+
+  {
+     NAME: OCINumberLog - OCINumber LOGarithm any base
+     PARAMETERS:
+          err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+          base (IN) - base of the logarithm
+          number (IN) - opearnd
+          result (OUT) - logarithm result
+     DESCRIPTION:
+          Takes the logarithm with the specified base of an Oracle number.
+     RETURNS:
+          OCI_SUCCESS if the function completes successfully.
+          OCI_INVALID_HANDLE if 'err' is NULL.
+          OCI_ERROR if
+            any of the number arguments is null
+            'number' is <= 0
+            'base' is <= 0
+    }
+  {*************************************************************************** }
+  {                             ORACLE DATE TYPE                               }
+  {*************************************************************************** }
+  { hours; range is 0 <= hours <=23  }
+  { minutes; range is 0 <= minutes <= 59  }
+  { seconds; range is 0 <= seconds <= 59  }
+
+  type
+     POCITime = ^OCITime;
+     OCITime = record
+          OCITimeHH : ub1;
+          OCITimeMI : ub1;
+          OCITimeSS : ub1;
+       end;
+
+  { 
+   * OCITime - OCI TiMe portion of date
+   *
+   * This structure should be treated as an opaque structure as the format
+   * of this structure may change. Use OCIDateGetTime/OCIDateSetTime 
+   * to manipulate time portion of OCIDate.
+    }
+  { gregorian year; range is -4712 <= year <= 9999  }
+  { month; range is 1 <= month < 12  }
+  { day; range is 1 <= day <= 31  }
+  { time  }
+     POCIDate = ^OCIDate;
+     OCIDate = record
+          OCIDateYYYY : sb2;
+          OCIDateMM : ub1;
+          OCIDateDD : ub1;
+          OCIDateTime : OCITime;
+       end;
+
+  { 
+   * OCIDate - OCI oracle Date representation in C
+   *
+   * OCIDate represents the C mapping of Oracle date.
+   *
+   * This structure should be treated as an opaque structure as the format
+   * of this structure may change. Use OCIDateGetDate/OCIDateSetDate
+   * to access/initialize OCIDate.
+   *
+   * For binding variables of type OCIDate in OCI calls (OCIBindByName(),
+   * OCIBindByPos(), and OCIDefineByPos()) use the type code SQLT_ODT.
+    }
+  {
+     EXAMPLE 
+  
+     The following example shows how to manipulate an attribute of type 
+     oracle date.
+    
+       #define FMT "Month dd, YYYY, HH:MI A.M."
+       #define LANG "American"
+  
+       struct person
+       
+         OCIDate start_date;
+       ;
+       typedef struct person person;
+  
+       OCIError *err;
+       person *joe;
+       sword status;                                           /o error status o/
+       
+       /o See oci.h for an example of how to initialize OCIError.
+        o For this example, assume the OCIEnv and OCIError has been
+        o initialized.
+        o/
+  
+       /o Pin joe person object in the object cache. See ori.h
+        o for an example on pinning objects. For this example, assume that
+        o joe is pointing to the pinned object.
+        o/
+  
+       /o set the start date of joe o/
+       OCIDateSetTime(&joe->start_date, 8, 0, 0);
+       OCIDateSetDate(&joe->start_date, 1990, 10, 5); 
+  
+       /o check if the date is valid o/
+       uword invalid;
+       if (OCIDateCheck(err, &joe->start_date, &invalid) != OCI_SUCCESS)
+         /o error handling code o/
+       if (invalid)
+         /o error handling code o/
+  
+       /o convert date for display purposes o/
+       char str[100];
+       ub4 strlen = sizeof(str);
+       if (OCIDateToText(err, &joe->start_date, FMT, sizeof(FMT)-1, LANG,
+                  sizeof(LANG)-1, &strlen, str) != OCI_SUCCESS)
+         /o error handling code o/
+  
+    }
+  {--------------------------- OCIDateGetTime -------------------------------- }
+  { void OCIDateGetTime(/o_ CONST OCIDate *date, ub1 *hour, ub1 *min, 
+                             ub1 *sec _o/);  }
+(* error
+  { \
+in declaration at line 1787 *)
+
+(* error
+     *hour = (date)->OCIDateTime.OCITimeHH; \
+ error
+     *min = (date)->OCIDateTime.OCITimeMI; \
+in declaration at line 1788
+ error
+     *min = (date)->OCIDateTime.OCITimeMI; \
+ error
+     *sec = (date)->OCIDateTime.OCITimeSS; \
+in declaration at line 1789
+ error
+     *sec = (date)->OCIDateTime.OCITimeSS; \
+ error
+  } *)
+    {
+       NAME: OCIDateGetTime - OCIDate Get Time portion of date
+       PARAMETERS:
+            date (IN) - Oracle date whose time data is retrieved
+            hour (OUT) - hour value returned
+            min (OUT) - minute value returned
+            sec (OUT) - second value returned
+       DESCRIPTION:
+            Return time inforamtion stored in the given date. The time
+            information returned is: hour, minute and seconds.
+       RETURNS:
+            NONE
+      }
+    {--------------------------- OCIDateGetDate -------------------------------- }
+    { void OCIDateGetDate(/o_ CONST OCIDate *date, sb2 *year, ub1 *month, 
+                               ub1 *day _o/);  }
+(*in declaration at line 1810 *)
+(* error 
+     *year = (date)->OCIDateYYYY; \
+ error
+     *month = (date)->OCIDateMM; \
+in declaration at line 1811
+ error
+     *month = (date)->OCIDateMM; \
+ error
+     *day = (date)->OCIDateDD; \
+in declaration at line 1812 *)
+(* error
+     *day = (date)->OCIDateDD; \
+ error
+  }
+    {
+       NAME: OCIDateGetDate - OCIDate Get Date (year, month, day) portion of date
+       PARAMETERS:
+            date (IN) - Oracle date whose year, month, day data is retrieved
+            year (OUT) - year value returned
+            month (OUT) - month value returned
+            day (OUT) - day value returned
+       DESCRIPTION:
+            Return year, month, day inforamtion stored in the given date.
+       RETURNS:
+            NONE
+      }
+    {--------------------------- OCIDateSetTime -------------------------------- }
+    { void OCIDateSetTime(/o_ OCIDate *date, ub1 hour, ub1 min, 
+                               ub1 sec _o/);  }
+in declaration at line 1832
+ error
+     (date)->OCIDateTime.OCITimeHH = hour; \
+ error
+     (date)->OCIDateTime.OCITimeMI = min; \
+in declaration at line 1833
+ error
+     (date)->OCIDateTime.OCITimeMI = min; \
+ error
+     (date)->OCIDateTime.OCITimeSS = sec; \
+in declaration at line 1834
+ error
+     (date)->OCIDateTime.OCITimeSS = sec; \
+ error
+  }
+    {
+       NAME: OCIDateSetTime - OCIDate Set Time portion of date
+       PARAMETERS:
+            date (OUT) - Oracle date whose time data is set
+            hour (IN) - hour value to be set 
+            min (IN) - minute value to be set
+            sec (IN) - second value to be set
+       DESCRIPTION:
+            Set the date with the given time inforamtion.
+       RETURNS:
+            NONE
+      }
+    {--------------------------- OCIDateSetDate -------------------------------- }
+    { void OCIDateSetDate(/o_ OCIDate *date, sb2 year, ub1 month, ub1 day _o/);  }
+in declaration at line 1853 *)
+(* error
+     (date)->OCIDateYYYY = year; \
+ error
+     (date)->OCIDateMM = month; \
+in declaration at line 1854
+ error
+     (date)->OCIDateMM = month; \
+ error
+     (date)->OCIDateDD = day; \
+in declaration at line 1855
+ error
+     (date)->OCIDateDD = day; \
+ error
+  } *)
+    {
+       NAME: OCIDateSetDate - OCIDate Set Date (year, month, day) portion of date
+       PARAMETERS:
+            date (IN) - Oracle date whose year, month, day data is set
+            year (OUT) - year value to be set
+            month (OUT) - month value to be set
+            day (OUT) - day value to be set
+       DESCRIPTION:
+            Set the date with the given year, month, day inforamtion.
+       RETURNS:
+            NONE
+      }
+    {--------------------------- OCIDateAssign --------------------------------- }
+(*in declaration at line 1873 *)
+    {
+       NAME: OCIDateAssign - OCIDate Assignment
+       PARAMETERS:
+            err (IN/OUT) - error handle. If there is an error, it is
+                    recorded in 'err' and this function returns OCI_ERROR.
+                    The error recorded in 'err' can be retrieved by calling
+                    OCIErrorGet().
+            from (IN) - date to be assigned
+            to (OUT) - lhs of assignment
+       DESCRIPTION:
+            Performs date assignment.
+       RETURNS:
+            OCI_SUCCESS
+      }
+    {--------------------------- OCIDateToText --------------------------------- }
+
+{$IFNDEF LinkDynamically}
+    function OCIDateToText(err:POCIError; date:POCIDate; fmt:Poratext; fmt_length:ub1; lang_name:Poratext;
+               lang_length:ub4; buf_size:Pub4; buf:Poratext):sword;cdecl;external ocilib name 'OCIDateToText';
+{$ELSE}
+var OCIDateToText : function (err:POCIError; date:POCIDate; fmt:Poratext; fmt_length:ub1; lang_name:Poratext;
+               lang_length:ub4; buf_size:Pub4; buf:Poratext):sword;cdecl;
+{$ENDIF}
+
+
+    {
+       NAME: OCIDateToText - OCIDate convert date TO String 
+       PARAMETERS:
+            err (IN/OUT) - error handle. If there is an error, it is
+                    recorded in 'err' and this function returns OCI_ERROR.
+                    The error recorded in 'err' can be retrieved by calling
+                    OCIErrorGet().
+            date (IN) - Oracle date to be converted
+            fmt (IN) - conversion format, if null string pointer (oratext*)0, then
+                    the date is converted to a character string in the
+                    date format "DD-MON-YY".
+            fmt_length (IN) - length of the 'fmt' parameter
+            lang_name (IN) - specifies the language in which the names and 
+                    abbreviations of months and days are returned;
+                    default language of session is used if 'lang_name' 
+                    is null i.e. (oratext *)0
+            lang_length (IN) - length of the 'nls_params' parameter
+            buf_size (IN/OUT) - size of the buffer; size of the resulting string
+                    is returned via this parameter
+            buf (OUT) - buffer into which the converted string is placed
+       DESCRIPTION:
+            Converts the given date to a string according to the specified format.
+            Refer to "TO_DATE" conversion function described in
+            "Oracle SQL Language Reference Manual" for a description of format
+            and NLS arguments. The converted null-terminated date string is
+            stored in the buffer 'buf'.
+     
+            An error is reported upon overflow, e.g. trying to convert a number
+            of value 10 using format '9' causes an overflow.
+       RETURNS:
+            OCI_SUCCESS if the function completes successfully.
+            OCI_INVALID_HANDLE if 'err' is NULL.
+            OCI_ERROR if
+              buffer too small
+              invalid format
+              unknown language
+              overflow error
+      }
+    {---------------------------- OCIDateFromText ------------------------------ }
+{$IFNDEF LinkDynamically}
+    function OCIDateFromText(err:POCIError; date_str:Poratext; d_str_length:ub4; fmt:Poratext; fmt_length:ub1;
+               lang_name:Poratext; lang_length:ub4; date:POCIDate):sword;cdecl;external ocilib name 'OCIDateFromText';
+{$ELSE}
+    OCIDateFromText : function (err:POCIError; date_str:Poratext; d_str_length:ub4; fmt:Poratext; fmt_length:ub1;
+               lang_name:Poratext; lang_length:ub4; date:POCIDate):sword;cdecl;
+{$ENDIF}
+
+    {
+       NAME: OCIDateFromText - OCIDate convert String TO Date
+       PARAMETERS:
+            err (IN/OUT) - error handle. If there is an error, it is
+                    recorded in 'err' and this function returns OCI_ERROR.
+                    The error recorded in 'err' can be retrieved by calling
+                    OCIErrorGet().
+            date_str (IN) - input string to be converted to Oracle date
+            d_str_length (IN) - size of the input string, if the length is -1
+                    then 'date_str' is treated as a null terminated  string
+            fmt (IN) - conversion format; if 'fmt' is a null pointer, then
+                    the string is expected to be in 'DD-MON-YY' format.
+            fmt_length (IN) - length of the 'fmt' parameter
+            lang_name (IN) - language in which the names and abbreviations of
+                    days and months are specified, if null i.e. (oratext *)0,
+                    the default language of session is used, 
+            lang_length (IN) - length of the 'lang_name' parameter
+            date (OUT) - given string converted to date
+       DESCRIPTION:
+            Converts the given string to Oracle date
+            according to the specified format. Refer to "TO_DATE" conversion
+            function described in "Oracle SQL Language Reference Manual" for a
+            description of format.
+       RETURNS:
+            OCI_SUCCESS if the function completes successfully.
+            OCI_INVALID_HANDLE if 'err' is NULL.
+            OCI_ERROR if
+              invalid format
+              unknown language
+              invalid input string
+              <to be discovered>
+      }
+    {----------------------------- OCIDateCompare ------------------------------ }
+{$IFNDEF LinkDynamically}
+    function OCIDateCompare(err:POCIError; date1:POCIDate; date2:POCIDate; result:Psword):sword;cdecl;external ocilib name 'OCIDateCompare';
+{$ELSE}
+    OCIDateCompare : function (err:POCIError; date1:POCIDate; date2:POCIDate; result:Psword):sword;cdecl;
+{$ENDIF}
+
+    {
+       NAME: OCIDateCompare - OCIDate CoMPare dates
+       PARAMETERS:
+            err (IN/OUT) - error handle. If there is an error, it is
+                    recorded in 'err' and this function returns OCI_ERROR.
+                    The error recorded in 'err' can be retrieved by calling
+                    OCIErrorGet().
+            date1, date2 (IN) - dates to be compared
+            result (OUT) - comparison result, 0 if equal, -1 if date1 < date2, 
+                    1 if date1 > date2
+       DESCRIPTION:
+            The function OCIDateCompare compares two dates. It returns -1 if date1 
+            is smaller than date2, 0 if they are equal, and 1 if date1 is greater 
+            than date2.
+       RETURNS:
+            OCI_SUCCESS if the function completes successfully.
+            OCI_INVALID_HANDLE if 'err' is NULL.
+            OCI_ERROR if
+              invalid date
+              <to be discovered>
+      }
+    {------------------------- OCIDateAddMonths -------------------------------- }
+{$IFNDEF LinkDynamically}
+    function OCIDateAddMonths(err:POCIError; date:POCIDate; num_months:sb4; result:POCIDate):sword;cdecl;external ocilib name 'OCIDateAddMonths';
+{$ELSE}
+    OCIDateAddMonths : function (err:POCIError; date:POCIDate; num_months:sb4; result:POCIDate):sword;cdecl;
+{$ENDIF}
+
+    {
+       NAME: OCIDateAddMonths - OCIDate ADd or subtract Months
+       PARAMETERS:
+            err (IN/OUT) - error handle. If there is an error, it is
+                    recorded in 'err' and this function returns OCI_ERROR.
+                    The error recorded in 'err' can be retrieved by calling
+                    OCIErrorGet().
+            date (IN) - 'num_months' added or subtracted from 'date'
+            num_months (IN) - number of months to be added or subtracted 
+                    (a negative value will be subtracted)
+            result (IN/OUT) - result of adding or subtracting to 'date'
+       DESCRIPTION:
+            The function OCIDateAddDays adds or subtracts num_months from the 
+            date 'date'.
+              If the input 'date' is the last day of a month, then 
+            appropriate adjustments are made to ensure that the output date is 
+            also the last day of the month. For example, Feb. 28 + 1 month =
+            March 31, and November 30 - 3 months = August 31. Otherwise the
+            'result' date has the same day component as 'date'. 
+       RETURNS:
+            OCI_SUCCESS if the function completes successfully.
+            OCI_INVALID_HANDLE if 'err' is NULL.
+            OCI_ERROR if
+              invalid date
+              <to be discovered>
+      }
+    {--------------------------- OCIDateAddDays -------------------------------- }
+{$IFNDEF LinkDynamically}
+    function OCIDateAddDays(err:POCIError; date:POCIDate; num_days:sb4; result:POCIDate):sword;cdecl;external ocilib name 'OCIDateAddDays';
+{$ELSE}
+    OCIDateAddDays : function (err:POCIError; date:POCIDate; num_days:sb4; result:POCIDate):sword;cdecl;
+{$ENDIF}
+
+    {
+       NAME: OCIDateAddDays - OCIDate ADd or subtract Days
+       PARAMETERS:
+            err (IN/OUT) - error handle. If there is an error, it is
+                    recorded in 'err' and this function returns OCI_ERROR.
+                    The error recorded in 'err' can be retrieved by calling
+                    OCIErrorGet().
+            date (IN) - 'num_days' added or subtracted from 'date'
+            num_days (IN) - number of days to be added or subtracted 
+                    (a negative value will be subtracted)
+            result (IN/OUT) - result of adding or subtracting to 'date'
+       DESCRIPTION:
+            The function OCIDateAddDays adds or subtracts num_days from the 
+            date 'date'.
+       RETURNS:
+            OCI_SUCCESS if the function completes successfully.
+            OCI_INVALID_HANDLE if 'err' is NULL.
+            OCI_ERROR if
+              invalid date
+              <to be discovered>
+      }
+    {--------------------------- OCIDateLastDay -------------------------------- }
+{$IFNDEF LinkDynamically}
+    function OCIDateLastDay(err:POCIError; date:POCIDate; last_day:POCIDate):sword;cdecl;external ocilib name 'OCIDateLastDay';
+{$ELSE}
+    OCIDateLastDay : function (err:POCIError; date:POCIDate; last_day:POCIDate):sword;cdecl;
+{$ENDIF}
+
+    {
+       NAME: OCIDateLastDay - OCIDate get date of the LaST day of the month
+       PARAMETERS:
+            err (IN/OUT) - error handle. If there is an error, it is
+                    recorded in 'err' and this function returns OCI_ERROR.
+                    The error recorded in 'err' can be retrieved by calling
+                    OCIErrorGet().
+            date (IN) - input date
+            last_day (OUT) - last day of the month in date 'date'
+       DESCRIPTION:
+            The function OCIDateLastDay returns the date of the last day of the
+            month in date 'date'.
+       RETURNS:
+            OCI_SUCCESS if the function completes successfully.
+            OCI_INVALID_HANDLE if 'err' is NULL.
+            OCI_ERROR if
+              invalid date
+              <to be discovered>
+      }
+    {----------------------- OCIDateDaysBetween -------------------------------- }
+{$IFNDEF LinkDynamically}
+    function OCIDateDaysBetween(err:POCIError; date1:POCIDate; date2:POCIDate; num_days:Psb4):sword;cdecl;external ocilib name 'OCIDateDaysBetween';
+{$ELSE}
+    OCIDateDaysBetween : function (err:POCIError; date1:POCIDate; date2:POCIDate; num_days:Psb4):sword;cdecl;
+{$ENDIF}
+
+    {
+       NAME: OCIDateDaysBetween - OCIDate get number of days BeTWeen two dates
+       PARAMETERS:
+            err (IN/OUT) - error handle. If there is an error, it is
+                    recorded in 'err' and this function returns OCI_ERROR.
+                    The error recorded in 'err' can be retrieved by calling
+                    OCIErrorGet().
+            date1, date2 (IN) - input dates
+            num_days (OUT) - number of days between date1 and date2
+       DESCRIPTION:
+            The function OCIDateDaysBetween returns the number of days between 
+            date1 and date2. The time is ignored in this computation.
+       RETURNS:
+            OCI_SUCCESS if the function completes successfully.
+            OCI_INVALID_HANDLE if 'err' is NULL.
+            OCI_ERROR if
+              invalid date
+              <to be discovered>
+      }
+    {------------------------ OCIDateZoneToZone -------------------------------- }
+{$IFNDEF LinkDynamically}
+    function OCIDateZoneToZone(err:POCIError; date1:POCIDate; zon1:Poratext; zon1_length:ub4; zon2:Poratext;
+               zon2_length:ub4; date2:POCIDate):sword;cdecl;external ocilib name 'OCIDateZoneToZone';
+{$ELSE}
+    OCIDateZoneToZone : function (err:POCIError; date1:POCIDate; zon1:Poratext; zon1_length:ub4; zon2:Poratext;
+               zon2_length:ub4; date2:POCIDate):sword;cdecl;
+{$ENDIF}
+
+    {
+       NAME: OCIDateZoneToZone - OCIDate convert date from one Zone TO another Zone
+       PARAMETERS:
+            err (IN/OUT) - error handle. If there is an error, it is
+                    recorded in 'err' and this function returns OCI_ERROR.
+                    The error recorded in 'err' can be retrieved by calling
+                    OCIErrorGet().
+            date1 (IN) - date to be converted
+            zon1 (IN) - zone of input date
+            zon1_length (IN) - length in bytes of string 'zon1'
+            zon2 (IN) - zone to be converted to
+            zon2_length (IN) - length in bytes of string 'zon2'
+            date2 (OUT) - converted date (in 'zon2')
+       DESCRIPTION:
+            Converts date from one time zone to another. Given date 'date1' 
+            in time zone 'zon1' returns date 'date2' in time zone 'zon2'.
+       RETURNS:
+            OCI_SUCCESS if the function completes successfully.
+            OCI_INVALID_HANDLE if 'err' is NULL.
+            OCI_ERROR if
+              invlid date
+              invald input time zone
+              invald output time zone
+              <to be discovered>
+      }
+    {--------------------------- OCIDateNextDay -------------------------------- }
+{$IFNDEF LinkDynamically}
+    function OCIDateNextDay(err:POCIError; date:POCIDate; day_p:Poratext; day_length:ub4; next_day:POCIDate):sword;cdecl;external ocilib name 'OCIDateNextDay';
+{$ELSE}
+    OCIDateNextDay : function (err:POCIError; date:POCIDate; day_p:Poratext; day_length:ub4; next_day:POCIDate):sword;cdecl;
+{$ENDIF}
+
+    {
+       NAME: OCIDateNextDay - OCIDate get date of Next DaY
+       PARAMETERS:
+            err (IN/OUT) - error handle. If there is an error, it is
+                    recorded in 'err' and this function returns OCI_ERROR.
+                    The error recorded in 'err' can be retrieved by calling
+                    OCIErrorGet().
+            date (IN) - returned date should be later than this date
+            day (IN) - first day of week named by this is returned
+            day_length (IN) - length in bytes of string 'day'
+            next_day (OUT) - first day of the week named by 'day' later than 'date'
+       DESCRIPTION:
+            Returns the date of the first day of the
+            week named by 'day' that is later than date 'date'.
+       RETURNS:
+            OCI_SUCCESS if the function completes successfully.
+            OCI_INVALID_HANDLE if 'err' is NULL.
+            OCI_ERROR if
+              invalid date
+              invalid day
+              <to be discovered>
+      }
+    {----------------------------- OCIDateCheck -------------------------------- }
+    { Listing of error bits used by OCIDateCheck()  }
+    { Bad DAy  }
+
+    const
+       OCI_DATE_INVALID_DAY = $1;       
+    { Bad DAy Low/high bit (1=low) }
+       OCI_DATE_DAY_BELOW_VALID = $2;       
+    { Bad MOnth  }
+       OCI_DATE_INVALID_MONTH = $4;       
+    { Bad MOnth Low/high bit (1=low) }
+       OCI_DATE_MONTH_BELOW_VALID = $8;       
+    { Bad YeaR  }
+       OCI_DATE_INVALID_YEAR = $10;       
+    { Bad YeaR Low/high bit (1=low) }
+       OCI_DATE_YEAR_BELOW_VALID = $20;       
+    { Bad HouR  }
+       OCI_DATE_INVALID_HOUR = $40;       
+    { Bad HouR Low/high bit (1=low) }
+       OCI_DATE_HOUR_BELOW_VALID = $80;       
+    { Bad MiNute  }
+       OCI_DATE_INVALID_MINUTE = $100;       
+       OCI_DATE_MINUTE_BELOW_VALID = $200;       
+    { Bad MiNute Low/high bit (1=low) }
+    { Bad SeCond  }
+       OCI_DATE_INVALID_SECOND = $400;       
+       OCI_DATE_SECOND_BELOW_VALID = $800;       
+    { bad second Low/high bit (1=low) }
+       OCI_DATE_DAY_MISSING_FROM_1582 = $1000;       
+    { Day is one of those "missing" from 1582  }
+    { Year may not equal zero  }
+       OCI_DATE_YEAR_ZERO = $2000;       
+    { Bad date format input  }
+       OCI_DATE_INVALID_FORMAT = $8000;       
+{$IFNDEF LinkDynamically}
+    function OCIDateCheck(err:POCIError; date:POCIDate; valid:Puword):sword;cdecl;external ocilib name 'OCIDateCheck';
+{$ELSE}
+var OCIDateCheck : function(err:POCIError; date:POCIDate; valid:Puword):sword;cdecl;
+{$ENDIF}
+
+
+    {
+       NAME: OCIDateCheck - OCIDate CHecK if the given date is valid
+       PARAMETERS:
+            err (IN/OUT) - error handle. If there is an error, it is
+                    recorded in 'err' and this function returns OCI_ERROR.
+                    The error recorded in 'err' can be retrieved by calling
+                    OCIErrorGet().
+            date (IN) - date to be checked
+            valid (OUT) -  returns zero for a valid date, otherwise 
+                    the ORed combination of all error bits specified below:
+      
+       Macro name                   Bit number      Error
+       ----------                   ----------      -----
+       OCI_DATE_INVALID_DAY         0x1             Bad day
+       OCI_DATE_DAY_BELOW_VALID     0x2             Bad DAy Low/high bit (1=low)
+       OCI_DATE_INVALID_MONTH       0x4             Bad MOnth
+       OCI_DATE_MONTH_BELOW_VALID   0x8             Bad MOnth Low/high bit (1=low)
+       OCI_DATE_INVALID_YEAR        0x10            Bad YeaR
+       OCI_DATE_YEAR_BELOW_VALID    0x20            Bad YeaR Low/high bit (1=low)
+       OCI_DATE_INVALID_HOUR        0x40            Bad HouR
+       OCI_DATE_HOUR_BELOW_VALID    0x80            Bad HouR Low/high bit (1=low)
+       OCI_DATE_INVALID_MINUTE      0x100           Bad MiNute
+       OCI_DATE_MINUTE_BELOW_VALID  0x200           Bad MiNute Low/high bit (1=low)
+       OCI_DATE_INVALID_SECOND      0x400           Bad SeCond
+       OCI_DATE_SECOND_BELOW_VALID  0x800           bad second Low/high bit (1=low)
+       OCI_DATE_DAY_MISSING_FROM_1582 0x1000        Day is one of those "missing"
+                                                    from 1582
+       OCI_DATE_YEAR_ZERO           0x2000          Year may not equal zero
+       OCI_DATE_INVALID_FORMAT      0x8000          Bad date format input
+      
+       So, for example, if the date passed in was 2/0/1990 25:61:10 in
+       (month/day/year hours:minutes:seconds format), the erroor returned
+       would be OCI_DATE_INVALID_DAY | OCI_DATE_DAY_BELOW_VALID |
+       OCI_DATE_INVALID_HOUR | OCI_DATE_INVALID_MINUTE
+    
+       DESCRIPTION:
+            Check if the given date is valid.
+       RETURNS:
+            OCI_SUCCESS if the function completes successfully.
+            OCI_INVALID_HANDLE if 'err' is NULL.
+            OCI_ERROR if
+              'date' and 'valid' pointers are NULL pointers
+      }
+    {--------------------------- OCIDateSysDate -------------------------------- }
+{$IFNDEF LinkDynamically}
+    function OCIDateSysDate(err:POCIError; sys_date:POCIDate):sword;cdecl;external ocilib name 'OCIDateSysDate';
+{$ELSE}
+    OCIDateSysDate : function (err:POCIError; sys_date:POCIDate):sword;cdecl;
+{$ENDIF}
+
+    {
+       NAME: OCIDateSysDate - OCIDate get current SYStem date and time
+       PARAMETERS:
+            err (IN/OUT) - error handle. If there is an error, it is
+                    recorded in 'err' and this function returns OCI_ERROR.
+                    The error recorded in 'err' can be retrieved by calling
+                    OCIErrorGet().
+            sys_date (OUT) - current system date and time
+       DESCRIPTION:
+            Returns the current system date and time.
+       RETURNS:
+            OCI_SUCCESS if the function completes successfully.
+            OCI_INVALID_HANDLE if 'err' is NULL.
+            OCI_ERROR if
+              <to be discovered>
+      }
+    {*************************************************************************** }
+    {                  FIXED-LENGTH STRING - CHAR (N)                            }
+    {*************************************************************************** }
+    {
+     * An ADT attribute declared as "x CHAR(n)" is mapped to "OCIString *x;".
+     * The representation of OCIString * is shown below.
+      }
+    {*************************************************************************** }
+    {                  VARIABLE-LENGTH STRING                                    }
+    {*************************************************************************** }
+    {
+     * The variable-length string is represented in C as a pointer to OCIString
+     * structure. The OCIString structure is opaque to the user. Functions are
+     * provided to allow the user to manipulate a variable-length string.
+     *     
+     * A variable-length string can be declared as:
+     *
+     * OCIString *vstr;
+     *
+     * For binding variables of type OCIString* in OCI calls (OCIBindByName(),
+     * OCIBindByPos() and OCIDefineByPos()) use the external type code SQLT_VST.
+      }
+
+    type
+      POCIString = pointer;
+
+    {-------------------------- OCIStringAssign -------------------------------- }
+{$IFNDEF LinkDynamically}
+    function OCIStringAssign(env:POCIEnv; err:POCIError; rhs:POCIString; var lhs:POCIString):sword;cdecl;external ocilib name 'OCIStringAssign';
+{$ELSE}
+var OCIStringAssign : function (env:POCIEnv; err:POCIError; rhs:POCIString; var lhs:POCIString):sword;cdecl;
+{$ENDIF}
+
+
+    {
+       NAME: OCIStringAssign - OCIString Assign String to String
+       PARAMETERS:
+            env (IN/OUT) - OCI environment handle initialized in object mode.
+            err (IN/OUT) - error handle. If there is an error, it is
+                    recorded in 'err' and this function returns OCI_ERROR.
+                    The error recorded in 'err' can be retrieved by calling
+                    OCIErrorGet().
+            rhs (IN) - RHS of the assignment, the type of rhs is also OCIString
+            lhs (IN/OUT) - LHS of the assignment
+       DESCRIPTION:
+            Assign 'rhs' string to 'lhs' string. The 'lhs' string may be
+            resized depending upon the size of the 'rhs'. The assigned string is
+            null-terminated. The 'length' field will not include the extra byte
+            needed for null termination.
+       RETURNS:
+            OCI_SUCCESS if the function completes successfully.
+            OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
+            OCI_ERROR if
+              out of space error
+      }
+    {---------------------- OCIStringAssignText -------------------------------- }
+{$IFNDEF LinkDynamically}
+    function OCIStringAssignText(env:POCIEnv; err:POCIError; rhs:Poratext; rhs_len:ub4; var lhs:POCIString):sword;cdecl;external ocilib name 'OCIStringAssignText';
+{$ELSE}
+    OCIStringAssignText : function (env:POCIEnv; err:POCIError; rhs:Poratext; rhs_len:ub4; var lhs:POCIString):sword;cdecl;
+{$ENDIF}
+
+    {
+       NAME: OCIStringAssignText - OCIString Assign Text string to String
+       PARAMETERS:
+            env (IN/OUT) - OCI environment handle initialized in object mode.
+            err (IN/OUT) - error handle. If there is an error, it is
+                    recorded in 'err' and this function returns OCI_ERROR.
+                    The error recorded in 'err' can be retrieved by calling
+                    OCIErrorGet().
+            rhs (IN) - RHS of the assignment, the type of rhs is a text string
+            rhs_len (IN) - length of the 'rhs' string
+            lhs (IN/OUT) - LHS of the assignment
+       DESCRIPTION:
+            Assign 'rhs' string to 'lhs' string. The 'lhs' string may be
+            resized depending upon the size of the 'rhs'. The assigned string is
+            null-terminated. The 'length' field will not include the extra byte
+            needed for null termination.
+       RETURNS:
+            OCI_SUCCESS if the function completes successfully.
+            OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
+            OCI_ERROR if
+              out of space error
+      }
+    {-------------------------- OCIStringResize -------------------------------- }
+{$IFNDEF LinkDynamically}
+    function OCIStringResize(env:POCIEnv; err:POCIError; new_size:ub4; var str:POCIString):sword;cdecl;external ocilib name 'OCIStringResize';
+{$ELSE}
+    OCIStringResize : function (env:POCIEnv; err:POCIError; new_size:ub4; var str:POCIString):sword;cdecl;
+{$ENDIF}
+
+    {
+       NAME: OCIStringResize - OCIString ReSiZe string memory
+       PARAMETERS:
+            env (IN/OUT) - OCI environment handle initialized in object mode.
+            err (IN/OUT) - error handle. If there is an error, it is
+                    recorded in 'err' and this function returns OCI_ERROR.
+                    The error recorded in 'err' can be retrieved by calling
+                    OCIErrorGet().
+            new_size (IN) - new memory size of the string in bytes
+            str (IN/OUT) - allocated memory for the string is freed from the 
+                    OOCI heap
+       DESCRIPTION:
+            This function resizes the memory of the given variable-length string in
+            the object cache. The contents of the string are NOT preserved.
+            This function may allocate the string in a new memory region in
+            which case the original memory occupied by the given string will
+            be freed. If the input string is null (str == NULL), then this
+            function will allocate memory for the string.
+     
+            If the new_size is 0, then this function frees the memory occupied
+            by 'str' and a null pointer value is returned.
+     
+            NOTE: The caller must compute 'new_size' taking into account space
+            for the null character ('\0').
+       RETURNS:
+            OCI_SUCCESS if the function completes successfully.
+            OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
+            OCI_ERROR if
+              out of space error
+      }
+    {---------------------------- OCIStringSize -------------------------------- }
+{$IFNDEF LinkDynamically}
+    function OCIStringSize(env:POCIEnv; vs:POCIString):ub4;cdecl;external ocilib name 'OCIStringSize';
+{$ELSE}
+    OCIStringSize : function (env:POCIEnv; vs:POCIString):ub4;cdecl;
+{$ENDIF}
+
+    {
+       NAME: OCIStringSize - OCIString Get String siZe
+       PARAMETERS:
+            env(IN) - pointer to OCI environment handle
+            vs (IN) - string whose size is returned
+       DESCRIPTION:
+            Return the size of the given string.
+       RETURNS:
+            size of the string in bytes is returned
+      }
+    {----------------------------- OCIStringPtr -------------------------------- }
+{$IFNDEF LinkDynamically}
+    function OCIStringPtr(env:POCIEnv; vs:POCIString):Poratext;cdecl;external ocilib name 'OCIStringPtr';
+{$ELSE}
+    OCIStringPtr : function (env:POCIEnv; vs:POCIString):Poratext;cdecl;
+{$ENDIF}
+
+    {
+       NAME: OCIStringPtr - OCIString Get String Pointer
+       PARAMETERS:
+            env(IN) - pointer to OCI environment handle
+            vs (IN) - pointer to the text of this string is returned
+       DESCRIPTION:
+            Return the pointer to the text of the given string.
+       RETURNS:
+            pointer to the text of the string is returned
+      }
+    {----------------------- OCIStringAllocSize -------------------------------- }
+{$IFNDEF LinkDynamically}
+    function OCIStringAllocSize(env:POCIEnv; err:POCIError; vs:POCIString; allocsize:Pub4):sword;cdecl;external ocilib name 'OCIStringAllocSize';
+{$ELSE}
+    OCIStringAllocSize : function (env:POCIEnv; err:POCIError; vs:POCIString; allocsize:Pub4):sword;cdecl;
+{$ENDIF}
+
+    {
+       NAME: OCIStringAllocSize - OCIString get Allocated SiZe of string memory 
+                                  in bytes
+       PARAMETERS:
+            env (IN/OUT) - OCI environment handle initialized in object mode.
+            err (IN/OUT) - error handle. If there is an error, it is
+                    recorded in 'err' and this function returns OCI_ERROR.
+                    The error recorded in 'err' can be retrieved by calling
+                    OCIErrorGet().
+            vs (IN) - string whose allocated size in bytes is returned
+            allocsize (OUT) - allocated size of string memory in bytes is returned
+       DESCRIPTION:
+            Return the allocated size of the string memory in bytes. The
+            allocated size is >= actual string size.
+       REQUIRES:
+            vs is a non-null pointer
+       RETURNS:
+            OCI_SUCCESS if the function completes successfully.
+            OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
+            OCI_ERROR on error
+      }
+    {*************************************************************************** }
+    {                       VARIABLE-LENGTH RAW                                  }
+    {*************************************************************************** }
+    {
+     * The variable-length raw is represented in C as a pointer to OCIRaw
+     * structure. The OCIRaw structure is opaque to the user. Functions are
+     * provided to allow the user to manipulate a variable-length raw.
+     *     
+     * A variable-length raw can be declared as:
+     *
+     * OCIRaw *raw;
+     *
+     * For binding variables of type OCIRaw* in OCI calls (OCIBindByName(),
+     * OCIBindByPos() and OCIDefineByPos()) use the external type code SQLT_LVB.
+      }
+
+    type
+      POCIRaw = pointer;
+
+    {-------------------------- OCIRawAssignRaw -------------------------------- }
+{$IFNDEF LinkDynamically}
+    function OCIRawAssignRaw(env:POCIEnv; err:POCIError; rhs:POCIRaw; var lhs:POCIRaw):sword;cdecl;external ocilib name 'OCIRawAssignRaw';
+{$ELSE}
+var OCIRawAssignRaw : function (env:POCIEnv; err:POCIError; rhs:POCIRaw; var lhs:POCIRaw):sword;cdecl;
+{$ENDIF}
+
+
+    {
+       NAME: OCIRawAssignRaw - OCIRaw Assign Raw (of type OCIRaw*) to
+                       Raw (of type OCIRaw*)
+       PARAMETERS:
+            env (IN/OUT) - OCI environment handle initialized in object mode.
+            err (IN/OUT) - error handle. If there is an error, it is
+                    recorded in 'err' and this function returns OCI_ERROR.
+                    The error recorded in 'err' can be retrieved by calling
+                    OCIErrorGet().
+            rhs (IN) - RHS of the assignment, the type of rhs is also OCIRaw
+            lhs (IN/OUT) - LHS of the assignment
+       DESCRIPTION:
+            Assign 'rhs' raw to 'lhs' raw. The 'lhs' raw may be
+            resized depending upon the size of the 'rhs'.
+       RETURNS:
+            OCI_SUCCESS if the function completes successfully.
+            OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
+            OCI_ERROR if
+              out of space error
+      }
+    {------------------------ OCIRawAssignBytes -------------------------------- }
+{$IFNDEF LinkDynamically}
+    function OCIRawAssignBytes(env:POCIEnv; err:POCIError; rhs:Pub1; rhs_len:ub4; var lhs:POCIRaw):sword;cdecl;external ocilib name 'OCIRawAssignBytes';
+{$ELSE}
+    OCIRawAssignBytes : function (env:POCIEnv; err:POCIError; rhs:Pub1; rhs_len:ub4; var lhs:POCIRaw):sword;cdecl;
+{$ENDIF}
+
+    {
+       NAME: OCIRawAssignBytes - OCIRaw Assign raw Bytes (of type ub1*) to Raw 
+                       (of type OCIRaw*)
+       PARAMETERS:
+            env (IN/OUT) - OCI environment handle initialized in object mode.
+            err (IN/OUT) - error handle. If there is an error, it is
+                    recorded in 'err' and this function returns OCI_ERROR.
+                    The error recorded in 'err' can be retrieved by calling
+                    OCIErrorGet().
+            rhs (IN) - RHS of the assignment, the type of rhs is ub1 *
+            rhs_len (IN) - length of the 'rhs' raw
+            lhs (IN/OUT) - LHS of the assignment
+       DESCRIPTION:
+            Assign 'rhs' raw to 'lhs' raw. The 'lhs' raw may be
+            resized depending upon the size of the 'rhs'.
+       RETURNS:
+            OCI_SUCCESS if the function completes successfully.
+            OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
+            OCI_ERROR if
+              out of space error
+      }
+    {---------------------------- OCIRawResize --------------------------------- }
+{$IFNDEF LinkDynamically}
+    function OCIRawResize(env:POCIEnv; err:POCIError; new_size:ub4; var raw:POCIRaw):sword;cdecl;external ocilib name 'OCIRawResize';
+{$ELSE}
+    OCIRawResize : function (env:POCIEnv; err:POCIError; new_size:ub4; var raw:POCIRaw):sword;cdecl;
+{$ENDIF}
+
+    {
+       NAME: OCIRawResize - OCIRaw ReSiZe memory of variable-length raw
+       PARAMETERS:
+            env (IN/OUT) - OCI environment handle initialized in object mode.
+            err (IN/OUT) - error handle. If there is an error, it is
+                    recorded in 'err' and this function returns OCI_ERROR.
+                    The error recorded in 'err' can be retrieved by calling
+                    OCIErrorGet().
+            new_size (IN) - new size of the raw data in bytes
+            raw (IN) - variable-length raw pointer; the raw is
+                    resized to 'new_size'
+       DESCRIPTION:
+            This function resizes the memory of the given variable-length raw in
+            the object cache. 
+            The previous contents of the raw are NOT preserved.
+            This function may allocate the raw in a new memory region in
+            which case the original memory occupied by the given raw will
+            be freed. If the input raw is null (raw == NULL), then this
+            function will allocate memory for the raw data.
+     
+            If the new_size is 0, then this function frees the memory occupied
+            by 'raw' and a null pointer value is returned.
+       RETURNS:
+            OCI_SUCCESS if the function completes successfully.
+            OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
+            OCI_ERROR if
+              out of space error
+      }
+    {------------------------------- OCIRawSize -------------------------------- }
+{$IFNDEF LinkDynamically}
+    function OCIRawSize(env:POCIEnv; raw:POCIRaw):ub4;cdecl;external ocilib name 'OCIRawSize';
+{$ELSE}
+    OCIRawSize : function (env:POCIEnv; raw:POCIRaw):ub4;cdecl;
+{$ENDIF}
+
+    {
+       NAME: OCIRawSize - OCIRaw Get Raw siZe
+       PARAMETERS:
+            env (IN)  - pointer to OCI environment handle
+            raw (INT) - raw whose size is returned
+       DESCRIPTION:
+            Return the size of the given raw.
+       RETURNS:
+            size of the raw in bytes is returned
+      }
+    {--------------------------------- OCIRawPtr ------------------------------- }
+{$IFNDEF LinkDynamically}
+    function OCIRawPtr(env:POCIEnv; raw:POCIRaw):Pub1;cdecl;external ocilib name 'OCIRawPtr';
+{$ELSE}
+    OCIRawPtr : function(env:POCIEnv; raw:POCIRaw):Pub1;cdecl;
+{$ENDIF}
+
+    {
+       NAME: OCIRawPtr - OCIRaw Get Raw data Pointer
+       PARAMETERS:
+            env (IN) - pointer to OCI environment handle
+            raw (IN) - pointer to the data of this raw is returned
+       DESCRIPTION:
+            Return the pointer to the data of the given raw.
+       RETURNS:
+            pointer to the data of the raw is returned
+      }
+    {------------------------------ OCIRawAllocSize ---------------------------- }
+{$IFNDEF LinkDynamically}
+    function OCIRawAllocSize(env:POCIEnv; err:POCIError; raw:POCIRaw; allocsize:Pub4):sword;cdecl;external ocilib name 'OCIRawAllocSize';
+{$ELSE}
+    OCIRawAllocSize : function (env:POCIEnv; err:POCIError; raw:POCIRaw; allocsize:Pub4):sword;cdecl;
+{$ENDIF}
+
+    {
+       NAME: OCIRawAllocSize - OCIRaw get Allocated SiZe of raw memory in bytes
+       PARAMETERS:
+            env (IN/OUT) - OCI environment handle initialized in object mode.
+            err (IN/OUT) - error handle. If there is an error, it is
+                    recorded in 'err' and this function returns OCI_ERROR.
+                    The error recorded in 'err' can be retrieved by calling
+                    OCIErrorGet().
+            raw (IN) - raw whose allocated size in bytes is returned
+            allocsize (OUT) - allocated size of raw memory in bytes is returned
+       DESCRIPTION:
+            Return the allocated size of the raw memory in bytes. The
+            allocated size is >= actual raw size.
+       REQUIRES:
+            raw is a non-null pointer
+       RETURNS:
+            OCI_SUCCESS if the function completes successfully.
+            OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
+            OCI_ERROR upon error
+      }
+    {*************************************************************************** }
+    {                     OBJECT REFERENCE OPERATIONS                            }
+    {*************************************************************************** }
+    { 
+     * See the definition of OCIRef in oro.h.
+     *
+     * For binding variables of type OCIRef* in OCI calls (OCIBindByName(),
+     * OCIBindByPos() and OCIDefineByPos()) use the code SQLT_REF.
+     * 
+      }
+    {---------------------------- OCIRefClear ---------------------------------- }
+{$IFNDEF LinkDynamically}
+    procedure OCIRefClear(env:POCIEnv; ref:POCIRef);cdecl;external ocilib name 'OCIRefClear';
+{$ELSE}
+    OCIRefClear : procedure (env:POCIEnv; ref:POCIRef);cdecl;
+{$ENDIF}
+
+    {
+       NAME: OCIRefClear - OCIRef CLeaR or nullify a ref
+       PARAMETERS:
+            env (IN)     - pointer to OCI environment handle
+            ref (IN/OUT) - ref to clear
+       DESCRIPTION:
+            Clear or nullify the given ref. A ref is considered to be a null ref
+            if it does not contain a valid OID (and thus doesn't point to an
+            object). Logically, a null ref is a dangling ref.
+    
+            Note that a null ref is still a valid SQL value and is not SQL-ly null.
+            It can be used as a valid non-null constant ref value for NOT NULL
+            column or attribute of a row in a table.
+            
+            If a null pointer value is passed as a ref,
+            then this function is a no-op.
+      }
+    {--------------------------- OCIRefAssign ---------------------------------- }
+{$IFNDEF LinkDynamically}
+    function OCIRefAssign(env:POCIEnv; err:POCIError; source:POCIRef; var target:POCIRef):sword;cdecl;external ocilib name 'OCIRefAssign';
+{$ELSE}
+    OCIRefAssign : function (env:POCIEnv; err:POCIError; source:POCIRef; var target:POCIRef):sword;cdecl;
+{$ENDIF}
+
+    {
+       NAME: OCIRefAssign - OCIRef CoPY a ref to another
+       PARAMETERS:
+            env (IN/OUT) - OCI environment handle initialized in object mode.
+            err (IN/OUT) - error handle. If there is an error, it is
+                    recorded in 'err' and this function returns OCI_ERROR.
+                    The error recorded in 'err' can be retrieved by calling
+                    OCIErrorGet().
+            source (IN) - ref to copy from
+            target (IN/OUT) - ref to copy to
+       DESCRIPTION:
+            Copy 'source' ref to 'target' ref; both then reference the same
+            object. If the target ref pointer is null (i.e. *target == NULL)
+            then the copy function will allocate memory for the target ref
+            in OOCI heap prior to the copy.
+       RETURNS:
+            OCI_SUCCESS if the function completes successfully.
+            OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
+            OCI_ERROR if
+              1) out of memory
+      }
+    {-------------------------- OCIRefIsEqual ---------------------------------- }
+{$IFNDEF LinkDynamically}
+    function OCIRefIsEqual(env:POCIEnv; x:POCIRef; y:POCIRef):boolean;cdecl;external ocilib name 'OCIRefIsEqual';
+{$ELSE}
+    OCIRefIsEqual : function (env:POCIEnv; x:POCIRef; y:POCIRef):boolean;cdecl;
+{$ENDIF}
+
+    {
+       NAME: OCIRefIsEqual - OCIRef compare two refs for EQUality
+       PARAMETERS:
+            env (IN) - pointer to OCI environment handle
+            x (IN)   - ref to compare
+            y (IN)   - ref to compare
+       DESCRIPTION:
+            Compare the given refs for equality.
+            Two refs are equal if and only if:
+              - they are both referencing the same persistent object, or
+              - they are both referencing the same transient object.
+    
+            NOTE THAT TWO NULL REFS ARE CONSIDERED NOT EQUAL BY THIS FUNCTION.
+       RETURNS:
+            TRUE if the two refs are equal
+            FALSE if the two refs are not equal, or X is NULL, or Y is NULL
+      }
+    {--------------------------- OCIRefIsNull ---------------------------------- }
+{$IFNDEF LinkDynamically}
+    function OCIRefIsNull(env:POCIEnv; ref:POCIRef):boolean;cdecl;external ocilib name 'OCIRefIsNull';
+{$ELSE}
+    OCIRefIsNull : function (env:POCIEnv; ref:POCIRef):boolean;cdecl;
+{$ENDIF}
+
+    {
+       NAME: OCIRefIsNull - OCIRef test if a ref is NULl
+       PARAMETERS:
+            env (IN) - pointer to OCI environment handle
+            ref (IN) - ref to test for null
+       DESCRIPTION:
+            Return TRUE if the given ref is null; otherwise, return FALSE.
+            A ref is null if and only if:
+            - it is supposed to be referencing a persistent object, but
+              its OID is null, or
+            - it is supposed to be referencing a transient object, but it is
+              currently not pointing to an object.
+            A ref is a dangling ref if the object that it points to does not
+            exist.
+       RETURNS:
+            TRUE if the given ref is NULL
+            FALSE if the given ref is not NULL
+      }
+    {-------------------------- OCIRefHexSize ---------------------------------- }
+{$IFNDEF LinkDynamically}
+    function OCIRefHexSize(env:POCIEnv; ref:POCIRef):ub4;cdecl;external ocilib name 'OCIRefHexSize';
+{$ELSE}
+    OCIRefHexSize : function (env:POCIEnv; ref:POCIRef):ub4;cdecl;
+{$ENDIF}
+
+    {
+       NAME: OCIRefHexSize - OCIRef Hexadecimal buffer SiZe in bytes
+       PARAMETERS:
+            env (IN) - pointer to OCI environment handle
+            ref (IN) - ref whose size in hexadecimal representation in bytes is
+                    returned
+       DESCRIPTION:
+            Return the size of the buffer in bytes required for the hexadecimal
+            representation of the ref. A buffer of at-least this size must be
+            passed to ref-to-hex (OCIRefToHex) conversion function.
+       RETURNS:
+            size of hexadecimal representation of ref
+      }
+    {-------------------------- OCIRefFromHex --------------------------------- }
+{$IFNDEF LinkDynamically}
+    function OCIRefFromHex(env:POCIEnv; err:POCIError; svc:POCISvcCtx; hex:Poratext; length:ub4;
+               var ref:POCIRef):sword;cdecl;external ocilib name 'OCIRefFromHex';
+{$ELSE}
+    OCIRefFromHex : function (env:POCIEnv; err:POCIError; svc:POCISvcCtx; hex:Poratext; length:ub4;
+               var ref:POCIRef):sword;cdecl;
+{$ENDIF}
+
+    {
+       NAME:
+            OCIRefFromHex - OCIRef convert a Hexadecimal string TO a Ref
+       PARAMETERS:
+            env (IN/OUT) - OCI environment handle initialized in object mode
+            err (IN/OUT) - error handle. If there is an error, it is
+                    recorded in 'err' and this function returns OCI_ERROR.
+                    The error recorded in 'err' can be retrieved by
+                    calling OCIErrorGet().
+            svc (IN) - OCI service context handle; if the resulting ref is
+                    initialized with this service context
+            hex (IN) - hexadecimal string (that was produced by 'OCIRefToHex()"
+                    previously) to be convert into a ref
+            length (IN) - length of the hexadecimal string
+            ref (IN/OUT) - ref is initialized with the given value ('hex').
+                    If *ref is null, then space for the ref is allocated in the
+                    object cache, otherwise the memory occupied by the given ref
+                    is re-used.
+       DESCRIPTION:
+            Convert the given hexadecimal string into a ref. This function
+            ensures that the resulting ref is well formed. It does NOT ensure
+            that the object pointed to by the resulting ref exists or not.
+       RETURNS:
+            OCI_SUCCESS if the function completes successfully.
+            OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
+            OCI_ERROR if
+      }
+    {--------------------------- OCIRefToHex ----------------------------------- }
+{$IFNDEF LinkDynamically}
+    function OCIRefToHex(env:POCIEnv; err:POCIError; ref:POCIRef; hex:Poratext; hex_length:Pub4):sword;cdecl;external ocilib name 'OCIRefToHex';
+{$ELSE}
+    OCIRefToHex : function (env:POCIEnv; err:POCIError; ref:POCIRef; hex:Poratext; hex_length:Pub4):sword;cdecl;
+{$ENDIF}
+
+    {
+       NAME:
+            OCIRefToHex - OCIRef convert ref to a Hexadecimal string
+       PARAMETERS:
+            env (IN/OUT) - OCI environment handle initialized in object mode
+            err (IN/OUT) - error handle. If there is an error, it is
+                    recorded in 'err' and this function returns OCI_ERROR.
+                    The error recorded in 'err' can be retrieved by
+                    calling OCIErrorGet().
+            ref (IN) - ref to be converted into a hexadecimal string; if the
+                    ref is a null ref (i.e. OCIRefIsNull(ref) == TRUE) then
+                    a zero hex_length value is returned
+            hex (OUT) - buffer that is large enough to contain the resulting
+                    hexadecimal string; the contents of the string is opaque
+                    to the caller
+            hex_length (IN/OUT) - on input specifies the size of the 'hex' buffer,
+                    on output specifies the actual size of the hexadecimal
+                    string being returned in 'hex'
+       DESCRIPTION:
+            Convert the given ref into a hexadecimal string, and return the length
+            of the string. The resulting string is opaque to the caller.
+       RETURNS:
+            OCI_SUCCESS if the function completes successfully.
+            OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
+            OCI_ERROR if
+              the given buffer is not big enough to hold the resulting string
+      }
+    {*************************************************************************** }
+    {                          COLLECTION FUNCTIONS                              }
+    {*************************************************************************** }
+    { 
+       The generic collection is represented by the type 'OCIColl'. The following
+       operations OCIColl*() are provided on a generic collection:
+         - get current size of collection
+         - get upper bound of collection
+         - get pointer to an element given its index
+         - set element at given index (assign element)
+         - append an element 
+         - trim the given number of elements from the end of the collection
+         - collection assignment
+    
+       The following iterator based scanning functions are also provided on a
+       generic collection. These functions make use of an iterator which is
+       defined to be of type OCIIter.
+    
+         - create an iterator for scanning collection
+         - destroy iterator
+         - reset iterator to the beginning of collection
+         - get pointer to current element pointed by iterator
+         - get pointer to next element
+         - get pointer to previous element
+    
+       The collections variable-length array (varray) and nested table
+       are sub-types of generic collection. This means that the OCIColl*() 
+       functions can also be used to manipulate varray and nested table.
+    
+       The varray is represented by OCIArray type and nested table by OCITable.
+       Besides OCIColl*() functions no additional functions are provided for
+       manipulating varrays. The OCIColl*() functions are a complete set of 
+       functions to manipulate varrays.
+    
+       Besides OCIColl*() functions, the following functions OCITable*() can be 
+       used to manipulate nested table. The OCITable*() functions operate on 
+       nested tables only and should not be used on a varray.
+    
+         - delete an element at index i. Note that the position
+           ordinals of the remaining elements of the table is not changed by the
+           delete operation. So delete creates "holes" in the table.
+         - check if an element exists at the given index i
+         - return the smallest value of i for which exists(i) is true
+         - return the largest value of i for which exists(i) is true
+         - return pointer to the smallest position j, greater than i, such that 
+           OCITableExists(j) is true
+         - return pointer to the largest position j, less than i, such that 
+           OCITableExists(j) is true
+    
+       For binding variables of type OCIColl* or OCITable* in OCI calls
+       (OCIBindByName(), OCIBindByPos() and OCIDefineByPos()) use the external
+       type code SQLT_NTY.
+      }
+    { OCIColl - generic collection type  }
+    type
+       POCIColl = pointer;
+
+    { OCIArray - varray collection type  }
+
+       POCIArray = pointer;
+//       POCIArray = ^OCIArray;
+//       OCIArray = OCIColl;
+    { OCITable - nested table collection type  }
+
+       POCITable = pointer;
+//       POCITable = ^OCITable;
+//       OCITable = OCIColl;
+    { OCIIter - collection iterator  }
+       POCIIter = pointer;
+
+    {----------------------------- OCICollSize --------------------------------- }
+{$IFNDEF LinkDynamically}
+    function OCICollSize(env:POCIEnv; err:POCIError; coll:POCIColl; size:Psb4):sword;cdecl;external ocilib name 'OCICollSize';
+{$ELSE}
+var OCICollSize : function (env:POCIEnv; err:POCIError; coll:POCIColl; size:Psb4):sword;cdecl;
+{$ENDIF}
+
+
+    {
+       NAME: OCICollSize - OCIColl return current SIZe of the given collection
+       PARAMETERS:
+            env(IN) - pointer to OCI environment handle
+            err (IN/OUT) - error handle. If there is an error, it is
+                    recorded in 'err' and this function returns OCI_ERROR.
+                    The error recorded in 'err' can be retrieved by calling
+                    OCIErrorGet().
+            coll (IN) - collection whose number of elements is returned
+            size (OUT) - current number of elements in the collection
+       DESCRIPTION:
+              Returns the current number of elements in the given collection.
+    
+              For collections of type nested table wherein 'delete element'
+              operation is allowed, the count returned by OCICollSize() will
+              NOT be decremented upon deleting elements. For example:
+    
+                OCICollSize(...); 
+                // assume 'size' returned is equal to 5
+                OCITableDelete(...); // delete one element
+                OCICollSize(...);
+                // 'size' returned will still be 5
+    
+              To get the count minus the deleted elements use OCITableSize(). 
+              Continuing the above example,
+    
+                OCITableSize(...)
+                // 'size' returned will be equal to 4
+    
+              Note, a trim operation (OCICollTrim) will decrement the count 
+              by the number of trimmed elements. Continuing the above example,
+    
+                OCICollTrim(..,1..); // trim one element
+                OCICollSize(...);
+                // 'size' returned will be equal to 4
+       RETURNS:
+            OCI_SUCCESS if the function completes successfully.
+            OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
+            OCI_ERROR if
+              error during loading of collection into object cache
+              any of the input parameters is null
+      }
+    {------------------------------ OCICollMax --------------------------------- }
+{$IFNDEF LinkDynamically}
+    function OCICollMax(env:POCIEnv; coll:POCIColl):sb4;cdecl;external ocilib name 'OCICollMax';
+{$ELSE}
+    OCICollMax : function (env:POCIEnv; coll:POCIColl):sb4;cdecl;
+{$ENDIF}
+
+    {
+       NAME: OCICollMax - OCIColl return MAXimum size (upper-bound) of the
+                       given collection (in number of elements)
+       PARAMETERS:
+            env(IN) - pointer to OCI environment handle
+            coll (IN) - collection whose upper-bound in number of elements 
+                    is returned
+       DESCRIPTION:
+            Returns the max number of elements that the given collection can hold.
+            A value 0 indicates that the collection has no upper-bound.
+       REQUIRES:
+            coll must point to a valid collection descriptor
+       RETURNS:
+            upper-bound of the given collection
+      }
+    {-------------------------- OCICollGetElem --------------------------------- }
+{$IFNDEF LinkDynamically}
+    function OCICollGetElem(env:POCIEnv; err:POCIError; coll:POCIColl; index:sb4; exists:Pboolean;
+               elem:PPdvoid; elemind:PPdvoid):sword;cdecl;external ocilib name 'OCICollGetElem';
+{$ELSE}
+    OCICollGetElem : function (env:POCIEnv; err:POCIError; coll:POCIColl; index:sb4; exists:Pboolean;
+               elem:PPdvoid; elemind:PPdvoid):sword;cdecl;
+{$ENDIF}
+
+    {
+       NAME: OCICollGetElem - OCIColl GET pointer to the element at the given index
+       PARAMETERS:
+            env (IN/OUT) - OCI environment handle initialized in object mode.
+            err (IN/OUT) - error handle. If there is an error, it is
+                    recorded in 'err' and this function returns OCI_ERROR.
+                    The error recorded in 'err' can be retrieved by calling
+                    OCIErrorGet().
+            coll (IN) - pointer to the element in this collection is returned
+            index (IN) - index of the element whose pointer is returned
+            exists (OUT) - set to FALSE if element at the specified index does 
+                    not exist else TRUE
+            elem (OUT) - address of the desired element is returned
+            elemind (OUT) [optional] - address of the null indicator information 
+                    is returned; if (elemind == NULL) then the null indicator
+                    information will NOT be returned
+       DESCRIPTION:
+            Get the address of the element at the given position. Optionally
+            this function also returns the address of the element's null indicator
+            information.
+     
+            The following table describes for each collection element type
+            what the corresponding element pointer type is. The element pointer
+            is returned via the 'elem' parameter of OCICollGetElem().
+     
+               Element Type                       *elem is set to
+            -----------------------               ---------------
+             Oracle Number (OCINumber)              OCINumber*
+             Date (OCIDate)                         OCIDate*
+             Variable-length string (OCIString*)    OCIString**
+             Variable-length raw (OCIRaw*)          OCIRaw**
+             object reference (OCIRef*)             OCIRef**
+             lob locator (OCILobLocator*)           OCILobLocator**
+             object type (e.g. person)              person*
+     
+            The element pointer returned by OCICollGetElem() is in a form
+            such that it can not only be used to access the
+            element data but also is in a form that can be used as the target
+            (i.e left-hand-side) of an assignment statement.
+     
+            For example, assume the user is iterating over the elements of
+            a collection whose element type is object reference (OCIRef*). A call
+            to OCICollGetElem() returns pointer to a reference handle
+            (i.e. OCIRef**). After getting, the pointer to the collection
+            element, the user may wish to modify it by assigning a new reference.
+            This can be accomplished via the ref assignment function shown below:
+     
+            sword OCIRefAssign( OCIEnv *env, OCIError *err, CONST OCIRef *source,
+                                OCIRef **target );
+     
+            Note that the 'target' parameter of OCIRefAssign() is of type
+            'OCIRef**'. Hence OCICollGetElem() returns 'OCIRef**'.
+            If '*target == NULL' a new ref will be allocated by OCIRefAssign()
+            and returned via the 'target' parameter.
+     
+            Similarly, if the collection element was of type string (OCIString*),
+            OCICollGetElem() returns pointer to string handle
+            (i.e. OCIString**). If a new string is assigned, via
+            OCIStringAssign() or OCIStringAssignText() the type of the target
+            must be 'OCIString **'.
+     
+            If the collection element is of type Oracle number, OCICollGetElem()
+            returns OCINumber*. The prototype of OCINumberAssign() is shown below:
+     
+            sword OCINumberAssign(OCIError *err, CONST OCINumber *from,
+                                  OCINumber *to);
+       RETURNS:
+            OCI_SUCCESS if the function completes successfully.
+            OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
+            OCI_ERROR if
+              any of the input parameters is null
+      }
+    {------------------------- OCICollGetElemArray ----------------------------- }
+{$IFNDEF LinkDynamically}
+    function OCICollGetElemArray(env:POCIEnv; err:POCIError; coll:POCIColl; index:sb4; exists:Pboolean;
+               elem:PPdvoid; elemind:PPdvoid; nelems:Puword):sword;cdecl;external ocilib name 'OCICollGetElemArray';
+{$ELSE}
+    OCICollGetElemArray : function (env:POCIEnv; err:POCIError; coll:POCIColl; index:sb4; exists:Pboolean;
+               elem:PPdvoid; elemind:PPdvoid; nelems:Puword):sword;cdecl;
+{$ENDIF}
+
+    {
+       NAME: OCICollGetElemArray - OCIColl GET pointers to elements from given index
+       PARAMETERS:
+            env (IN/OUT) - OCI environment handle initialized in object mode.
+            err (IN/OUT) - error handle. If there is an error, it is
+                    recorded in 'err' and this function returns OCI_ERROR.
+                    The error recorded in 'err' can be retrieved by calling
+                    OCIErrorGet().
+            coll (IN) - pointers to the elements in this collection is returned
+            index (IN) - starting index of the element
+            exists (OUT) - set to FALSE if element at the specified index does 
+                    not exist else TRUE
+            elem (OUT) - address of the desired elements is returned
+            elemind (OUT) [optional] - address of the null indicators information 
+                    is returned; if (elemind == NULL) then the null indicator
+                    information will NOT be returned
+            nelems(IN/OUT) - Upper bound of elem and/or elemind array
+       DESCRIPTION:
+            Get the address of the elements from the given position. Optionally
+            this function also returns the address of the element's null indicator
+            information.
+     
+            The following table describes for each collection element type
+            what the corresponding element pointer type is. The element pointer
+            is returned via the 'elem' parameter of OCICollGetElem().
+     
+               Element Type                       *elem is set to
+            -----------------------               ---------------
+             Oracle Number (OCINumber)              OCINumber*
+             Date (OCIDate)                         OCIDate*
+             Variable-length string (OCIString*)    OCIString**
+             Variable-length raw (OCIRaw*)          OCIRaw**
+             object reference (OCIRef*)             OCIRef**
+             lob locator (OCILobLocator*)           OCILobLocator**
+             object type (e.g. person)              person*
+     
+            The element pointer returned by OCICollGetElem() is in a form
+            such that it can not only be used to access the
+            element data but also is in a form that can be used as the target
+            (i.e left-hand-side) of an assignment statement.
+     
+            For example, assume the user is iterating over the elements of
+            a collection whose element type is object reference (OCIRef*). A call
+            to OCICollGetElem() returns pointer to a reference handle
+            (i.e. OCIRef**). After getting, the pointer to the collection
+            element, the user may wish to modify it by assigning a new reference.
+            This can be accomplished via the ref assignment function shown below:
+     
+            sword OCIRefAssign( OCIEnv *env, OCIError *err, CONST OCIRef *source,
+                                OCIRef **target );
+     
+            Note that the 'target' parameter of OCIRefAssign() is of type
+            'OCIRef**'. Hence OCICollGetElem() returns 'OCIRef**'.
+            If '*target == NULL' a new ref will be allocated by OCIRefAssign()
+            and returned via the 'target' parameter.
+     
+            Similarly, if the collection element was of type string (OCIString*),
+            OCICollGetElem() returns pointer to string handle
+            (i.e. OCIString**). If a new string is assigned, via
+            OCIStringAssign() or OCIStringAssignText() the type of the target
+            must be 'OCIString **'.
+     
+            If the collection element is of type Oracle number, OCICollGetElem()
+            returns OCINumber*. The prototype of OCINumberAssign() is shown below:
+     
+            sword OCINumberAssign(OCIError *err, CONST OCINumber *from,
+                                  OCINumber *to);
+       RETURNS:
+            OCI_SUCCESS if the function completes successfully.
+            OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
+            OCI_ERROR if
+              any of the input parameters is null
+      }
+    {----------------------- OCICollAssignElem --------------------------------- }
+{$IFNDEF LinkDynamically}
+    function OCICollAssignElem(env:POCIEnv; err:POCIError; index:sb4; elem:Pdvoid; elemind:Pdvoid;
+               coll:POCIColl):sword;cdecl;external ocilib name 'OCICollAssignElem';
+{$ELSE}
+    OCICollAssignElem : function (env:POCIEnv; err:POCIError; index:sb4; elem:Pdvoid; elemind:Pdvoid;
+               coll:POCIColl):sword;cdecl;
+{$ENDIF}
+
+    {
+       NAME: OCICollAssignElem - OCIColl ASsign Element
+       PARAMETERS:
+            env (IN/OUT) - OCI environment handle initialized in object mode.
+            err (IN/OUT) - error handle. If there is an error, it is
+                    recorded in 'err' and this function returns OCI_ERROR.
+                    The error recorded in 'err' can be retrieved by calling
+                    OCIErrorGet().
+            index (IN) - index of the element whose is assigned to
+            elem (IN) - element which is assigned from (source element)
+            elemind (IN) [optional] - pointer to the element's null indicator 
+                    information; if (elemind == NULL) then the null indicator
+                    information of the assigned element will be set to non-null.
+            coll (IN/OUT) - collection to be updated
+       DESCRIPTION:
+            Assign the given element value 'elem' to the element at coll[index].
+            If the collection is of type nested table, the element at the given 
+            index may not exist (i.e. may have been deleted). In this case, the 
+            given element is inserted at index 'index'.
+            Otherwise, the element at index 'index' is updated with the value
+            of 'elem'.
+      
+            Note that the given element is deep-copied and 
+            'elem' is strictly an input parameter.
+       RETURNS:
+            OCI_SUCCESS if the function completes successfully.
+            OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
+            OCI_ERROR if
+              any of the input parameters is null
+              out of memory error
+              given index is out of bounds of the given collection
+      }
+    {--------------------------- OCICollAssign --------------------------------- }
+{$IFNDEF LinkDynamically}
+    function OCICollAssign(env:POCIEnv; err:POCIError; rhs:POCIColl; lhs:POCIColl):sword;cdecl;external ocilib name 'OCICollAssign';
+{$ELSE}
+    OCICollAssign : function (env:POCIEnv; err:POCIError; rhs:POCIColl; lhs:POCIColl):sword;cdecl;
+{$ENDIF}
+
+    {
+       NAME: OCICollAssign - OCIColl ASsiGn collection
+       PARAMETERS:
+            env (IN/OUT) - OCI environment handle initialized in object mode.
+            err (IN/OUT) - error handle. If there is an error, it is
+                    recorded in 'err' and this function returns OCI_ERROR.
+                    The error recorded in 'err' can be retrieved by calling
+                    OCIErrorGet().
+            rhs (IN) - collection to be assigned from
+            lhs (OUT) - collection to be assigned to
+       DESCRIPTION:
+            Assign 'rhs' to 'lhs'. The 'lhs' collection may be decreased or 
+            increased depending upon the size of 'rhs'. If the 'lhs' contains 
+            any elements then the elements will be deleted prior to the 
+            assignment. This function performs a deep-copy. The memory for the 
+            elements comes from the object cache.
+     
+            An error is returned if the element types of the lhs and rhs 
+            collections do not match. Also, an error is returned if the 
+            upper-bound of the lhs collection is less than the current number of 
+            elements in the rhs collection.
+       RETURNS:
+            OCI_SUCCESS if the function completes successfully.
+            OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
+            OCI_ERROR if
+              any of the input parameters is null
+              out of memory error
+              type mis-match of lhs and rhs collections
+              upper-bound of lhs collection is less than the current number of 
+              elements in the rhs collection
+      }
+    {--------------------------- OCICollAppend --------------------------------- }
+{$IFNDEF LinkDynamically}
+    function OCICollAppend(env:POCIEnv; err:POCIError; elem:Pdvoid; elemind:Pdvoid; coll:POCIColl):sword;cdecl;external ocilib name 'OCICollAppend';
+{$ELSE}
+    OCICollAppend : function (env:POCIEnv; err:POCIError; elem:Pdvoid; elemind:Pdvoid; coll:POCIColl):sword;cdecl;
+{$ENDIF}
+
+    {
+       NAME: OCICollAppend - OCIColl APPend collection
+       PARAMETERS:
+            env (IN/OUT) - OCI environment handle initialized in object mode.
+            err (IN/OUT) - error handle. If there is an error, it is
+                    recorded in 'err' and this function returns OCI_ERROR.
+                    The error recorded in 'err' can be retrieved by calling
+                    OCIErrorGet().
+            elem (IN) - pointer to the element which is appended to the end
+                    of the given collection
+            elemind (IN) [optional] - pointer to the element's null indicator 
+                    information; if (elemind == NULL) then the null indicator
+                    information of the appended element will be set to non-null.
+            coll (IN/OUT) - updated collection
+       DESCRIPTION:
+            Append the given element to the end of the given collection. 
+            Appending an element is equivalent to:
+              - increasing the size of the collection by 1 element
+              - updating (deep-copying) the last element's data with the given 
+                element's data
+      
+            Note that the pointer to the given element 'elem' will not be saved 
+            by this function. So 'elem' is strictly an input parameter.
+            An error is returned if the current size of the collection
+            is equal to the max size (upper-bound) of the collection prior to 
+            appending the element.
+       RETURNS:
+            OCI_SUCCESS if the function completes successfully.
+            OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
+            OCI_ERROR if
+              any of the input parameters is null
+              out of memory error
+              current size of collection == max size of the collection
+      }
+    {----------------------------- OCICollTrim --------------------------------- }
+{$IFNDEF LinkDynamically}
+    function OCICollTrim(env:POCIEnv; err:POCIError; trim_num:sb4; coll:POCIColl):sword;cdecl;external ocilib name 'OCICollTrim';
+{$ELSE}
+    OCICollTrim : function (env:POCIEnv; err:POCIError; trim_num:sb4; coll:POCIColl):sword;cdecl;
+{$ENDIF}
+
+    {
+       NAME: OCICollTrim - OCIColl Trim elements from the end of the collection
+       PARAMETERS:
+            env (IN/OUT) - OCI environment handle initialized in object mode.
+            err (IN/OUT) - error handle. If there is an error, it is
+                    recorded in 'err' and this function returns OCI_ERROR.
+                    The error recorded in 'err' can be retrieved by calling
+                    OCIErrorGet().
+            trim_num (IN) - number of elements to trim
+            coll (IN/OUT) - 'trim_num' of elements are removed (freed) from the
+                    end of the collection
+       DESCRIPTION:
+            Trim the collection by the given number of elements. The elements are 
+            removed from the end of the collection.
+      
+            An error is returned if the 'trim_num' is greater than the current 
+            size of the collection.
+       RETURNS:
+            OCI_SUCCESS if the function completes successfully.
+            OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
+            OCI_ERROR if
+              any of the input parameters is null
+              'trim_num' is greater than the current size of the collection.
+      }
+    {--------------------------- OCICollIsLocator ------------------------------ }
+{$IFNDEF LinkDynamically}
+    function OCICollIsLocator(env:POCIEnv; err:POCIError; coll:POCIColl; result:Pboolean):sword;cdecl;external ocilib name 'OCICollIsLocator';
+{$ELSE}
+    OCICollIsLocator : function (env:POCIEnv; err:POCIError; coll:POCIColl; result:Pboolean):sword;cdecl;
+{$ENDIF}
+
+    {
+    Name: OCICollIsLocator - OCIColl indicates whether a collection is locator
+                             based or not.
+    Parameters:
+            env(IN) - pointer to OCI environment handle
+            err (IN/OUT) - error handle. If there is an error, it is
+                    recorded in 'err' and this function returns OCI_ERROR.
+                    The error recorded in 'err' can be retrieved by calling
+                    OCIErrorGet().
+            coll (IN) - collection item.
+            result (OUT) - TRUE if the collection item is a locator, FALSE
+                           otherwise
+    Description:
+            Returns TRUE in the result OUT parameter if the collection item is a
+            locator, otherwise returns FALSE.
+    Returns:
+            OCI_SUCCESS if the function completes successfully.
+            OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
+     }
+    {---------------------------- OCIIterCreate -------------------------------- }
+{$IFNDEF LinkDynamically}
+    function OCIIterCreate(env:POCIEnv; err:POCIError; coll:POCIColl; var itr:POCIIter):sword;cdecl;external ocilib name 'OCIIterCreate';
+{$ELSE}
+    OCIIterCreate : function (env:POCIEnv; err:POCIError; coll:POCIColl; var itr:POCIIter):sword;cdecl;
+{$ENDIF}
+
+    {
+       NAME: OCIIterCreate - OCIColl Create an ITerator to scan the collection
+                          elements
+       PARAMETERS:
+            env (IN/OUT) - OCI environment handle initialized in object mode.
+            err (IN/OUT) - error handle. If there is an error, it is
+                    recorded in 'err' and this function returns OCI_ERROR.
+                    The error recorded in 'err' can be retrieved by calling
+                    OCIErrorGet().
+            coll (IN) - collection which will be scanned; the different 
+                    collection types are varray and nested table
+            itr (OUT) - address to the allocated collection iterator is
+                    returned by this function
+       DESCRIPTION:
+            Create an iterator to scan the elements of the collection. The
+            iterator is created in the object cache. The iterator is initialized
+            to point to the beginning of the collection.
+      
+            If the next function (OCIIterNext) is called immediately 
+            after creating the iterator then the first element of the collection 
+            is returned. 
+            If the previous function (OCIIterPrev) is called immediately after 
+            creating the iterator then "at beginning of collection" error is 
+            returned.
+       RETURNS:
+            OCI_SUCCESS if the function completes successfully.
+            OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
+            OCI_ERROR if
+              any of the input parameters is null
+              out of memory error
+      }
+    {----------------------------- OCIIterDelete ------------------------------ }
+{$IFNDEF LinkDynamically}
+    function OCIIterDelete(env:POCIEnv; err:POCIError; var itr:POCIIter):sword;cdecl;external ocilib name 'OCIIterDelete';
+{$ELSE}
+    OCIIterDelete : function (env:POCIEnv; err:POCIError; var itr:POCIIter):sword;cdecl;
+{$ENDIF}
+
+    {
+       NAME: OCIIterDelete - OCIColl Delete ITerator
+       PARAMETERS:
+            env (IN/OUT) - OCI environment handle initialized in object mode.
+            err (IN/OUT) - error handle. If there is an error, it is
+                    recorded in 'err' and this function returns OCI_ERROR.
+                    The error recorded in 'err' can be retrieved by calling
+                    OCIErrorGet().
+            itr (IN/OUT) - the allocated collection iterator is destroyed and
+                    the 'itr' is set to NULL prior to returning
+       DESCRIPTION:
+            Delete the iterator which was previously created by a call to 
+            OCIIterCreate.
+       RETURNS:
+            OCI_SUCCESS if the function completes successfully.
+            OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
+            OCI_ERROR if
+              any of the input parameters is null
+              to be discovered
+      }
+    {----------------------------- OCIIterInit --------------------------------- }
+{$IFNDEF LinkDynamically}
+    function OCIIterInit(env:POCIEnv; err:POCIError; coll:POCIColl; itr:POCIIter):sword;cdecl;external ocilib name 'OCIIterInit';
+{$ELSE}
+    OCIIterInit : function (env:POCIEnv; err:POCIError; coll:POCIColl; itr:POCIIter):sword;cdecl;
+{$ENDIF}
+
+    {
+       NAME: OCIIterInit - OCIColl Initialize ITerator to scan the given 
+                       collection
+       PARAMETERS:
+            env (IN/OUT) - OCI environment handle initialized in object mode.
+            err (IN/OUT) - error handle. If there is an error, it is
+                    recorded in 'err' and this function returns OCI_ERROR.
+                    The error recorded in 'err' can be retrieved by calling
+                    OCIErrorGet().
+            coll (IN) - collection which will be scanned; the different 
+                    collection types are varray and nested table
+            itr (IN/OUT) - pointer to an allocated  collection iterator
+       DESCRIPTION:
+            Initializes the given iterator to point to the beginning of the 
+            given collection. This function can be used to:
+      
+            a. reset an iterator to point back to the beginning of the collection 
+            b. reuse an allocated iterator to scan a different collection
+       RETURNS:
+            OCI_SUCCESS if the function completes successfully.
+            OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
+            OCI_ERROR if
+              any of the input parameters is null
+      }
+    {------------------------ OCIIterGetCurrent -------------------------------- }
+{$IFNDEF LinkDynamically}
+    function OCIIterGetCurrent(env:POCIEnv; err:POCIError; itr:POCIIter; elem:PPdvoid; elemind:PPdvoid):sword;cdecl;external ocilib name 'OCIIterGetCurrent';
+{$ELSE}
+    OCIIterGetCurrent : function (env:POCIEnv; err:POCIError; itr:POCIIter; elem:PPdvoid; elemind:PPdvoid):sword;cdecl;
+{$ENDIF}
+
+    {
+       NAME: OCIIterGetCurrent - OCIColl Iterator based, get CURrent collection
+                        element
+       PARAMETERS:
+            env (IN/OUT) - OCI environment handle initialized in object mode.
+            err (IN/OUT) - error handle. If there is an error, it is
+                    recorded in 'err' and this function returns OCI_ERROR.
+                    The error recorded in 'err' can be retrieved by calling
+                    OCIErrorGet().
+            itr (IN) - iterator which points to the current element
+            elem (OUT) - address of the element pointed by the iterator is returned
+            elemind (OUT) [optional] - address of the element's null indicator 
+                    information is returned; if (elemind == NULL) then the null 
+                    indicator information will NOT be returned
+       DESCRIPTION:
+            Returns pointer to the current element and its corresponding null
+            information.
+       RETURNS:
+            OCI_SUCCESS if the function completes successfully.
+            OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
+            OCI_ERROR if
+              any of the input parameters is null
+      }
+    {------------------------------ OCIIterNext -------------------------------- }
+{$IFNDEF LinkDynamically}
+    function OCIIterNext(env:POCIEnv; err:POCIError; itr:POCIIter; elem:PPdvoid; elemind:PPdvoid;
+               eoc:Pboolean):sword;cdecl;external ocilib name 'OCIIterNext';
+{$ELSE}
+    OCIIterNext : function (env:POCIEnv; err:POCIError; itr:POCIIter; elem:PPdvoid; elemind:PPdvoid;
+               eoc:Pboolean):sword;cdecl;
+{$ENDIF}
+
+    {
+       NAME: OCIIterNext - OCIColl Iterator based, get NeXT collection element
+       PARAMETERS:
+            env (IN/OUT) - OCI environment handle initialized in object mode.
+            err (IN/OUT) - error handle. If there is an error, it is
+                    recorded in 'err' and this function returns OCI_ERROR.
+                    The error recorded in 'err' can be retrieved by calling
+                    OCIErrorGet().
+            itr (IN/OUT) - iterator is updated to point to the next element
+            elem (OUT) - after updating the iterator to point to the next element,
+                    address of the element is returned
+            elemind (OUT) [optional] - address of the element's null indicator 
+                    information is returned; if (elemind == NULL) then the null 
+                    indicator information will NOT be returned
+            eoc (OUT) - TRUE if iterator is at End Of Collection (i.e. next
+                    element does not exist) else FALSE
+       DESCRIPTION:
+            Returns pointer to the next element and its corresponding null
+            information. The iterator is updated to point to the next element.
+      
+            If the iterator is pointing to the last element of the collection
+            prior to executing this function, then calling this function will 
+            set eoc flag to TRUE. The iterator will be left unchanged in this
+            situation.
+       RETURNS:
+            OCI_SUCCESS if the function completes successfully.
+            OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
+            OCI_ERROR if
+              any of the input parameters is null
+      }
+    {------------------------------ OCIIterPrev -------------------------------- }
+{$IFNDEF LinkDynamically}
+    function OCIIterPrev(env:POCIEnv; err:POCIError; itr:POCIIter; elem:PPdvoid; elemind:PPdvoid;
+               boc:Pboolean):sword;cdecl;external ocilib name 'OCIIterPrev';
+{$ELSE}
+    OCIIterPrev : function (env:POCIEnv; err:POCIError; itr:POCIIter; elem:PPdvoid; elemind:PPdvoid;
+               boc:Pboolean):sword;cdecl;
+{$ENDIF}
+
+    {
+       NAME: OCIIterPrev - OCIColl Iterator based, get PReVious collection element
+       PARAMETERS:
+            env (IN/OUT) - OCI environment handle initialized in object mode.
+            err (IN/OUT) - error handle. If there is an error, it is
+                    recorded in 'err' and this function returns OCI_ERROR.
+                    The error recorded in 'err' can be retrieved by calling
+                    OCIErrorGet().
+            itr (IN/OUT) - iterator is updated to point to the previous 
+                    element
+            elem (OUT) - after updating the iterator to point to the previous 
+                    element, address of the element is returned
+            elemind (OUT) [optional] - address of the element's null indicator 
+                    information is returned; if (elemind == NULL) then the null 
+                    indicator information will NOT be returned
+            boc (OUT) - TRUE if iterator is at Beginning Of Collection (i.e.
+                    previous element does not exist) else FALSE.
+       DESCRIPTION:
+            Returns pointer to the previous element and its corresponding null
+            information. The iterator is updated to point to the previous element.
+      
+            If the iterator is pointing to the first element of the collection
+            prior to executing this function, then calling this function will 
+            set 'boc' to TRUE. The iterator will be left unchanged in this 
+            situation.
+       RETURNS:
+            OCI_SUCCESS if the function completes successfully.
+            OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
+            OCI_ERROR if
+              any of the input parameters is null
+      }
+    {*************************************************************************** }
+    {           FUNCTIONS WHICH OPERATE ONLY ON NESTED TABLE OCITable*()         }
+    {*************************************************************************** }
+    {---------------------------- OCITableSize --------------------------------- }
+{$IFNDEF LinkDynamically}
+    function OCITableSize(env:POCIEnv; err:POCIError; tbl:POCITable; size:Psb4):sword;cdecl;external ocilib name 'OCITableSize';
+{$ELSE}
+    OCITableSize : function (env:POCIEnv; err:POCIError; tbl:POCITable; size:Psb4):sword;cdecl;
+{$ENDIF}
+
+    {
+       NAME: OCITableSize - OCITable return current SIZe of the given 
+                       nested table (not including deleted elements)
+       PARAMETERS:
+            env(IN) - pointer to OCI environment handle
+            err (IN/OUT) - error handle. If there is an error, it is
+                    recorded in 'err' and this function returns OCI_ERROR.
+                    The error recorded in 'err' can be retrieved by calling
+                    OCIErrorGet().
+            tbl (IN) - nested table whose number of elements is returned
+            size (OUT) - current number of elements in the nested table. The count
+                    does not include deleted elements.
+       DESCRIPTION:
+            Returns the count of elements in the given nested table. 
+    
+            The count returned by OCITableSize() will be decremented upon 
+            deleting elements from the nested table. So, this count DOES NOT 
+            includes any "holes" created by deleting elements. 
+            For example:
+    
+                OCITableSize(...); 
+                // assume 'size' returned is equal to 5
+                OCITableDelete(...); // delete one element
+                OCITableSize(...);
+                // 'size' returned will be equal to 4
+    
+            To get the count plus the count of deleted elements use 
+            OCICollSize(). Continuing the above example,
+    
+                OCICollSize(...)
+                // 'size' returned will still be equal to 5
+       RETURNS:
+            OCI_SUCCESS if the function completes successfully.
+            OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
+            OCI_ERROR if
+              error during loading of nested table into object cache
+              any of the input parameters is null
+      }
+    {---------------------- OCITableExists --------------------------------- }
+{$IFNDEF LinkDynamically}
+    function OCITableExists(env:POCIEnv; err:POCIError; tbl:POCITable; index:sb4; exists:Pboolean):sword;cdecl;external ocilib name 'OCITableExists';
+{$ELSE}
+    OCITableExists : function (env:POCIEnv; err:POCIError; tbl:POCITable; index:sb4; exists:Pboolean):sword;cdecl;
+{$ENDIF}
+
+    {
+       NAME: OCITableExists - OCITable test whether element at the given index
+                        EXIsts
+       PARAMETERS:
+            env (IN/OUT) - OCI environment handle initialized in object mode.
+            err (IN/OUT) - error handle. If there is an error, it is
+                    recorded in 'err' and this function returns OCI_ERROR.
+                    The error recorded in 'err' can be retrieved by calling
+                    OCIErrorGet().
+            tbl (IN) - table in which the given index is checked
+            index (IN) - index of the element which is checked for existence
+            exists (OUT) - set to TRUE if element at given 'index' exists
+                    else set to FALSE
+       DESCRIPTION:
+            Test whether an element exists at the given 'index'.
+       RETURNS:
+            OCI_SUCCESS if the function completes successfully.
+            OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
+            OCI_ERROR if
+              any of the input parameters is null
+      }
+    {--------------------------- OCITableDelete ------------------------------- }
+{$IFNDEF LinkDynamically}
+    function OCITableDelete(env:POCIEnv; err:POCIError; index:sb4; tbl:POCITable):sword;cdecl;external ocilib name 'OCITableDelete';
+{$ELSE}
+    OCITableDelete : function (env:POCIEnv; err:POCIError; index:sb4; tbl:POCITable):sword;cdecl;
+{$ENDIF}
+
+    {
+       NAME: OCITableDelete - OCITable DELete element at the specified index
+       PARAMETERS:
+            env (IN/OUT) - OCI environment handle initialized in object mode.
+            err (IN/OUT) - error handle. If there is an error, it is
+                    recorded in 'err' and this function returns OCI_ERROR.
+                    The error recorded in 'err' can be retrieved by calling
+                    OCIErrorGet().
+            index (IN) - index of the element which must be deleted
+            tbl (IN) - table whose element is deleted
+       DESCRIPTION:
+            Delete the element at the given 'index'. Note that the position
+            ordinals of the remaining elements of the table is not changed by the
+            delete operation. So delete creates "holes" in the table.
+    
+            An error is returned if the element at the specified 'index' has
+            been previously deleted.
+       RETURNS:
+            OCI_SUCCESS if the function completes successfully.
+            OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
+            OCI_ERROR if
+              any of the input parameters is null
+              given index is not valid
+      }
+    {--------------------------- OCITableFirst --------------------------------- }
+{$IFNDEF LinkDynamically}
+    function OCITableFirst(env:POCIEnv; err:POCIError; tbl:POCITable; index:Psb4):sword;cdecl;external ocilib name 'OCITableFirst';
+{$ELSE}
+    OCITableFirst : function (env:POCIEnv; err:POCIError; tbl:POCITable; index:Psb4):sword;cdecl;
+{$ENDIF}
+
+    {
+       NAME: OCITableFirst - OCITable return FirST index of table
+       PARAMETERS:
+            env (IN/OUT) - OCI environment handle initialized in object mode.
+            err (IN/OUT) - error handle. If there is an error, it is
+                    recorded in 'err' and this function returns OCI_ERROR.
+                    The error recorded in 'err' can be retrieved by calling
+                    OCIErrorGet().
+            tbl (IN) - table which is scanned
+            index (OUT) - first index of the element which exists in the given 
+                    table is returned
+       DESCRIPTION:
+            Return the first index of the element which exists in the given 
+            table. 
+       RETURNS:
+            OCI_SUCCESS if the function completes successfully.
+            OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
+            OCI_ERROR if
+              table is empty
+      }
+    {---------------------------- OCITableLast --------------------------------- }
+{$IFNDEF LinkDynamically}
+    function OCITableLast(env:POCIEnv; err:POCIError; tbl:POCITable; index:Psb4):sword;cdecl;external ocilib name 'OCITableLast';
+{$ELSE}
+    OCITableLast : function (env:POCIEnv; err:POCIError; tbl:POCITable; index:Psb4):sword;cdecl;
+{$ENDIF}
+
+    {
+       NAME: OCITableFirst - OCITable return LaST index of table
+       PARAMETERS:
+            env (IN/OUT) - OCI environment handle initialized in object mode.
+            err (IN/OUT) - error handle. If there is an error, it is
+                    recorded in 'err' and this function returns OCI_ERROR.
+                    The error recorded in 'err' can be retrieved by calling
+                    OCIErrorGet().
+            tbl (IN) - table which is scanned
+            index (OUT) - last index of the element which exists in the given 
+                    table is returned
+       DESCRIPTION:
+            Return the last index of the element which exists in the given 
+            table. 
+       RETURNS:
+            OCI_SUCCESS if the function completes successfully.
+            OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
+            OCI_ERROR if
+              table is empty
+      }
+    {---------------------------- OCITableNext --------------------------------- }
+{$IFNDEF LinkDynamically}
+    function OCITableNext(env:POCIEnv; err:POCIError; index:sb4; tbl:POCITable; next_index:Psb4;
+               exists:Pboolean):sword;cdecl;external ocilib name 'OCITableNext';
+{$ELSE}
+    OCITableNext : function (env:POCIEnv; err:POCIError; index:sb4; tbl:POCITable; next_index:Psb4;
+               exists:Pboolean):sword;cdecl;
+{$ENDIF}
+
+    {
+       NAME: OCITableNext - OCITable return NeXT available index of table
+       PARAMETERS:
+            env (IN/OUT) - OCI environment handle initialized in object mode.
+            err (IN/OUT) - error handle. If there is an error, it is
+                    recorded in 'err' and this function returns OCI_ERROR.
+                    The error recorded in 'err' can be retrieved by calling
+                    OCIErrorGet().
+            index (IN) - starting at 'index' the index of the next element
+                    which exists is returned
+            tbl (IN) - table which is scanned
+            next_index (OUT) - index of the next element which exists 
+                    is returned
+            exists (OUT) - FALSE if no next index available else TRUE
+       DESCRIPTION:
+            Return the smallest position j, greater than 'index', such that 
+            exists(j) is TRUE.
+       RETURNS:
+            OCI_SUCCESS if the function completes successfully.
+            OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
+            OCI_ERROR if
+              no next index available
+      }
+    {---------------------------- OCITablePrev --------------------------------- }
+{$IFNDEF LinkDynamically}
+    function OCITablePrev(env:POCIEnv; err:POCIError; index:sb4; tbl:POCITable; prev_index:Psb4;
+               exists:Pboolean):sword;cdecl;external ocilib name 'OCITablePrev';
+{$ELSE}
+    OCITablePrev : function (env:POCIEnv; err:POCIError; index:sb4; tbl:POCITable; prev_index:Psb4;
+               exists:Pboolean):sword;cdecl;
+{$ENDIF}
+
+    {
+       NAME: OCITablePrev - OCITable return PReVious available index of table
+       PARAMETERS:
+            env (IN/OUT) - OCI environment handle initialized in object mode.
+            err (IN/OUT) - error handle. If there is an error, it is
+                    recorded in 'err' and this function returns OCI_ERROR.
+                    The error recorded in 'err' can be retrieved by calling
+                    OCIErrorGet().
+            index (IN) - starting at 'index' the index of the previous element
+                    which exists is returned
+            tbl (IN) - table which is scanned
+            prev_index (OUT) - index of the previous element which exists 
+                    is returned
+            exists (OUT) - FALSE if no next index available else TRUE
+       DESCRIPTION:
+            Return the largest position j, less than 'index', such that 
+            exists(j) is TRUE.
+       RETURNS:
+            OCI_SUCCESS if the function completes successfully.
+            OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
+            OCI_ERROR if
+              no previous index available
+      }
+    {------------------------ OCINumberToLnx ----------------------------------- }
+    { void OCINumberToLnx(/o_ OCINumber *num _o/);  }
+    { was #define dname(params) para_def_expr }
+    { argument types are unknown }
+//    function OCINumberToLnx(num : longint) : Plnxnum_t;
+
+    { 
+       NAME:   OCINumberToLnx
+       PARAMETERS:
+               num (IN) - OCINumber to convert ;
+       DESCRIPTION: 
+               Converts OCINumber to its internal lnx format 
+               This is not to be used in Public interfaces , but
+               has been provided due to special requirements from 
+               SQLPLUS development group as they require to call 
+               Core funtions directly . 
+     }
+    type
+    { OCI representation of XMLType  }
+      POCIXMLType = pointer;
+
+    { OCI representation of OCIDomDocument  }
+      POCIDOMDocument  = pointer;
+
+{implementation
+
+    function OCINumberToLnx(num : longint) : Plnxnum_t;
+      begin
+         OCINumberToLnx:=Plnxnum_t(num);
+      end;
+
+
+end.}

+ 644 - 0
packages/base/oracle/oro_implementation.inc

@@ -0,0 +1,644 @@
+
+//implementation
+
+  { was #define dname def_expr }
+  function OCI_IND_NOTNULL : OCIInd;
+      begin
+         OCI_IND_NOTNULL:=OCIInd(0);
+      end;
+
+  { was #define dname def_expr }
+  function OCI_IND_NULL : OCIInd;
+      begin
+         OCI_IND_NULL:=OCIInd(-(1));
+      end;
+
+  { was #define dname def_expr }
+  function OCI_IND_BADNULL : OCIInd;
+      begin
+         OCI_IND_BADNULL:=OCIInd(-(2));
+      end;
+
+  { was #define dname def_expr }
+  function OCI_IND_NOTNULLABLE : OCIInd;
+      begin
+         OCI_IND_NOTNULLABLE:=OCIInd(-(3));
+      end;
+
+  { was #define dname def_expr }
+  function OCI_DURATION_BEGIN : OCIDuration;
+      begin
+         OCI_DURATION_BEGIN:=OCIDuration(10);
+      end;
+
+  { was #define dname def_expr }
+  function OCI_DURATION_NULL : OCIDuration;
+      begin
+         OCI_DURATION_NULL:=OCIDuration(OCI_DURATION_BEGIN-1);
+      end;
+
+  { was #define dname def_expr }
+  function OCI_DURATION_DEFAULT : OCIDuration;
+      begin
+         OCI_DURATION_DEFAULT:=OCIDuration(OCI_DURATION_BEGIN-2);
+      end;
+
+  { was #define dname def_expr }
+  function OCI_DURATION_USER_CALLBACK : OCIDuration;
+      begin
+         OCI_DURATION_USER_CALLBACK:=OCIDuration(OCI_DURATION_BEGIN-3);
+      end;
+
+  { was #define dname def_expr }
+  function OCI_DURATION_NEXT : OCIDuration;
+      begin
+         OCI_DURATION_NEXT:=OCIDuration(OCI_DURATION_BEGIN-4);
+      end;
+
+  { was #define dname def_expr }
+  function OCI_DURATION_SESSION : OCIDuration;
+      begin
+         OCI_DURATION_SESSION:=OCIDuration(OCI_DURATION_BEGIN);
+      end;
+
+  { was #define dname def_expr }
+  function OCI_DURATION_TRANS : OCIDuration;
+      begin
+         OCI_DURATION_TRANS:=OCIDuration(OCI_DURATION_BEGIN+1);
+      end;
+
+  { was #define dname def_expr }
+  function OCI_DURATION_CALL : OCIDuration;
+      begin
+         OCI_DURATION_CALL:=OCIDuration(OCI_DURATION_BEGIN+2);
+      end;
+
+  { was #define dname def_expr }
+  function OCI_DURATION_STATEMENT : OCIDuration;
+      begin
+         OCI_DURATION_STATEMENT:=OCIDuration(OCI_DURATION_BEGIN+3);
+      end;
+
+  { was #define dname def_expr }
+  function OCI_DURATION_CALLOUT : OCIDuration;
+      begin
+         OCI_DURATION_CALLOUT:=OCIDuration(OCI_DURATION_BEGIN+4);
+      end;
+
+  { was #define dname def_expr }
+  function OCI_DURATION_PROCESS : OCIDuration;
+      begin
+         OCI_DURATION_PROCESS:=OCIDuration(OCI_DURATION_BEGIN-5);
+      end;
+
+  { was #define dname def_expr }
+  function OCI_OBJECTCOPY_NOREF : ub1;
+      begin
+         OCI_OBJECTCOPY_NOREF:=ub1($01);
+      end;
+
+  { was #define dname def_expr }
+  function OCI_OBJECTFREE_FORCE : ub2;
+      begin
+         OCI_OBJECTFREE_FORCE:=ub2($0001);
+      end;
+
+  { was #define dname def_expr }
+  function OCI_OBJECTFREE_NONULL : ub2;
+      begin
+         OCI_OBJECTFREE_NONULL:=ub2($0002);
+      end;
+
+  { was #define dname def_expr }
+  function OCI_OBJECTFREE_HEADER : ub2;
+      begin
+         OCI_OBJECTFREE_HEADER:=ub2($0004);
+      end;
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_OBJECT_IS_UPDATED(flag : longint) : longint;
+    begin
+//       OCI_OBJECT_IS_UPDATED:=bit(flag,OCI_OBJECT_UPDATED);
+    end;
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_OBJECT_IS_DELETED(flag : longint) : longint;
+    begin
+//       OCI_OBJECT_IS_DELETED:=bit(flag,OCI_OBJECT_DELETED);
+    end;
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_OBJECT_IS_NEW(flag : longint) : longint;
+    begin
+//       OCI_OBJECT_IS_NEW:=bit(flag,OCI_OBJECT_NEW);
+    end;
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_OBJECT_IS_DIRTY(flag : longint) : longint;
+    begin
+//       OCI_OBJECT_IS_DIRTY:=bit(flag,(OCI_OBJECT_UPDATED or OCI_OBJECT_NEW) or OCI_OBJECT_DELETED);
+    end;
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_METHOD_IS_INLINE(flag : longint) : longint;
+    begin
+//       OCI_METHOD_IS_INLINE:=bit(flag,OCI_TYPEMETHOD_INLINE);
+    end;
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_METHOD_IS_CONSTANT(flag : longint) : longint;
+    begin
+//       OCI_METHOD_IS_CONSTANT:=bit(flag,OCI_TYPEMETHOD_CONSTANT);
+    end;
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_METHOD_IS_VIRTUAL(flag : longint) : longint;
+    begin
+//       OCI_METHOD_IS_VIRTUAL:=bit(flag,OCI_TYPEMETHOD_VIRTUAL);
+    end;
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_METHOD_IS_CONSTRUCTOR(flag : longint) : longint;
+    begin
+//       OCI_METHOD_IS_CONSTRUCTOR:=bit(flag,OCI_TYPEMETHOD_CONSTRUCTOR);
+    end;
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_METHOD_IS_DESTRUCTOR(flag : longint) : longint;
+    begin
+//       OCI_METHOD_IS_DESTRUCTOR:=bit(flag,OCI_TYPEMETHOD_DESTRUCTOR);
+    end;
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_METHOD_IS_OPERATOR(flag : longint) : longint;
+    begin
+//       OCI_METHOD_IS_OPERATOR:=bit(flag,OCI_TYPEMETHOD_OPERATOR);
+    end;
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_METHOD_IS_SELFISH(flag : longint) : longint;
+    begin
+//       OCI_METHOD_IS_SELFISH:=bit(flag,OCI_TYPEMETHOD_SELFISH);
+    end;
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_METHOD_IS_MAP(flag : longint) : longint;
+    begin
+//       OCI_METHOD_IS_MAP:=bit(flag,OCI_TYPEMETHOD_MAP);
+    end;
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_METHOD_IS_ORDER(flag : longint) : longint;
+    begin
+//       OCI_METHOD_IS_ORDER:=bit(flag,OCI_TYPEMETHOD_ORDER);
+    end;
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_METHOD_IS_RNDS(flag : longint) : longint;
+    begin
+//       OCI_METHOD_IS_RNDS:=bit(flag,OCI_TYPEMETHOD_RNDS);
+    end;
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_METHOD_IS_WNDS(flag : longint) : longint;
+    begin
+//       OCI_METHOD_IS_WNDS:=bit(flag,OCI_TYPEMETHOD_WNDS);
+    end;
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_METHOD_IS_RNPS(flag : longint) : longint;
+    begin
+//       OCI_METHOD_IS_RNPS:=bit(flag,OCI_TYPEMETHOD_RNPS);
+    end;
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_METHOD_IS_WNPS(flag : longint) : longint;
+    begin
+//       OCI_METHOD_IS_WNPS:=bit(flag,OCI_TYPEMETHOD_WNPS);
+    end;
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_METHOD_IS_ABSTRACT(flag : longint) : longint;
+    begin
+//       OCI_METHOD_IS_ABSTRACT:=bit(flag,OCI_TYPEMETHOD_ABSTRACT);
+    end;
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_METHOD_IS_OVERRIDING(flag : longint) : longint;
+    begin
+//       OCI_METHOD_IS_OVERRIDING:=bit(flag,OCI_TYPEMETHOD_OVERRIDING);
+    end;
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_METHOD_IS_PIPELINED(flag : longint) : longint;
+    begin
+//       OCI_METHOD_IS_PIPELINED:=bit(flag,OCI_TYPEMETHOD_PIPELINED);
+    end;
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_TYPEMETHOD_IS_INLINE(flag : longint) : longint;
+    begin
+//       OCI_TYPEMETHOD_IS_INLINE:=bit(flag,OCI_TYPEMETHOD_INLINE);
+    end;
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_TYPEMETHOD_IS_CONSTANT(flag : longint) : longint;
+    begin
+//       OCI_TYPEMETHOD_IS_CONSTANT:=bit(flag,OCI_TYPEMETHOD_CONSTANT);
+    end;
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_TYPEMETHOD_IS_VIRTUAL(flag : longint) : longint;
+    begin
+//       OCI_TYPEMETHOD_IS_VIRTUAL:=bit(flag,OCI_TYPEMETHOD_VIRTUAL);
+    end;
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_TYPEMETHOD_IS_CONSTRUCTOR(flag : longint) : longint;
+    begin
+//       OCI_TYPEMETHOD_IS_CONSTRUCTOR:=bit(flag,OCI_TYPEMETHOD_CONSTRUCTOR);
+    end;
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_TYPEMETHOD_IS_DESTRUCTOR(flag : longint) : longint;
+    begin
+//       OCI_TYPEMETHOD_IS_DESTRUCTOR:=bit(flag,OCI_TYPEMETHOD_DESTRUCTOR);
+    end;
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_TYPEMETHOD_IS_OPERATOR(flag : longint) : longint;
+    begin
+//       OCI_TYPEMETHOD_IS_OPERATOR:=bit(flag,OCI_TYPEMETHOD_OPERATOR);
+    end;
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_TYPEMETHOD_IS_SELFISH(flag : longint) : longint;
+    begin
+//       OCI_TYPEMETHOD_IS_SELFISH:=bit(flag,OCI_TYPEMETHOD_SELFISH);
+    end;
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_TYPEMETHOD_IS_MAP(flag : longint) : longint;
+    begin
+//       OCI_TYPEMETHOD_IS_MAP:=bit(flag,OCI_TYPEMETHOD_MAP);
+    end;
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_TYPEMETHOD_IS_ORDER(flag : longint) : longint;
+    begin
+//       OCI_TYPEMETHOD_IS_ORDER:=bit(flag,OCI_TYPEMETHOD_ORDER);
+    end;
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_TYPEMETHOD_IS_RNDS(flag : longint) : longint;
+    begin
+//       OCI_TYPEMETHOD_IS_RNDS:=bit(flag,OCI_TYPEMETHOD_RNDS);
+    end;
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_TYPEMETHOD_IS_WNDS(flag : longint) : longint;
+    begin
+//       OCI_TYPEMETHOD_IS_WNDS:=bit(flag,OCI_TYPEMETHOD_WNDS);
+    end;
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_TYPEMETHOD_IS_RNPS(flag : longint) : longint;
+    begin
+//       OCI_TYPEMETHOD_IS_RNPS:=bit(flag,OCI_TYPEMETHOD_RNPS);
+    end;
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_TYPEMETHOD_IS_WNPS(flag : longint) : longint;
+    begin
+//       OCI_TYPEMETHOD_IS_WNPS:=bit(flag,OCI_TYPEMETHOD_WNPS);
+    end;
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_TYPEMETHOD_IS_ABSTRACT(flag : longint) : longint;
+    begin
+//       OCI_TYPEMETHOD_IS_ABSTRACT:=bit(flag,OCI_TYPEMETHOD_ABSTRACT);
+    end;
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_TYPEMETHOD_IS_OVERRIDING(flag : longint) : longint;
+    begin
+//       OCI_TYPEMETHOD_IS_OVERRIDING:=bit(flag,OCI_TYPEMETHOD_OVERRIDING);
+    end;
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_TYPEMETHOD_IS_PIPELINED(flag : longint) : longint;
+    begin
+//       OCI_TYPEMETHOD_IS_PIPELINED:=bit(flag,OCI_TYPEMETHOD_PIPELINED);
+    end;
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_TYPEMETHOD_SET_INLINE(flag : longint) : longint;
+    begin
+//       OCI_TYPEMETHOD_SET_INLINE:=bis(flag,OCI_TYPEMETHOD_INLINE);
+    end;
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_TYPEMETHOD_SET_CONSTANT(flag : longint) : longint;
+    begin
+//       OCI_TYPEMETHOD_SET_CONSTANT:=bis(flag,OCI_TYPEMETHOD_CONSTANT);
+    end;
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_TYPEMETHOD_SET_VIRTUAL(flag : longint) : longint;
+    begin
+//       OCI_TYPEMETHOD_SET_VIRTUAL:=bis(flag,OCI_TYPEMETHOD_VIRTUAL);
+    end;
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_TYPEMETHOD_SET_CONSTRUCTOR(flag : longint) : longint;
+    begin
+//       OCI_TYPEMETHOD_SET_CONSTRUCTOR:=bis(flag,OCI_TYPEMETHOD_CONSTRUCTOR);
+    end;
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_TYPEMETHOD_SET_DESTRUCTOR(flag : longint) : longint;
+    begin
+//       OCI_TYPEMETHOD_SET_DESTRUCTOR:=bis(flag,OCI_TYPEMETHOD_DESTRUCTOR);
+    end;
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_TYPEMETHOD_SET_OPERATOR(flag : longint) : longint;
+    begin
+//       OCI_TYPEMETHOD_SET_OPERATOR:=bis(flag,OCI_TYPEMETHOD_OPERATOR);
+    end;
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_TYPEMETHOD_SET_SELFISH(flag : longint) : longint;
+    begin
+//       OCI_TYPEMETHOD_SET_SELFISH:=bis(flag,OCI_TYPEMETHOD_SELFISH);
+    end;
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_TYPEMETHOD_SET_MAP(flag : longint) : longint;
+    begin
+//       OCI_TYPEMETHOD_SET_MAP:=bis(flag,OCI_TYPEMETHOD_MAP);
+    end;
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_TYPEMETHOD_SET_ORDER(flag : longint) : longint;
+    begin
+//       OCI_TYPEMETHOD_SET_ORDER:=bis(flag,OCI_TYPEMETHOD_ORDER);
+    end;
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_TYPEMETHOD_SET_RNDS(flag : longint) : longint;
+    begin
+//       OCI_TYPEMETHOD_SET_RNDS:=bis(flag,OCI_TYPEMETHOD_RNDS);
+    end;
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_TYPEMETHOD_SET_WNDS(flag : longint) : longint;
+    begin
+//       OCI_TYPEMETHOD_SET_WNDS:=bis(flag,OCI_TYPEMETHOD_WNDS);
+    end;
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_TYPEMETHOD_SET_RNPS(flag : longint) : longint;
+    begin
+//       OCI_TYPEMETHOD_SET_RNPS:=bis(flag,OCI_TYPEMETHOD_RNPS);
+    end;
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_TYPEMETHOD_SET_WNPS(flag : longint) : longint;
+    begin
+//       OCI_TYPEMETHOD_SET_WNPS:=bis(flag,OCI_TYPEMETHOD_WNPS);
+    end;
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_TYPEMETHOD_CLEAR_INLINE(flag : longint) : longint;
+    begin
+//       OCI_TYPEMETHOD_CLEAR_INLINE:=bic(flag,OCI_TYPEMETHOD_INLINE);
+    end;
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_TYPEMETHOD_CLEAR_CONSTANT(flag : longint) : longint;
+    begin
+//       OCI_TYPEMETHOD_CLEAR_CONSTANT:=bic(flag,OCI_TYPEMETHOD_CONSTANT);
+    end;
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_TYPEMETHOD_CLEAR_VIRTUAL(flag : longint) : longint;
+    begin
+//       OCI_TYPEMETHOD_CLEAR_VIRTUAL:=bic(flag,OCI_TYPEMETHOD_VIRTUAL);
+    end;
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_TYPEMETHOD_CLEAR_CONSTRUCTOR(flag : longint) : longint;
+    begin
+//       OCI_TYPEMETHOD_CLEAR_CONSTRUCTOR:=bic(flag,OCI_TYPEMETHOD_CONSTRUCTOR);
+    end;
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_TYPEMETHOD_CLEAR_DESTRUCTOR(flag : longint) : longint;
+    begin
+//       OCI_TYPEMETHOD_CLEAR_DESTRUCTOR:=bic(flag,OCI_TYPEMETHOD_DESTRUCTOR);
+    end;
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_TYPEMETHOD_CLEAR_OPERATOR(flag : longint) : longint;
+    begin
+//       OCI_TYPEMETHOD_CLEAR_OPERATOR:=bic(flag,OCI_TYPEMETHOD_OPERATOR);
+    end;
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_TYPEMETHOD_CLEAR_SELFISH(flag : longint) : longint;
+    begin
+//       OCI_TYPEMETHOD_CLEAR_SELFISH:=bic(flag,OCI_TYPEMETHOD_SELFISH);
+    end;
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_TYPEMETHOD_CLEAR_MAP(flag : longint) : longint;
+    begin
+//       OCI_TYPEMETHOD_CLEAR_MAP:=bic(flag,OCI_TYPEMETHOD_MAP);
+    end;
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_TYPEMETHOD_CLEAR_ORDER(flag : longint) : longint;
+    begin
+//       OCI_TYPEMETHOD_CLEAR_ORDER:=bic(flag,OCI_TYPEMETHOD_ORDER);
+    end;
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_TYPEMETHOD_CLEAR_RNDS(flag : longint) : longint;
+    begin
+//       OCI_TYPEMETHOD_CLEAR_RNDS:=bic(flag,OCI_TYPEMETHOD_RNDS);
+    end;
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_TYPEMETHOD_CLEAR_WNDS(flag : longint) : longint;
+    begin
+//       OCI_TYPEMETHOD_CLEAR_WNDS:=bic(flag,OCI_TYPEMETHOD_WNDS);
+    end;
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_TYPEMETHOD_CLEAR_RNPS(flag : longint) : longint;
+    begin
+//       OCI_TYPEMETHOD_CLEAR_RNPS:=bic(flag,OCI_TYPEMETHOD_RNPS);
+    end;
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_TYPEMETHOD_CLEAR_WNPS(flag : longint) : longint;
+    begin
+//       OCI_TYPEMETHOD_CLEAR_WNPS:=bic(flag,OCI_TYPEMETHOD_WNPS);
+    end;
+
+  { was #define dname def_expr }
+  function OCI_NUMBER_DEFAULTPREC : ub1;
+      begin
+         OCI_NUMBER_DEFAULTPREC:=ub1(0);
+      end;
+
+  { was #define dname def_expr }
+  function OCI_NUMBER_DEFAULTSCALE : sb1;
+      begin
+         OCI_NUMBER_DEFAULTSCALE:=sb1(MAXSB1MINVAL);
+      end;
+
+  { was #define dname def_expr }
+  function OCI_COHERENCY_NONE : OCIRefreshOpt;
+      begin
+         OCI_COHERENCY_NONE:=OCIRefreshOpt(2);
+      end;
+
+  { was #define dname def_expr }
+  function OCI_COHERENCY_NULL : OCIRefreshOpt;
+      begin
+         OCI_COHERENCY_NULL:=OCIRefreshOpt(4);
+      end;
+
+  { was #define dname def_expr }
+  function OCI_COHERENCY_ALWAYS : OCIRefreshOpt;
+      begin
+         OCI_COHERENCY_ALWAYS:=OCIRefreshOpt(5);
+      end;
+
+

+ 1201 - 0
packages/base/oracle/oro_interface.inc

@@ -0,0 +1,1201 @@
+
+{
+  Automatically converted by H2Pas 1.0.0 from oro.h
+  The following command line parameters were used:
+    -p
+    -D
+    -l
+    jojo.so
+    oro.h
+}
+
+{$PACKRECORDS C}
+
+  { Copyright (c) 1994, 2003, Oracle Corporation.  All rights reserved.   }
+  {
+    NAME
+      OCI - Oracle Object Interface for External/Internal/Kernel Clients
+  
+    DESCRIPTION
+      This header file contains Oracle object interface definitions which
+      can be included by external user applications, tools, as well as
+      the kernel.  It defines types and constants that are common to all
+      object interface which is being defined in several other header files
+      (e.g., ori.h, ort.h, and orl.h).
+  
+    RELATED DOCUMENTS
+      TBD
+  
+    INSPECTION STATUS [[ deletable if no inspection ]]
+      Inspection date:    [[ date of the last logging meeting ]]
+      Inspection status:  [[ exited, not exited, or N/A if exit is not a goal ]]
+      Estimated increasing cost defects per page:
+      Rule sets:          [[ rule sets inspected against or planned to be 
+                             inspected against ]]
+  
+    ACCEPTANCE REVIEW STATUS [[ deletable if no approval review ]]
+      Review date:    [[ date of the meeting where issues were logged and the 
+                         approval status was decided ]] 
+      Review status:  [[ current status:  accepted, conditionally accepted, 
+                         major revision required, rejected ]]
+      Reviewers:      [[ names of the members on the review team ]]
+  
+    PUBLIC FUNCTIONS
+  
+    EXAMPLES
+      Examples are given in the description of each function or macro where
+      relevant.
+  
+    MODIFIED
+      mnanal     06/09/03 - backout of fix 2836388
+      mnanal     05/14/03 - bug-2836388
+      srseshad   11/27/02 - Change OCI_TYPECODE_BFLOAT/BDOUBLE codes
+      rxgovind   10/09/02 - add OCI_TYPECODE_UROWID
+      mxyang     09/17/02 - grabtrans 'mmorsi_obj_float'
+      srseshad   09/11/02 - 
+      srseshad   09/01/02 - 
+      aahluwal   06/03/02 - bug 2360115
+      celsbern   10/19/01 - merge LOG to MAIN
+      rxgovind   10/16/01 - update typecodes
+      rxgovind   09/19/01 - add typecodes
+      rkasamse   08/15/01 - add OCI_DURATION_USER_CALLBACK
+      jchai      09/24/01 - add type code for PLS_INTEGER
+      porangas   08/22/01 - Fix bug#1776434
+      schatter   04/09/01 - merge 1456235: define OCI_DURATION_INVALID
+      rdani      10/12/00 - 1449943 NOCOPY and PIPELINE
+      ciyer      05/26/00 - short names for abstract, overriding
+      rkasamse   05/25/00 - OCCI enhancements
+      smuralid   05/11/00 - OCITypeMethodFlags - add NOT INSTANTIABLE, OVERRIDING
+      rxgovind   05/09/00 - add OCI_TYPECODE_NONE
+      tnbui      07/28/99 - Remove OCI_TYPECODE_TIMESTAMP_ITZ                    
+      tnbui      07/21/99 - TS LOCAL TZ                                          
+      thoang     06/21/99 - Add OCI_TYPECODE_TIMESTAMP_ITZ
+      thoang     03/04/99 - Add datetime datatypes
+      rkasamse   10/20/98 - add OCI_ATTR_CACHE_ARRAYFLUSH
+      rkasamse   10/29/98 - add OCI_DURATION_CALLOUT
+      rkasamse   04/28/98 - OCI_OBJECT_DETECTCHANGE -> OCI_ATTR_OBJECT_DETECTCHAN
+      rkasamse   04/28/98 - OCI_OBJECT_NEWNOTNULL -> OCI_ATTR_OBJECT_NEWNOTNULL  
+      rkasamse   04/23/98 - add OCI_OBJECT_DETECTCHANGE
+      rkasamse   04/03/98 - add OCI_OBJECT_NEWNOTNULL                            
+      pmitra     04/01/98 - OCI_LOCK_X_NOWAIT added                              
+      rxgovind   02/18/98 - add OCI_TYPECODE_OPAQUE
+      rkasamse   02/13/98 - Add OCI_DURATION_PROCESS
+      cxcheng    07/28/97 - fix compile with SLSHORTNAME
+      skrishna   07/14/97 - add OCIObjectGetProperty
+      cxcheng    04/30/97 - make OCITypeParamMode values consistent with PL/SQL
+      skrishna   04/28/97 - undocument OCIObjectProperty & OCIObjectEvent
+      cxcheng    03/29/97 - remove all remaining short names
+      sthakur    03/20/97 - add casts to constants
+      cxcheng    02/21/97 - temporarily put SLSHORTNAME for PL/SQL
+      cxcheng    02/06/97 - take out short name support except with SLSHORTNAME
+      lchidamb   01/20/97 - update OCIRef comments
+      sgollapu   11/19/96 - Add OCI type codes for BOOL,REC,and TAB
+      cxcheng    11/19/96 - more typecode changes
+      cxcheng    11/13/96 - add #include for ocidfn.h
+      cxcheng    11/13/96 - add OCI_TYPECODE_ADT for compatibility
+      cxcheng    11/12/96 - add SQLT_NCO for named collection
+      cxcheng    11/11/96 - more changes to typecodes
+      cxcheng    11/07/96 - #define OCI_TYPECODE_MLSLABEL to SQLT_LAB
+      cxcheng    11/06/96 - fix #define omission for OROTCNAT
+      cxcheng    10/30/96 - move OCI_TYPECODE_* to ocidfn.h as SQLT_*
+      cxcheng    10/28/96 - more beautification changes
+      jboonleu   10/29/96 - add flags for freeing object
+      dchatter   10/26/96 - delete redef of OCISvcCtx, OCIError, OCIEnv
+      cxcheng    10/15/96 - more changes
+      cxcheng    10/14/96 - more final fixes to constants
+      mluong     10/11/96 -
+      mluong     10/11/96 -  KOCON and KONSP are in lowercase
+      mluong     10/11/96 -  add some define per Calvin
+      cxcheng    10/09/96 -  add #define for OROOCOSFN to OCI_COPY_NOREF
+      jboonleu   10/08/96 -  change OROOCOSFN to OCICopyFlag
+      jboonleu   10/07/96 -  use new OCI names for cache options
+      cxcheng    10/07/96 -  add OROTCS02 for KOTTCBRI and OROTCS03 as spare
+      cxcheng    10/07/96 -  more lint fixes
+      cxcheng    10/02/96 -  move oronsp to ko.h as konsp
+      cxcheng    10/01/96 -  add long names for readability
+      cxcheng    10/01/96 -  remove orotty and orotal
+      rjenkins   09/28/96 -  2k char 4k varchar2
+      jboonleu   09/27/96 -  add macro used only in beta2
+      cxcheng    09/27/96 -  move oroenv to oroenv.h
+      cxcheng    09/24/96 -  remove unnecessary orotyp
+      cxcheng    09/25/96 -  add typecode OROTCS01 as placeholder for lob pointer
+      cxcheng    09/20/96 -  add TDO load option orotgo
+      jboonleu   09/18/96 -  add OROOPOREC
+      jboonleu   09/10/96 -  add OROOPODFL
+      jweisz     08/27/96 -  add SQL internal typecode OROTCS00
+      cxcheng    08/02/96 -  add PLSQL internal typecodes OROTCP..
+      cxcheng    08/01/96 -  add OROTCFAR to fill up space left by OROTCCAR
+      jboonleu   07/16/96 -  new pin option
+      cxcheng    06/18/96 -  add casts to OROTNOPRE and OROTNOSCL
+      cxcheng    05/29/96 -  change OROTCNPT back to OROTCDOM
+      vkrishna   05/27/96 -  add OROTCCAR
+      cxcheng    05/17/96 -  replace OROTCFAR with OROTCCAR
+      cxcheng    05/08/96 -  change orotmf from ub1 to ub2
+      cxcheng    05/07/96 -  fix public defines for method types
+      cxcheng    04/30/96 -  change OROTCDOM to OROTCNPT
+      cxcheng    04/15/96 -  remove obsolete OROTTYICT
+      jboonleu   04/12/96 -  add new pin option
+      sthakur    04/12/96 -  add indicator type and indicator status
+      cxcheng    04/10/96 -  add function parameter codes for ORT/KOT
+      cxcheng    04/03/96 -  replace OROTCFAR as OROTCCAR
+      jwijaya    03/29/96 -  add OROTTCCAR
+      jwijaya    03/27/96 -  better comments for orotc
+      cxcheng    02/23/96 -  add typecodes for SMALLINT and VARCHAR2
+      skrishna   02/22/96 -  add oroind - null indicator type
+      cxcheng    02/21/96 -  change lob character codes to OROTCCLB, OROTCBLB...
+      jboonleu   02/06/96 -  new value for predefined duration
+      cxcheng    01/12/96 -  add OROTCCLO, OROTCBLO, OROTCFIL to orotc
+      cxcheng    12/05/95 -  add OROTCDOM and OROTCAAT to orotc
+      skotsovo   10/30/95 -  reserve space for internal 'oid' type
+      jwijaya    10/20/95 -  support variable-length ref
+      cxcheng    10/03/95 -  add OROTMFOR for ordering function to orotmf
+      cxcheng    10/03/95 -  Adding the ordering function type to orotmf
+      jboonleu   09/28/95 -  set OROODTPRE 
+      jboonleu   09/25/95 -  add oroodt
+      skotsovo   03/10/95 -  update to only include release 1 
+      jboonleu   02/15/95 -  add OROOPOREC, remove orocro, oroolo
+      skotsovo   01/30/95 -  add default max lengths for varrays and vstrings 
+      skotsovo   01/24/95 -  categorize sint32, double, and real as number types 
+                             (with precision and scale) instead of scalar types.
+      skotsovo   12/20/94 -  add release 1 types 
+      skotsovo   12/12/94 -  update according to new ots doc
+      skotsovo   12/01/94 -  add default precision and scale 
+      jwijaya    11/15/94 -  rename ORONSPTAB to ORONSPEXT 
+      jwijaya    10/25/94 -  tint 
+      jwijaya    10/06/94 -  add namespace 
+      jwijaya    10/02/94 -  connection handle -> connection number 
+      skotsovo   09/12/94 -  keep 0 as uninitialized value for ORT consts 
+      skotsovo   08/24/94 -  fix orotec 
+      skotsovo   08/17/94 -  modify type code names 
+      skotsovo   08/12/94 -  fix 141 lint errors 
+      skotsovo   07/25/94 -  modify categorization of complex types (orotc) 
+      skotsovo   07/07/94 -  change typecode enum values & add decimal type
+      skotsovo   07/01/94 -  change order of typecodes 
+      jwijaya    06/15/94 -  review 
+      jboonleu   06/13/94 -  add comments for the object cache options
+      jwijaya    06/13/94 -  adhere to the header file template 
+      skotsovo   06/09/94 -  make ots scalar type names consistent with the ots 
+                             document 
+      jwijaya    06/07/94 -  include oratypes.h instead of s.h 
+      skotsovo   05/24/94 -  change typecodes 
+      jwijaya    05/23/94 -  fix comments of ororef 
+      skotsovo   05/19/94 -  remove type composition 
+      skotsovo   05/09/94 -  modified orotc according to new OTS document
+      jwijaya    05/03/94 -  oroid and ororef
+      jwijaya    01/26/94 -  Creation
+   }
+
+  {--------------------------------------------------------------------------- }
+  {                         SHORT NAMES SUPPORT SECTION                        }
+  {--------------------------------------------------------------------------- }
+{$ifdef SLSHORTNAME}
+  { the following are short names that are only supported on IBM mainframes
+     with the SLSHORTNAME defined.
+     With this all subsequent long names will actually be substituted with
+     the short names here  }
+
+  const
+     OCIDuration = oroodt;     
+     OCIInd = oroind;     
+     OCILockOpt = oroolm;     
+     OCIMarkOpt = oroomo;     
+     OCIObjectEvent = orocev;     
+     OCIObjectProperty = oroopr;     
+     OCIPinOpt = oroopo;     
+     OCIRef = ororef;     
+     OCIRefreshOpt = orooro;     
+     OCITypeCode = orotc;     
+     OCITypeEncap = orotec;     
+     OCITypeGetOpt = orotgo;     
+     OCITypeMethodFlag = orotmf;     
+     OCITypeParamMode = orotpm;     
+     OCIObjectPropId = oroopi;     
+     OCIObjectLifetime = oroolft;     
+     OCIObjectMarkstatus = oroomst;     
+     OCI_LOCK_NONE = OROOLMNUL;     
+     OCI_LOCK_X = OROOLMX;     
+     OCI_LOCK_X_NOWAIT = OROOLMXNW;     
+     OCI_MARK_DEFAULT = OROOMODFL;     
+     OCI_MARK_NONE = OROOMONON;     
+     OCI_MARK_UPDATE = OROOMOUPD;     
+     OCI_OBJECTEVENT_AFTER_FLUSH = OROCEVAFL;     
+     OCI_OBJECTEVENT_AFTER_REFRESH = OROCEVARF;     
+     OCI_OBJECTEVENT_BEFORE_FLUSH = OROCEVBFL;     
+     OCI_OBJECTEVENT_BEFORE_REFRESH = OROCEVBRF;     
+     OCI_OBJECTEVENT_WHEN_LOCK = OROCEVWLK;     
+     OCI_OBJECTEVENT_WHEN_MARK_DELETED = OROCEVWDL;     
+     OCI_OBJECTEVENT_WHEN_MARK_UPDATED = OROCEVWUP;     
+     OCI_OBJECTEVENT_WHEN_UNMARK = OROCEVWUM;     
+     OCI_OBJECTPROP_DIRTIED = OROOPRDRT;     
+     OCI_OBJECTPROP_LOADED = OROOPRLOD;     
+     OCI_OBJECTPROP_LOCKED = OROOPRLCK;     
+     OCI_PIN_ANY = OROOPOANY;     
+     OCI_PIN_DEFAULT = OROOPODFL;     
+     OCI_PIN_LATEST = OROOPOLST;     
+     OCI_PIN_RECENT = OROOPOREC;     
+     OCI_REFRESH_LOADED = OROOROLOD;     
+     OCI_TYPEENCAP_PRIVATE = OROTECPVT;     
+     OCI_TYPEENCAP_PUBLIC = OROTECPUB;     
+     OCI_TYPEGET_ALL = OROTGOALL;     
+     OCI_TYPEGET_HEADER = OROTGOHDR;     
+     OCI_TYPEMETHOD_CONSTANT = OROTMCON;     
+     OCI_TYPEMETHOD_CONSTRUCTOR = OROTMCSTR;     
+     OCI_TYPEMETHOD_DESTRUCTOR = OROTMDSTR;     
+     OCI_TYPEMETHOD_INLINE = OROTMINL;     
+     OCI_TYPEMETHOD_MAP = OROTMMAP;     
+     OCI_TYPEMETHOD_OPERATOR = OROTMOP;     
+     OCI_TYPEMETHOD_ORDER = OROTMOR;     
+     OCI_TYPEMETHOD_RNDS = OROTMRDS;     
+     OCI_TYPEMETHOD_RNPS = OROTMRPS;     
+     OCI_TYPEMETHOD_SELFISH = OROTMSLF;     
+     OCI_TYPEMETHOD_VIRTUAL = OROTMVRT;     
+     OCI_TYPEMETHOD_WNDS = OROTMWDS;     
+     OCI_TYPEMETHOD_WNPS = OROTMWPS;     
+     OCI_TYPEMETHOD_ABSTRACT = OROTMABSTRACT;     
+     OCI_TYPEMETHOD_OVERRIDING = OROTMOVERRIDING;     
+     OCI_TYPEMETHOD_PIPELINED = OROTMPIPELINED;     
+     OCI_TYPEPARAM_BYREF = OROTPMREF;     
+     OCI_TYPEPARAM_IN = OROTPMIN;     
+     OCI_TYPEPARAM_INOUT = OROTPMIO;     
+     OCI_TYPEPARAM_OUT = OROTPMOUT;     
+     OCI_TYPEPARAM_OUTNCPY = OROTPMOUTNCPY;     
+     OCI_TYPEPARAM_INOUTNCPY = OROTPMIONCPY;     
+{$endif}
+  { SLSHORTNAME  }
+  {--------------------------------------------------------------------------- }
+  {                    PUBLIC TYPES, CONSTANTS AND MACROS                      }
+  {--------------------------------------------------------------------------- }
+  {--------------------------------------------------------------------------- }
+  {                  GENERAL OBJECT TYPES, CONSTANTS, MACROS                   }
+  {--------------------------------------------------------------------------- }
+  {------------------------- OBJECT REFERENCE (REF) -------------------------- }
+
+  type
+    POCIRef = pointer;
+  {
+   * OCIRef - OCI object REFerence
+   *
+   * In the Oracle object runtime environment, an object is identified by an 
+   * object reference (ref) which contains the object identifier plus other 
+   * runtime information.  The contents of a ref is opaque to clients.  Use
+   * OCIObjectNew() to construct a ref.
+    }
+  {--------------------------- OBJECT INDICATOR ------------------------------ }
+
+     POCIInd = ^OCIInd;
+     OCIInd = sb2;
+  {
+   * OCIInd -- a variable of this type contains (null) indicator information
+    }
+  { not NULL  }
+  { was #define dname def_expr }
+  function OCI_IND_NOTNULL : OCIInd;    
+
+  { NULL  }
+  { was #define dname def_expr }
+  function OCI_IND_NULL : OCIInd;    
+
+  { BAD NULL  }
+  { was #define dname def_expr }
+  function OCI_IND_BADNULL : OCIInd;    
+
+  { not NULLable  }
+  { was #define dname def_expr }
+  function OCI_IND_NOTNULLABLE : OCIInd;    
+
+  {--------------------------------------------------------------------------- }
+  {                               OBJECT CACHE                                 }
+  {--------------------------------------------------------------------------- }
+  { To enable object change detection mode, set this to TRUE  }
+
+  const
+     OCI_ATTR_OBJECT_DETECTCHANGE = $00000020;     
+  { To enable object creation with  non-NULL attributes by default, set the
+     following to TRUE.
+     By default, object is created with NULL attributes
+   }
+     OCI_ATTR_OBJECT_NEWNOTNULL = $00000010;     
+  { To enable sorting of the objects that belong to the same table
+     before being flushed through OCICacheFlush.
+     Please note that by enabling this object cache will not be flushing
+     the objects in the same order they were dirtied  }
+     OCI_ATTR_CACHE_ARRAYFLUSH = $00000040;     
+  {--------------------------- OBJECT PIN OPTION ----------------------------- }
+  { 0 = uninitialized  }
+  { default pin option  }
+  { pin any copy of the object  }
+  { pin recent copy of the object  }
+  { pin latest copy of the object  }
+
+  type
+     OCIPinOpt = (OCI_PIN_DEFAULT := 1,OCI_PIN_ANY := 3,
+       OCI_PIN_RECENT := 4,OCI_PIN_LATEST := 5
+       );
+
+
+     POCIPinOpt = ^OCIPinOpt;
+  {
+   * OCIPinOpt - OCI object Pin Option 
+   *
+   * In the Oracle object runtime environment, the program has the option to
+   * specify which copy of the object to pin.  
+   *
+   * OCI_PINOPT_DEFAULT pins an object using the default pin option.  The default
+   * pin option can be set as an attribute of the OCI environment handle 
+   * (OCI_ATTR_PINTOPTION).  The value of the default pin option can be
+   * OCI_PINOPT_ANY, OCI_PINOPT_RECENT, or OCI_PIN_LATEST. The default option
+   * is initialized to OCI_PINOPT_ANY.
+   *
+   * OCI_PIN_ANY pins any copy of the object.  The object is pinned 
+   * using the following criteria:
+   *   If the object copy is not loaded, load it from the persistent store.
+   *   Otherwise, the loaded object copy is returned to the program. 
+   * 
+   * OCI_PIN_RECENT pins the latest copy of an object.  The object is 
+   * pinned using the following criteria:
+   *   If the object is not loaded, load the object from the persistent store
+   *       from the latest version.
+   *   If the object is not loaded in the current transaction and it is not 
+   *       dirtied, the object is refreshed from the latest version.
+   *   Otherwise, the loaded object copy is returned to the program. 
+   *
+   * OCI_PINOPT_LATEST pins the latest copy of an object.  The object copy is 
+   * pinned using the following criteria:
+   *   If the object copy is not loaded, load it from the persistent store.
+   *   If the object copy is loaded and dirtied, it is returned to the program.
+   *   Otherwise, the loaded object copy is refreshed from the persistent store.
+    }
+  {--------------------------- OBJECT LOCK OPTION ---------------------------- }
+  { 0 = uninitialized  }
+  { null (same as no lock)  }
+  { exclusive lock  }
+  { exclusive lock, do not wait   }
+     OCILockOpt = (OCI_LOCK_NONE := 1,OCI_LOCK_X := 2,
+       OCI_LOCK_X_NOWAIT := 3);
+
+
+     POCILockOpt = ^OCILockOpt;
+  {
+   * OCILockOpt - OCI object LOCK Option 
+   *
+   * This option is used to specify the locking preferences when an object is
+   * loaded from the server.
+    }
+  {------------------------- OBJECT MODIFYING OPTION ------------------------- }
+  { 0 = uninitialized  }
+  { default (the same as OCI_MARK_NONE)  }
+  { object has not been modified  }
+  { object is to be updated  }
+{     OCIMarkOpt = (OCI_MARK_DEFAULT := 1,OCI_MARK_NONE := OCI_MARK_DEFAULT,
+       OCI_MARK_UPDATE);
+
+
+     POCIMarkOpt = ^OCIMarkOpt;}
+  {
+   * OCIMarkOpt - OCI object Mark option
+   *
+   * When the object is marked updated, the client has to specify how the
+   * object is intended to be changed.  
+    }
+  {-------------------------- OBJECT Duration -------------------------------- }
+
+     POCIDuration = ^OCIDuration;
+     OCIDuration = ub2;
+  { Invalid duration  }
+
+  const
+     OCI_DURATION_INVALID = $FFFF;     
+  { was #define dname def_expr }
+  function OCI_DURATION_BEGIN : OCIDuration;    
+
+  { beginning sequence of duration  }
+  { was #define dname def_expr }
+  function OCI_DURATION_NULL : OCIDuration;    
+
+  { null duration  }
+  { default  }
+  { was #define dname def_expr }
+  function OCI_DURATION_DEFAULT : OCIDuration;    
+
+  { was #define dname def_expr }
+  function OCI_DURATION_USER_CALLBACK : OCIDuration;    
+
+  { was #define dname def_expr }
+  function OCI_DURATION_NEXT : OCIDuration;    
+
+  { next special duration  }
+  { was #define dname def_expr }
+  function OCI_DURATION_SESSION : OCIDuration;    
+
+  { the end of user session  }
+  { was #define dname def_expr }
+  function OCI_DURATION_TRANS : OCIDuration;    
+
+  { the end of user transaction  }
+  {*****************************************************************************
+  **  DO NOT USE OCI_DURATION_CALL. IT  IS UNSUPPORTED                         **
+  **  WILL BE REMOVED/CHANGED IN A FUTURE RELEASE                              **
+  ***************************************************************************** }
+  { was #define dname def_expr }
+  function OCI_DURATION_CALL : OCIDuration;    
+
+  { the end of user client/server call  }
+  { was #define dname def_expr }
+  function OCI_DURATION_STATEMENT : OCIDuration;    
+
+  { This is to be used only during callouts.  It is similar to that 
+  of OCI_DURATION_CALL, but lasts only for the duration of a callout.
+  Its heap is from PGA  }
+  { was #define dname def_expr }
+  function OCI_DURATION_CALLOUT : OCIDuration;    
+
+
+{  const
+     OCI_DURATION_LAST = OCI_DURATION_CALLOUT;     }
+  { last of predefined durations  }
+  { This is not being treated as other predefined durations such as 
+     SESSION, CALL etc, because this would not have an entry in the duration
+     table and its functionality is primitive such that only allocate, free,
+     resize memory are allowed, but one cannot create subduration out of this
+   }  { was #define dname def_expr }
+  function OCI_DURATION_PROCESS : OCIDuration;    
+
+  {
+   * OCIDuration - OCI object duration
+   *
+   * A client can specify the duration of which an object is pinned (pin
+   * duration) and the duration of which the object is in memory (allocation
+   * duration).  If the objects are still pinned at the end of the pin duration,
+   * the object cache manager will automatically unpin the objects for the
+   * client. If the objects still exist at the end of the allocation duration,
+   * the object cache manager will automatically free the objects for the client.
+   *
+   * Objects that are pinned with the option OCI_DURATION_TRANS will get unpinned
+   * automatically at the end of the current transaction.
+   *
+   * Objects that are pinned with the option OCI_DURATION_SESSION will get
+   * unpinned automatically at the end of the current session (connection).
+   *
+   * The option OCI_DURATION_NULL is used when the client does not want to set
+   * the pin duration.  If the object is already loaded into the cache, then the
+   * pin duration will remain the same.  If the object is not yet loaded, the
+   * pin duration of the object will be set to OCI_DURATION_DEFAULT.
+    }
+  {----------------------------- OBJECT PROPERTY ----------------------------- }
+  {*****************************************************************************
+  **  DO NOT USE OCIObjectProperty. IT IS UNSUPPORTED                          **
+  **  WILL BE REMOVED/CHANGED IN A FUTURE RELEASE                              **
+  ***************************************************************************** }
+  { 0 = uninitialized  }
+  { dirty objects  }
+  { objects loaded in the transaction  }
+  { locked objects  }
+
+  type
+     OCIObjectProperty = (OCI_OBJECTPROP_DIRTIED := 1,OCI_OBJECTPROP_LOADED,
+       OCI_OBJECTPROP_LOCKED);
+
+
+     POCIObjectProperty = ^OCIObjectProperty;
+  {
+   * OCIObjectProperty -- OCI Object Property
+   * This specifies the properties of objects in the object cache.
+    }
+  {------------------------- CACHE REFRESH OPTION --------------------------- }
+  { 0 = uninitialized  }
+  { refresh objects loaded in the transaction  }
+     OCIRefreshOpt = (OCI_REFRESH_LOADED := 1);
+
+
+     POCIRefreshOpt = ^OCIRefreshOpt;
+  {
+   * OCIRefreshOpt - OCI cache Refresh Option
+   * This option is used to specify the set of objects to be refreshed. 
+   *
+   * OCI_REFRESH_LOAD refreshes the objects that are loaded in the current  
+   * transaction. 
+    }
+  {-------------------------------- OBJECT EVENT ----------------------------- }
+  {*****************************************************************************
+  **  DO NOT USE OCIObjectEvent. IT IS UNSUPPORTED                             **
+  **  WILL BE REMOVED/CHANGED IN A FUTURE RELEASE                              **
+  ***************************************************************************** }
+  { 0 = uninitialized  }
+  { before flushing the cache  }
+  { after flushing the cache  }
+  { before refreshing the cache  }
+  { after refreshing the cache  }
+  { when an object is marked updated  }
+  { when an object is marked deleted  }
+  { when an object is being unmarked  }
+  { when an object is being locked  }
+     OCIObjectEvent = (OCI_OBJECTEVENT_BEFORE_FLUSH := 1,
+       OCI_OBJECTEVENT_AFTER_FLUSH,OCI_OBJECTEVENT_BEFORE_REFRESH,
+       OCI_OBJECTEVENT_AFTER_REFRESH,OCI_OBJECTEVENT_WHEN_MARK_UPDATED,
+       OCI_OBJECTEVENT_WHEN_MARK_DELETED,OCI_OBJECTEVENT_WHEN_UNMARK,
+       OCI_OBJECTEVENT_WHEN_LOCK);
+
+
+     POCIObjectEvent = ^OCIObjectEvent;
+  {
+   * OCIObjectEvent -- OCI Object Event 
+   * This specifies the kind of event that is supported by the object
+   * cache.  The program can register a callback that is invoked when the  
+   * specified event occurs.
+    }
+  {----------------------------- OBJECT COPY OPTION -------------------------- }
+  { was #define dname def_expr }
+  function OCI_OBJECTCOPY_NOREF : ub1;    
+
+  {
+   * OCIObjectCopyFlag - Object copy flag
+   *
+   * If OCI_OBJECTCOPY_NOREF is specified when copying an instance, the 
+   * reference and lob will not be copied to the target instance.
+    }
+  {----------------------------- OBJECT FREE OPTION -------------------------- }
+  { was #define dname def_expr }
+  function OCI_OBJECTFREE_FORCE : ub2;    
+
+  { was #define dname def_expr }
+  function OCI_OBJECTFREE_NONULL : ub2;    
+
+  { was #define dname def_expr }
+  function OCI_OBJECTFREE_HEADER : ub2;    
+
+  {
+   * OCIObjectFreeFlag - Object free flag
+   *
+   * If OCI_OBJECTCOPY_FORCE is specified when freeing an instance, the instance
+   * is freed regardless it is pinned or diritied.
+   * If OCI_OBJECTCOPY_NONULL is specified when freeing an instance, the null 
+   * structure is not freed.
+    }
+  {----------------------- OBJECT PROPERTY ID ------------------------------- }
+
+  type
+
+     POCIObjectPropId = ^OCIObjectPropId;
+     OCIObjectPropId = ub1;
+  { persistent or transient or value  }
+
+  const
+     OCI_OBJECTPROP_LIFETIME = 1;     
+  { schema name of table containing object  }
+     OCI_OBJECTPROP_SCHEMA = 2;     
+  { table name of table containing object  }
+     OCI_OBJECTPROP_TABLE = 3;     
+  { pin duartion of object  }
+     OCI_OBJECTPROP_PIN_DURATION = 4;     
+  { alloc duartion of object  }
+     OCI_OBJECTPROP_ALLOC_DURATION = 5;     
+  { lock status of object  }
+     OCI_OBJECTPROP_LOCK = 6;     
+  { mark status of object  }
+     OCI_OBJECTPROP_MARKSTATUS = 7;     
+  { is object a view object or not?  }
+     OCI_OBJECTPROP_VIEW = 8;     
+  {
+   * OCIObjectPropId - OCI Object Property Id
+   * Identifies the different properties of objects.
+    }
+  {----------------------- OBJECT LIFETIME ---------------------------------- }
+  { 0 = uninitialized  }
+  { persistent object  }
+  { transient object  }
+  { value object  }
+
+  type
+     OCIObjectLifetime = (OCI_OBJECT_PERSISTENT := 1,OCI_OBJECT_TRANSIENT,
+       OCI_OBJECT_VALUE);
+
+
+     POCIObjectLifetime = ^OCIObjectLifetime;
+  {
+   * OCIObjectLifetime - OCI Object Lifetime
+   * Classifies objects depending upon the lifetime and referenceability 
+   * of the object.
+    }
+  {----------------------- OBJECT MARK STATUS ------------------------------- }
+
+     POCIObjectMarkStatus = ^OCIObjectMarkStatus;
+     OCIObjectMarkStatus = uword;
+  { new object  }
+
+  const
+     OCI_OBJECT_NEW = $0001;     
+  { object marked deleted  }
+     OCI_OBJECT_DELETED = $0002;     
+  { object marked updated  }
+     OCI_OBJECT_UPDATED = $0004;     
+  {
+   * OCIObjectMarkStatus - OCI Object Mark Status
+   * Status of the object - new or updated or deleted
+    }
+  { macros to test the object mark status  }  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_OBJECT_IS_UPDATED(flag : longint) : longint;  
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_OBJECT_IS_DELETED(flag : longint) : longint;  
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_OBJECT_IS_NEW(flag : longint) : longint;  
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_OBJECT_IS_DIRTY(flag : longint) : longint;  
+
+  {--------------------------------------------------------------------------- }
+  {                               TYPE MANAGER                                 }
+  {--------------------------------------------------------------------------- }
+  {------------------------------ TYPE CODE ---------------------------------- }
+  {
+   * Type manager typecodes
+   *
+   * These are typecodes designed to be used with the type manager;
+   * they also include longer, more readable versions of existing SQLT names.
+   * Those types that are directly related to existing SQLT types are #define'd
+   * to their SQLT equivalents.
+   *
+   * The type manager typecodes are designed to be useable for all OCI calls.
+   * They are in the range from 192 to 320 for typecodes, so as not to conflict
+   * with existing OCI SQLT typecodes (see ocidfn.h).
+    }
+  { SQL/OTS OBJECT REFERENCE  }
+
+  const
+     OCI_TYPECODE_REF = SQLT_REF;
+  { SQL DATE  OTS DATE  }
+     OCI_TYPECODE_DATE = SQLT_DAT;
+  { SQL SIGNED INTEGER(8)  OTS SINT8  }
+     OCI_TYPECODE_SIGNED8 = 27;
+  { SQL SIGNED INTEGER(16)  OTS SINT16  }
+     OCI_TYPECODE_SIGNED16 = 28;
+  { SQL SIGNED INTEGER(32)  OTS SINT32  }
+     OCI_TYPECODE_SIGNED32 = 29;
+  { SQL REAL  OTS SQL_REAL  }
+     OCI_TYPECODE_REAL = 21;
+  { SQL DOUBLE PRECISION  OTS SQL_DOUBLE  }
+     OCI_TYPECODE_DOUBLE = 22;
+  { Binary float  }
+     OCI_TYPECODE_BFLOAT = SQLT_IBFLOAT;
+  { Binary double  }
+     OCI_TYPECODE_BDOUBLE = SQLT_IBDOUBLE;
+  { SQL FLOAT(P)  OTS FLOAT(P)  }
+     OCI_TYPECODE_FLOAT = SQLT_FLT;
+  { SQL NUMBER(P S)  OTS NUMBER(P S)  }
+    OCI_TYPECODE_NUMBER = SQLT_NUM;
+    OCI_TYPECODE_DECIMAL = SQLT_PDN;
+  { SQL DECIMAL(P S)  OTS DECIMAL(P S)  }
+     OCI_TYPECODE_UNSIGNED8 = SQLT_BIN;
+  { SQL UNSIGNED INTEGER(8)  OTS UINT8  }
+  { SQL UNSIGNED INTEGER(16)  OTS UINT16  }
+     OCI_TYPECODE_UNSIGNED16 = 25;
+  { SQL UNSIGNED INTEGER(32)  OTS UINT32  }
+     OCI_TYPECODE_UNSIGNED32 = 26;
+  { SQL ???  OTS OCTET  }
+//     OCI_TYPECODE_OCTET = 245;
+  { SQL SMALLINT  OTS SMALLINT  }
+     OCI_TYPECODE_SMALLINT = 246;     
+  { SQL INTEGER  OTS INTEGER  }
+     OCI_TYPECODE_INTEGER = SQLT_INT;
+  { SQL RAW(N)  OTS RAW(N)  }
+     OCI_TYPECODE_RAW = SQLT_LVB;
+  { SQL POINTER  OTS POINTER  }
+     OCI_TYPECODE_PTR = 32;
+     OCI_TYPECODE_VARCHAR2 = SQLT_VCS;
+  { SQL VARCHAR2(N)  OTS SQL_VARCHAR2(N)  }
+  { SQL CHAR(N)  OTS SQL_CHAR(N)  }
+     OCI_TYPECODE_CHAR = SQLT_AFC;
+     OCI_TYPECODE_VARCHAR = SQLT_CHR;
+  { SQL VARCHAR(N)  OTS SQL_VARCHAR(N)  }
+  { OTS MLSLABEL  }
+//     OCI_TYPECODE_MLSLABEL = SQLT_LAB;
+  { SQL VARRAY  OTS PAGED VARRAY  }
+//     OCI_TYPECODE_VARRAY = 247;
+  { SQL TABLE  OTS MULTISET  }
+//     OCI_TYPECODE_TABLE = 248;
+  { SQL/OTS NAMED OBJECT TYPE  }
+//     OCI_TYPECODE_OBJECT = SQLT_NTY;
+  {  SQL/OTS Opaque Types  }
+//     OCI_TYPECODE_OPAQUE = 58;
+//     OCI_TYPECODE_NAMEDCOLLECTION = SQLT_NCO;
+  { SQL/OTS NAMED COLLECTION TYPE  }
+  { SQL/OTS BINARY LARGE OBJECT  }
+//     OCI_TYPECODE_BLOB = SQLT_BLOB;
+  { SQL/OTS BINARY FILE OBJECT  }
+//     OCI_TYPECODE_BFILE = SQLT_BFILE;
+  { SQL/OTS CHARACTER LARGE OBJECT  }
+//     OCI_TYPECODE_CLOB = SQLT_CLOB;
+  { SQL/OTS CHARACTER FILE OBJECT  }
+//     OCI_TYPECODE_CFILE = SQLT_CFILE;
+  { the following are ANSI datetime datatypes added in 8.1  }
+  { SQL/OTS TIME  }
+//     OCI_TYPECODE_TIME = SQLT_TIME;
+  { SQL/OTS TIME_TZ  }
+//     OCI_TYPECODE_TIME_TZ = SQLT_TIME_TZ;
+  { SQL/OTS TIMESTAMP  }
+//     OCI_TYPECODE_TIMESTAMP = SQLT_TIMESTAMP;
+  { SQL/OTS TIMESTAMP_TZ  }
+//     OCI_TYPECODE_TIMESTAMP_TZ = SQLT_TIMESTAMP_TZ;
+  { TIMESTAMP_LTZ  }
+//     OCI_TYPECODE_TIMESTAMP_LTZ = SQLT_TIMESTAMP_LTZ;
+  { SQL/OTS INTRVL YR-MON  }
+//     OCI_TYPECODE_INTERVAL_YM = SQLT_INTERVAL_YM;
+  { SQL/OTS INTRVL DAY-SEC  }
+//     OCI_TYPECODE_INTERVAL_DS = SQLT_INTERVAL_DS;
+  { Urowid type  }
+//     OCI_TYPECODE_UROWID = SQLT_RDD;
+  { first Open Type Manager typecode  }
+//     OCI_TYPECODE_OTMFIRST = 228;
+  { last OTM typecode  }
+//     OCI_TYPECODE_OTMLAST = 320;
+  { first OTM system type (internal)  }
+//     OCI_TYPECODE_SYSFIRST = 228;
+  { last OTM system type (internal)  }
+//     OCI_TYPECODE_SYSLAST = 235;
+  { type code for PLS_INTEGER  }
+//     OCI_TYPECODE_PLS_INTEGER = 266;
+  { the following are PL/SQL-only internal. They should not be used  }
+  { PLSQL indexed table  }
+//     OCI_TYPECODE_ITABLE = SQLT_TAB;
+  { PLSQL record  }
+//     OCI_TYPECODE_RECORD = SQLT_REC;
+  { PLSQL boolean  }
+//     OCI_TYPECODE_BOOLEAN = SQLT_BOL;
+  { NOTE : The following NCHAR related codes are just short forms for saying
+     OCI_TYPECODE_VARCHAR2 with a charset form of SQLCS_NCHAR. These codes are
+     intended for use in the OCIAnyData API only and nowhere else.  }
+     OCI_TYPECODE_NCHAR = 286;     
+     OCI_TYPECODE_NVARCHAR2 = 287;     
+     OCI_TYPECODE_NCLOB = 288;     
+  { To indicate absence of typecode being specified  }
+     OCI_TYPECODE_NONE = 0;     
+  { To indicate error has to be taken from error handle - reserved for
+     sqlplus use  }
+     OCI_TYPECODE_ERRHP = 283;
+  { The OCITypeCode type is interchangeable with the existing SQLT type
+     which is a ub2  }
+
+  type
+
+     POCITypeCode = ^OCITypeCode;
+     OCITypeCode = ub2;
+  {----------------------- GET OPTIONS FOR TDO  ------------------------------ }
+  { load only the header portion of the TDO when getting type  }
+  { load all attribute and method descriptors as well  }
+     OCITypeGetOpt = (OCI_TYPEGET_HEADER,OCI_TYPEGET_ALL);
+
+
+     POCITypeGetOpt = ^OCITypeGetOpt;
+  {
+   * OCITypeGetOpt
+   *
+   * This is the flag passed to OCIGetTypeArray() to indicate how the TDO is
+   * going to be loaded into the object cache.
+   * OCI_TYPEGET_HEADER implies that only the header portion is to be loaded
+   * initially, with the rest loaded in on a 'lazy' basis. Only the header is
+   * needed for PL/SQL and OCI operations. OCI_TYPEGET_ALL implies that ALL
+   * the attributes and methods belonging to a TDO will be loaded into the
+   * object cache in one round trip. Hence it will take much longer to execute,
+   * but will ensure that no more loading needs to be done when pinning ADOs
+   * etc. This is only needed if your code needs to examine and manipulate
+   * attribute and method information.
+   *
+   * The default is OCI_TYPEGET_HEADER.
+    }
+  {------------------------ TYPE ENCAPSULTATION LEVEL ------------------------ }
+  { 0 = uninitialized  }
+  { private: only internally visible  }
+  { public: visible to both internally and externally  }
+     OCITypeEncap = (OCI_TYPEENCAP_PRIVATE,OCI_TYPEENCAP_PUBLIC
+       );
+
+
+     POCITypeEncap = ^OCITypeEncap;
+  {
+   * OCITypeEncap - OCI Encapsulation Level
+    }
+  {---------------------------- TYPE METHOD FLAGS ---------------------------- }
+  { inline  }
+  { constant  }
+  { virtual  }
+  { constructor  }
+  { destructor  }
+  { operator  }
+  { selfish method (generic otherwise)  }
+  { map (relative ordering)  }
+  { order (relative ordering)  }
+  { OCI_TYPEMETHOD_MAP and OCI_TYPEMETHOD_ORDER are mutually exclusive  }
+  { Read no Data State (default)  }
+  { Write no Data State  }
+  { Read no Process State  }
+  { Write no Process State  }
+  { abstract (not instantiable) method  }
+  { overriding method  }
+  { method is pipelined  }
+     OCITypeMethodFlag = (OCI_TYPEMETHOD_INLINE := $0001,OCI_TYPEMETHOD_CONSTANT := $0002,
+       OCI_TYPEMETHOD_VIRTUAL := $0004,OCI_TYPEMETHOD_CONSTRUCTOR := $0008,
+       OCI_TYPEMETHOD_DESTRUCTOR := $0010,OCI_TYPEMETHOD_OPERATOR := $0020,
+       OCI_TYPEMETHOD_SELFISH := $0040,OCI_TYPEMETHOD_MAP := $0080,
+       OCI_TYPEMETHOD_ORDER := $0100,OCI_TYPEMETHOD_RNDS := $0200,
+       OCI_TYPEMETHOD_WNDS := $0400,OCI_TYPEMETHOD_RNPS := $0800,
+       OCI_TYPEMETHOD_WNPS := $1000,OCI_TYPEMETHOD_ABSTRACT := $2000,
+       OCI_TYPEMETHOD_OVERRIDING := $4000,OCI_TYPEMETHOD_PIPELINED := $8000
+       );
+
+
+     POCITypeMethodFlag = ^OCITypeMethodFlag;
+  { macros to test the type method flags  }
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_METHOD_IS_INLINE(flag : longint) : longint;  
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_METHOD_IS_CONSTANT(flag : longint) : longint;  
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_METHOD_IS_VIRTUAL(flag : longint) : longint;  
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_METHOD_IS_CONSTRUCTOR(flag : longint) : longint;  
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_METHOD_IS_DESTRUCTOR(flag : longint) : longint;  
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_METHOD_IS_OPERATOR(flag : longint) : longint;  
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_METHOD_IS_SELFISH(flag : longint) : longint;  
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_METHOD_IS_MAP(flag : longint) : longint;  
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_METHOD_IS_ORDER(flag : longint) : longint;  
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_METHOD_IS_RNDS(flag : longint) : longint;  
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_METHOD_IS_WNDS(flag : longint) : longint;  
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_METHOD_IS_RNPS(flag : longint) : longint;  
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_METHOD_IS_WNPS(flag : longint) : longint;  
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_METHOD_IS_ABSTRACT(flag : longint) : longint;  
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_METHOD_IS_OVERRIDING(flag : longint) : longint;  
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_METHOD_IS_PIPELINED(flag : longint) : longint;  
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_TYPEMETHOD_IS_INLINE(flag : longint) : longint;  
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_TYPEMETHOD_IS_CONSTANT(flag : longint) : longint;  
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_TYPEMETHOD_IS_VIRTUAL(flag : longint) : longint;  
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_TYPEMETHOD_IS_CONSTRUCTOR(flag : longint) : longint;  
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_TYPEMETHOD_IS_DESTRUCTOR(flag : longint) : longint;  
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_TYPEMETHOD_IS_OPERATOR(flag : longint) : longint;  
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_TYPEMETHOD_IS_SELFISH(flag : longint) : longint;  
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_TYPEMETHOD_IS_MAP(flag : longint) : longint;  
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_TYPEMETHOD_IS_ORDER(flag : longint) : longint;  
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_TYPEMETHOD_IS_RNDS(flag : longint) : longint;  
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_TYPEMETHOD_IS_WNDS(flag : longint) : longint;  
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_TYPEMETHOD_IS_RNPS(flag : longint) : longint;  
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_TYPEMETHOD_IS_WNPS(flag : longint) : longint;  
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_TYPEMETHOD_IS_ABSTRACT(flag : longint) : longint;  
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_TYPEMETHOD_IS_OVERRIDING(flag : longint) : longint;  
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_TYPEMETHOD_IS_PIPELINED(flag : longint) : longint;  
+
+  { macros to set the type method flags  }
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_TYPEMETHOD_SET_INLINE(flag : longint) : longint;  
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_TYPEMETHOD_SET_CONSTANT(flag : longint) : longint;  
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_TYPEMETHOD_SET_VIRTUAL(flag : longint) : longint;  
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_TYPEMETHOD_SET_CONSTRUCTOR(flag : longint) : longint;  
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_TYPEMETHOD_SET_DESTRUCTOR(flag : longint) : longint;  
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_TYPEMETHOD_SET_OPERATOR(flag : longint) : longint;  
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_TYPEMETHOD_SET_SELFISH(flag : longint) : longint;  
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_TYPEMETHOD_SET_MAP(flag : longint) : longint;  
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_TYPEMETHOD_SET_ORDER(flag : longint) : longint;  
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_TYPEMETHOD_SET_RNDS(flag : longint) : longint;  
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_TYPEMETHOD_SET_WNDS(flag : longint) : longint;  
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_TYPEMETHOD_SET_RNPS(flag : longint) : longint;  
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_TYPEMETHOD_SET_WNPS(flag : longint) : longint;  
+
+  { macros to clear the type method flags  }
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_TYPEMETHOD_CLEAR_INLINE(flag : longint) : longint;  
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_TYPEMETHOD_CLEAR_CONSTANT(flag : longint) : longint;  
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_TYPEMETHOD_CLEAR_VIRTUAL(flag : longint) : longint;  
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_TYPEMETHOD_CLEAR_CONSTRUCTOR(flag : longint) : longint;  
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_TYPEMETHOD_CLEAR_DESTRUCTOR(flag : longint) : longint;  
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_TYPEMETHOD_CLEAR_OPERATOR(flag : longint) : longint;  
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_TYPEMETHOD_CLEAR_SELFISH(flag : longint) : longint;  
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_TYPEMETHOD_CLEAR_MAP(flag : longint) : longint;  
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_TYPEMETHOD_CLEAR_ORDER(flag : longint) : longint;  
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_TYPEMETHOD_CLEAR_RNDS(flag : longint) : longint;  
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_TYPEMETHOD_CLEAR_WNDS(flag : longint) : longint;  
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_TYPEMETHOD_CLEAR_RNPS(flag : longint) : longint;  
+
+  { was #define dname(params) para_def_expr }
+  { argument types are unknown }
+  { return type might be wrong }   
+  function OCI_TYPEMETHOD_CLEAR_WNPS(flag : longint) : longint;  
+
+  {--------------------------- TYPE PARAMETER MODE --------------------------- }
+  { PL/SQL starts this from 0  }
+  { in  }
+  { out  }
+  { in-out  }
+  { call by reference (implicitly in-out)  }
+  { OUT with NOCOPY modifier  }
+  { IN OUT with NOCOPY modifier  }
+
+  type
+     OCITypeParamMode = (OCI_TYPEPARAM_IN := 0,OCI_TYPEPARAM_OUT,
+       OCI_TYPEPARAM_INOUT,OCI_TYPEPARAM_BYREF,
+       OCI_TYPEPARAM_OUTNCPY,OCI_TYPEPARAM_INOUTNCPY
+       );
+
+
+     POCITypeParamMode = ^OCITypeParamMode;
+  {-------------------------------- DEFAULTS --------------------------------- }
+  { default binary and decimal precision and scale  }
+  { no precision specified  }
+  { was #define dname def_expr }
+  function OCI_NUMBER_DEFAULTPREC : ub1;    
+
+  { was #define dname def_expr }
+  function OCI_NUMBER_DEFAULTSCALE : sb1;    
+
+  { no binary/decimal scale specified  }
+  { default maximum length for varrays and vstrings (used in sql.bsq)  }
+
+  const
+     OCI_VARRAY_MAXSIZE = 4000;     
+  { default maximum number of elements for a varray  }
+  { default maximum length of a vstring  }
+     OCI_STRING_MAXLEN = 4000;     
+  {--------------------------------------------------------------------------- }
+  { This set of macro is used only in beta2. They should be removed as soon as
+   * PLSQL has made the changes of not using these macros.
+    }
+  { Special duration for allocating memory only. No instance can be allocated
+   * given these durations.
+    }
+//     OCICoherency = OCIRefreshOpt;
+  { was #define dname def_expr }
+  function OCI_COHERENCY_NONE : OCIRefreshOpt;    
+
+  { was #define dname def_expr }
+  function OCI_COHERENCY_NULL : OCIRefreshOpt;    
+
+  { was #define dname def_expr }
+  function OCI_COHERENCY_ALWAYS : OCIRefreshOpt;    
+
+//implementation
+

+ 2676 - 0
packages/base/oracle/ort.inc

@@ -0,0 +1,2676 @@
+{
+  Automatically converted by H2Pas 1.0.0 from ort.h
+  The following command line parameters were used:
+    -p
+    -D
+    -l
+    jojo.so
+    ort.h
+}
+
+  { @(#)ort.h    1.44 95/07/07  }
+  { Copyright (c) 1994, 2003, Oracle Corporation.  All rights reserved.   }
+  { 
+    NAME
+  
+      ORT - ORacle's external open Type interface to the open type manager (OTM)
+  
+    DESCRIPTION
+  
+      The open type manager interface includes dynamic type operations to
+      create, delete, update, and access types.  See the "Functional
+      Specification for Oracle Object Call Interface (Objects Project),
+      Version 1.0" for a user level description of the OTM.  For a more
+      detailed description, see the "Component Document for the Open Type
+      Manager, Version 1.0".
+  
+      NOTE: MOST Of the functions in this header file are being desupported.
+            Please use the OCIDescribeAny interface as described in oci.h
+            instead.
+            The OCIType, OCITypeElem, OCITypeMethod abstract types continue
+            to be supported. The only two functions that remain to be documented
+            are OCITypeArrayByName and OCITypeArrayByRef.
+            All obsolete types/functions are marked accordingly below.
+  
+    RELATED DOCUMENTS
+  
+      For the functional specification for the OTM, see: 
+          [1] Kotsovolos, Susan, "Functional Specification for Oracle Object
+              Call Interface (Objects Project), Version 1.0", Oracle
+              Corporation, February 1995.
+      For the internal design of the OTM, see the following:
+          [2] Kotsovolos, Susan, "Component Document for the Open Type Manager",
+              Oracle Corporation, November 1994. 
+          [3] Kotsovolos, Susan, "Design for The Open Type Manager, Oracle 
+              Object Management Subsystem Version 1.0", Oracle Corporation, 
+              March 1994.
+          [4] Kotsovolos, Susan and Tin A. Nguyen, "The Open Type Manager",
+              Oracle Corporation, March 1994.
+          [5] Kotsovolos, Susan and Tin A. Nguyen, "Schema Evolution",
+              Oracle Corporation, March 1994.
+      For a description of the types the OTM must support, see:
+          [6] Nguyen, Tin A., "The Open Type System", Oracle Corporation, 
+              February 1994. 
+  
+    INSPECTION STATUS 
+  
+      Inspection date:    
+      Inspection status: 
+      Estimated increasing cost defects per page:
+      Rule sets:        
+  
+    ACCEPTANCE REVIEW STATUS 
+  
+      Review date:    
+      Review status:
+      Reviewers:  
+  
+  
+    **** ALL OBSOLETE FUNCTIONS/TYPES ARE MARKED ACCORDINGLY ***
+  
+    EXPORT FUNCTIONS
+  
+      None
+  
+    PUBLIC DATA STRUCTURES
+  
+        OCIType - type descriptor in the object cache
+        OCITypeElem - type element descriptor in the object cache
+              (used for attributes and paramters)
+        OCITypeCode  - Open Type System type code.
+        OCITypeMethod - method descriptor in the object cache
+        OCITypeParamMode - parameter modes (ie. IN, IN-OUT etc)
+  
+    PUBLIC FUNCTIONS
+  
+      ITERATOR (for OCITypeAttrNext and OCITypeMethodNext)
+  
+        OCITypeIterNew  - ** OBSOLETE ** Create new instance of an iteraton.
+        OCITypeIterSet  - ** OBSOLETE ** Initialize iterator.
+        OCITypeIterFree - ** OBSOLETE ** Free instance of iterator.
+  
+      TYPE GET
+  
+        OCITypeByName      - ** OBSOLETE ** Get a type by name.
+        OCITypeArrayByName - Get an array of types by their names.
+        OCITypeByRef       - ** OBSOLETE ** Get a type by its CREF.
+        OCITypeArrayByRef  - Get an array of types by their CREFs.
+  
+      TYPE ACCESSORS
+  
+        OCITypeName     - ** OBSOLETE ** OCI Get a type's name.
+        OCITypeSchema   - ** OBSOLETE ** OCI Get a type's schema name.
+        OCITypeTypeCode - ** OBSOLETE ** OCI Get a type's type code.
+        OCITypeVersion  - ** OBSOLETE ** OCI Get a Type's user-readable Version.
+        OCITypeAttrs    - ** OBSOLETE ** OCI Get a Type's Number of Attributes.
+        OCITypeMethods  - ** OBSOLETE ** OCI Get a Type's Number of Methods.
+  
+      TYPE ELEMENT ACCESSORS (they represent attributes/parameters/results)
+  
+        OCITypeElemName      - ** OBSOLETE ** Get a type element's (only for
+                                  attributes) name.
+        OCITypeElemType      - ** OBSOLETE ** Get a type element's type
+                                  descriptor.
+        OCITypeElemTypeCode  - ** OBSOLETE ** Get a type element's typecode.
+        OCITypeElemParameterizedType - ** OBSOLETE ** Get a type element's
+                                          parameterized type's type descriptor.
+        OCITypeElemNumPrec   - ** OBSOLETE ** Get a number's precision.
+        OCITypeElemNumScale  - ** OBSOLETE ** Get a decimal or oracle Number's
+                                              Scale
+        OCITypeElemCharSetID - ** OBSOLETE ** Get a fixed or variable length
+                                              string's character set ID.
+        OCITypeElemCharSetForm - ** OBSOLETE ** Get a fixed or variable length
+                                                string's character set form (how
+                                                character set information has
+                                                been specified).
+        OCITypeElemLength    - ** OBSOLETE ** Get a raw, fixed or variable
+                                              length string's length.
+        OCITypeElemParamMode - ** OBSOLETE ** Get element's parameter's mode
+                                              (only valid for parameter).
+        OCITypeElemDefaultValue - ** OBSOLETE ** Get element's Default Value.
+  
+      ATTRIBUTE ACCESSORS
+  
+        OCITypeAttrByName - ** OBSOLETE ** Get an Attribute by Name.
+        OCITypeAttrNext   - ** OBSOLETE ** Get an Attribute by Iteration.
+  
+      COLLECTION ACCESSORS
+  
+        OCITypeCollTypeCode - ** OBSOLETE ** Get a named collection's typecode.
+        OCITypeCollElem     - ** OBSOLETE ** Get a named collection's element's
+                                 type element information.
+        OCITypeCollSize     - ** OBSOLETE ** Get a named collection's size in
+                                 number of elements.
+  
+      METHOD ACCESSORS
+  
+        OCITypeMethodOverload - ** OBSOLETE ** Get number of overloaded methods
+                                               with the given method name.
+                                               (no direct equivalent for
+                                                OCIDescribe interface)
+        OCITypeMethodByName   - ** OBSOLETE ** Get one or more methods by name.
+        OCITypeMethodNext     - ** OBSOLETE ** Iterate to the next method to
+                                               retrieve.
+        OCITypeMethodName     - ** OBSOLETE ** Get method's name.
+        OCITypeMethodEncap    - ** OBSOLETE ** Get method's encapsulation level. 
+        OCITypeMethodFlags    - ** OBSOLETE ** et method's flags.
+        OCITypeMethodMap      - ** OBSOLETE ** Get type's map function.
+        OCITypeMethodOrder    - ** OBSOLETE ** Get type's order function.
+        OCITypeMethodParams   - ** OBSOLETE ** Get a method's number of
+                                               parameters.
+  
+      RESULT ACCESSORS
+  
+        OCITypeResult - ** OBSOLETE ** OCI Get a method's Result.
+  
+        See also ATTRIBUTE/PARAMETER/RESULT TYPE ACCESSORS.
+  
+      PARAMETER ACCESSORS
+  
+        OCITypeParamByPos  - ** OBSOLETE ** Get a Parameter in a method By
+                                            Position.
+        OCITypeParamByName - ** OBSOLETE ** Get a Parameter in a method By Name.
+        OCITypeParamPos    - ** OBSOLETE ** Get a Parameter's PoSition in a
+                                            method.
+  
+    CALL GRAPHS:
+  
+    Only type accessors are supported for 8.0.
+    ** OBSOLETE ** please use OCIDescribe interface
+  
+    TYPE ACCESSOR EXAMPLE
+  
+        CREATE TYPE CAR
+        (
+          name   vstring,
+          age    number,
+            number   car_age;                           /o Oracle number o/
+            weight   car_weight;                        /o abstract type o/
+  
+          PUBLIC: 
+  
+            /o methods o/
+            car(orlvs a_name, number an_age, WEIGHT a_weight);
+            ~car();
+            inline number get_age() const;
+            
+            /o relative ordering (map) functions o/
+            number car_map
+        );
+  
+        /o the following code accesses the type created above o/
+  
+        ub1      meth_flags;
+        ub4      i, j; 
+        ub4      text_len, position;
+        ub4      count;
+        ub4      length;
+        OCITypeCode    typecode;
+        OCIRef  *attr_ref;
+        OCIRef  *param_ref;
+        OCIType  *tdo, new_tdo, final_tdo;
+        OCITypeElem  *elem;
+        OCITypeIter  *iterator_ort;
+        oratext   (*names)[];
+        ub4      lengths[];
+        ub4     *positions;
+        oratext    *name;
+        oratext     name_buffer[M_IDEN];
+  
+        /o initialize the references o/
+        DISCARD orlrini(env, err, (dvoid *)&attr_ref);
+        DISCARD orlrini(env, err, (dvoid *)&param_ref);
+  
+        /o ----------------- GET INFORMATION ABOUT A TYPE ----------------- o/
+  
+        /o start a transaction o/
+        
+        /o Pin the type until the end of the transaction.  Pinning the type is 
+         o required before using any type accessors. 
+         o/
+        if (OCITypeByName(env, err, svc, (oratext *)0, 0, "CAR", strlen("CAR"), 
+                    OCI_DURATION_TRANS, &car_ref, &car_tdo) != OCI_SUCCESS)
+          /o error o/ ;
+  
+        /o get the type's name o/
+        if (!memcmp(OCITypeName(env, err, car_tdo, &text_len), "person",
+                                text_len))
+          /o do something o/ ;
+  
+        /o get the type's schema name o/
+        if (!memcmp(OCITypeSchema(env, err, car_tdo, &text_len), "john",
+                    text_len))
+          /o do something o/ ;
+  
+        /o get the type code of the type o/
+        if (OCITypeTypeCode(env, err, car_tdo) == OCI_TYPECODE_ADT)
+          /o do something o/ ; 
+  
+        /o get the type version o/
+        if (!memcmp(OCITypeVersion(env, err, car_tdo, &text_len), "1", text_len))
+           /o do something o/  ;
+  
+        /o ------- GET FLATTENED POSITION OF AN ATTRIBUTES IN A TYPE ------- o/
+  
+        names = malloc(sizeof(oratext *) * 2);
+        names[0] = malloc(strlen("car_weight"));
+        names[1] = malloc(strlen("ounces"));
+        memcpy(names[0], "car_weight", strlen("car_weight"));
+        memcpy(names[1], "ounces", strlen("ounces"));
+  
+        lengths = malloc(sizeof(ub4) * 2);
+        lengths[0] = strlen("car_weight");
+        lengths[1] = strlen("ounces");
+  
+        /o ---------- GET IMMEDIATE ATTRIBUTES IN A TYPE ---------- o/
+  
+        /o loop through all attributes in the type with iterator o/
+        if (OCITypeIterNew(env, err, car_tdo, &iterator_ort) != OCI_SUCCESS)
+          /o do something o/
+  
+        while (OCITypeAttrNext(env, err, iterator_ort, &ado) != OCI_NO_DATA)
+        
+          /o get the attribute's name o/
+          if (!memcmp(OCITypeElemName(env, err, ado, &text_len),
+                                      "tiger", text_len))
+            /o do something o/  ;
+  
+          /o get the attribute's type descriptor o/
+          if (OCITypeElemType(env, err, ado, &tdo) != OCI_SUCCESS)
+            /o error o/ ;
+  
+          /o get the attribute's type code o/
+          typecode = OCITypeElemTypeCode(env, err, ado);
+  
+          switch (typecode)
+          
+          /o scalar types o/
+          case OCI_TYPECODE_DATE:                                     /o date o/
+          case OCI_TYPECODE_SIGNED8:                                  /o byte o/
+          case OCI_TYPECODE_SIGNED16:                                /o short o/
+          case OCI_TYPECODE_UNSIGNED8:                       /o unsigned byte o/
+          case OCI_TYPECODE_UNSIGNED16:                     /o unsigned short o/
+          case OCI_TYPECODE_OCTET:                                   /o octet o/
+          case OCI_TYPECODE_TABLE:                            /o nested table o/
+          case OCI_TYPECODE_CLOB:                            /o character lob o/
+          case OCI_TYPECODE_BLOB:                               /o binary lob o/
+          case OCI_TYPECODE_CFILE:                   /o character file object o/
+          case OCI_TYPECODE_BFILE:                      /o binary file object o/
+  
+            /o do something o/
+            break;
+  
+          /o number types o/
+          case OCI_TYPECODE_NUMBER:                          /o oracle number o/
+          case OCI_TYPECODE_DECIMAL:                               /o decimal o/
+            
+              /o get the scale of the number o/
+              if (OCITypeElemNumScale(env, err, ado) == 3)
+                /o do something o/ ;
+            
+            /o fall through to get the precision o/
+  
+          case OCI_TYPECODE_FLOAT:                                   /o float o/
+          case OCI_TYPECODE_SIGNED32:                                 /o long o/
+          case OCI_TYPECODE_UNSIGNED32:                      /o unsigned long o/
+          case OCI_TYPECODE_REAL:                                     /o real o/
+          case OCI_TYPECODE_DOUBLE:                                 /o double o/
+            
+              /o get the precision of the number o/
+              if (OCITypeElemNumPrec(env, err, ado) == 2)
+                /o do something o/ ;
+            
+            break;
+  
+          /o string types o/
+          case OCI_TYPECODE_CHAR:                      /o fixed length string o/
+          case OCI_TYPECODE_VARCHAR2:               /o variable length string o/
+          case OCI_TYPECODE_RAW:                                       /o raw o/
+            
+              /o get the length of the fixed or variable length string o/
+              if (OCITypeElemLength(env, err, ado) < 100)
+                /o do something o/
+            
+            break;
+  
+          /o parameterized types o/
+          case OCI_TYPECODE_REF:                          /o reference o/
+          case OCI_TYPECODE_PTR:                            /o pointer o/
+            
+              /o get the type stored in the parameterized type o/
+              if (OCITypeElemParameterizedType(env, err, ado, &tdo)
+                   != OCI_SUCCESS)
+                /o error o/ ;
+  
+              /o do something o/
+              if (OCI_TYPEELEM_IS_REF(OCITypeElemFlags(env, err, ado)))...
+            
+            break;
+  
+          /o domain type o/
+          case OCI_TYPECODE_NAMEDCOLLECTION:
+            switch (OCITypeCollTypeCode(env, err, tdo))
+            
+            case OCI_TYPECODE_VARRAY:                   /o variable array o/
+              ub4   num_elems;
+              OCIType *element_type;
+  
+              /o get the number of elements in the farray or the maximum number
+               o of elements in the varray.
+               o/
+              OCITypeCollSize(env, err, tdo, &num_elems);
+  
+              /o get the type of the array o/
+              OCITypeElemType(env, err, tdo, &element_type);
+            
+            break;
+  
+            case OCI_TYPECODE_TABLE:                         /o multiset o/
+            
+              OCIType *table_type;
+  
+              /o get the type of the multiset o/
+              OCITypeElemType(env, err, tdo, &table_type);
+  
+              /o do something o/
+            
+          
+  
+          /o abstract type o/
+          case OCI_TYPECODE_ADT:                 /o abstract data type o/
+            
+              /o get the adt information o/
+              if (OCITypeElemType(env, err, ado, &tdo) != OCI_SUCCESS)
+                /o error o/ ;
+  
+              /o do something o/
+            
+            break;
+  
+          default:
+            DISCARD printf("Error:  invalid type code\n");
+  
+           /o end of typecode switch o/
+  
+         /o end of loop through all attributes in a type o/
+  
+  
+        /o ------------ GET THE IMMEDIATE METHODS OF A TYPE ------------ o/
+  
+        /o loop through all methods in the type by reusing iterator o/
+        if (OCITypeIterSet(env, err, car_tdo, iterator_ort) != OCI_SUCCESS)
+          /o do something o/
+  
+        while (OCITypeMethodNext(env, err, iterator_ort) != OCI_NO_DATA)
+        
+          /o get the method's name o/
+          if (!memcmp(OCITypeMethodName(env, err, mdo, &text_len), "car",
+                      text_len))
+            /o do something o/  ;
+  
+          /o get the method's encapsulation o/
+          if (OCITypeMethodEncap(env, err, mdo) == OCI_TYPEENCAP_PUBLIC)
+            /o do something o/  ;
+  
+          /o get the method's flags o/
+          meth_flags = OCITypeMethodFlags(env, err, mdo);
+          if (meth_flags & OCI_TYPEMETHOD_VIRTUAL)  
+            /o do something o/  ;
+  
+  
+          /o ------------ GET THE PARAMETERS IN A METHOD ------------ o/
+  
+          /o loop through all parameters in the method o/
+          count = OCITypeMethodParams(env, err, mdo);
+          for (j = 1; j <= count; j++)
+          
+            /o get the parameter information by position o/
+            if (OCITypeParamByPos(env, err, mdo, i, &elem) != OCI_SUCCESS)
+              /o error o/ ;
+  
+            /o get the parameter's name o/
+            if (!memcmp(OCITypeElemName(env, err, elem, &text_len), "an_age",
+                        text_len))
+              /o do something o/ ;
+  
+            /o get the parameter's mode o/
+            if (OCITypeElemMode(env, err, elem) == OCI_PARAM_OUT)
+              /o do something o/ ;
+     
+            /o get the parameter's required flag o/
+            if (ortgprq(env, err, elem))
+              /o do something o/ ;
+          
+        
+  
+        /o get a method by name o/
+        if (OCITypeMethodByName(env, err, car_tdo, "car_constructor", 
+                                strlen("car_constructor"), NULLP(OCIRef), &mdo) 
+                                != OCI_SUCCESS)
+          /o error o/ ;
+  
+        /o get a parameter in a method by name o/
+        if (OCITypeParamByName(env, err, mdo, "an_age", strlen("an_age"), &elem) 
+                    != OCI_SUCCESS)
+          /o error o/ ;
+  
+        /o get a parameter's typecode o/
+        typecode = OCITypeElemTypeCode(env, err, elem);
+     
+        /o get a parameter's type object o/
+        if (OCITypeElemType(env, err, elem, &tdo)) != OCI_SUCCESS)
+          /o error o/ ;
+  
+        /o get a parameter's position in a method o/
+        if (ortgpps(env, err, mdo, "an_age", strlen("an_age"), 
+                    &position, NULLP(OCIRef), NULLP(OCITypeElem)) != OCI_SUCCESS)
+          /o error o/ ;
+  
+        /o ------------ GET THE METHOD's RESULT ------------ o/
+       
+        /o get a method by name o/
+        if (OCITypeMethodByName(env, err, car_tdo, "get_age", strlen("get_age"),
+                    &mdo) != OCI_SUCCESS)
+          /o error o/ ;
+  
+        /o get the typecode of the method's result o/
+        typecode = OCITypeElemTypeCode(env, err, mdo);
+  
+  
+        /o ----------------- END ---------------- o/
+  
+        /o free the references implicitly allocated o/
+        DISCARD orlrfre(env, err, (dvoid *)&attr_ref);
+        DISCARD orlrfre(env, err, (dvoid *)&param_ref);
+  
+    NOTES
+  
+    MODIFIED
+      srseshad   03/12/03  - convert oci public api to ansi
+      aahluwal   06/03/02  - bug 2360115
+      skabraha   04/16/02  - fix compiler warnings
+      rkasamse   03/02/01  - do not use iterator : keyword in MSVB
+      bpalaval   02/09/01  - Change text to oratext.
+      rxgovind   01/31/00  - add OCIType interfaces for transient types
+      whe        09/01/99 -  976457:check __cplusplus for C++ code
+      cxcheng    05/06/97 -  make OCI_TYPE?? test macros return either 1 or 0
+      cxcheng    04/22/97 -  add comment on desupporting OCIType functions
+      skrishna   03/18/97 -  fix ifdef for supporting ansi and k&r proto-types
+      cxcheng    02/26/97 -  fix lint problem with oro names
+      cxcheng    02/06/97 -  take out short name support except with SLSHORTNAME
+      cxcheng    01/15/97 -  change prototype of OCITypeElemParameterizedType()
+      cxcheng    01/03/97 -  replace bit in OCI_TYPEPARAM_IS_REQUIRED with bitwis
+      cxcheng    12/31/96 -  replace OCI_PARAM_IS_REQUIRED with OCI_TYPEPARAM_IS_
+      cxcheng    12/09/96 -  add prototype for OCITypeElemExtTypeCode and OCIType
+      cxcheng    11/25/96 -  add schema name parameter to OCITypeVTInsert()
+      cxcheng    11/20/96 -  fix prototype for OCITypeByName()
+      cxcheng    11/11/96 -  fix prototype for OCITypeByName()
+      cxcheng    11/05/96 -  remove OCITypeElemExtTypeCode and OCITypeCollExtType
+      dchatter   10/28/96 -  change ortgatyp to be OCITypeArrayByName
+      cxcheng    10/25/96 -  fix problem with ortgatyp at end
+      cxcheng    10/22/96 -  add OCITypeByRef and OCITypeArrayByRef
+      cxcheng    10/20/96 -  remove ortgtyp() from #define section at end
+      cxcheng    10/18/96 -  rename OCITypeGetArray to OCITypeArrayByName
+      cxcheng    10/17/96 -  final change to prototype for OCI_TYPEPARAM_IS_REQUI
+      cxcheng    10/15/96 -  rename OCIEncapLevel and OCIMethodFlag
+      cxcheng    10/14/96 -  change prototype of OCITypeResult
+      mluong     10/11/96 -  fix compile error
+      jwijaya    10/10/96 -  fix bug on OCI_PARAM_IS_REQUIRED
+      cxcheng    10/09/96 -  more lint and link fixes
+      cxcheng    10/08/96 -  more lint fixes
+      cxcheng    10/07/96 -  more changes
+      cxcheng    10/04/96 -  replace short names with long names
+      cxcheng    10/01/96 -  change to long names for readability
+      cxcheng    09/27/96 -  rename ortgatyp() to ortgtya() for lint
+      cxcheng    09/20/96 -  add ortgatyp() for array get type
+      cxcheng    09/18/96 -  add array pin and iterator functions
+      cxcheng    08/09/96 -  add version table calls
+      cxcheng    07/22/96 -  add OCITypeElemType() to top
+      jwijaya    07/03/96 -  add ANSI prototypes
+      cxcheng    06/28/96 -  add OCITypeElemCharSetForm()
+      cxcheng    06/26/96 -  fix comment on OCITypeParamByPos()/ortgpps()
+      cxcheng    06/18/96 -  fix comments on OCITypeResult()
+      cxcheng    06/17/96 -  improve comments
+      skrishna   06/03/96 -  change OCITypeCollElem() prototype
+      vkrishna   05/29/96 -  replace OROTCFAR with OROTCCAR
+      cxcheng    05/28/96 -  fix comments, remove non-beta1 functions
+      cxcheng    05/02/96 -  fix prototype bugs
+      cxcheng    04/29/96 -  rename OCITypeElemm() to ortanct()
+      cxcheng    04/26/96 -  add ortgrbp and ortftyi,
+                             fix comments and examples
+      cxcheng    04/22/96 -  big merge to main branch
+      cxcheng    04/17/96 -  fix syntax
+      cxcheng    04/08/96 -  change prototype to ortaty()
+      skrishna   04/08/96 -  change ort*() to take OCIEnv* and OCIError* instead
+                             of oroenv*
+      cxcheng    03/28/96 -  add ortslob(), change ortsstr() prototype
+      cxcheng    03/13/96 -  change alter type interface
+      cxcheng    03/11/96 -  ORT interface changes
+      cxcheng    02/27/96 -  correct comments
+      jboonleu   02/09/96 -  rename oroopd to OCIDuration
+      cxcheng    01/19/96 -  change ORTCTYVAL to ORTCTYEMB for embedded ADT
+      cxcheng    02/14/96 -  add more comments
+      jboonleu   02/09/96 -  rename oroopd to OCIDuration
+      cxcheng    02/07/96 -  fix comments and examples
+      cxcheng    01/19/96 -  new ORT interface without korfc's
+      cxcheng    01/08/96 -  consolidate collection functions
+      cxcheng    12/14/95 -  remove obsolete ortgcol() and ortrelease()
+      jweisz     12/12/95 -  merge screwup: ortdth twice
+      cxcheng    12/05/95 -  change multiset interface for new standard
+      skotsovo   12/01/95 -  merge from /vobs/rdbms/public/ort.h@@/main/
+                             st_rdbms_big_dev/st_rdbms_obj/
+                             st_rdbms_jwijaya_variable_ref
+      cxcheng    11/13/95 -  add ortaty()/orteaty()
+      cxcheng    11/13/95 -  add new collection type accessors
+      skotsovo   10/30/95 -  add 'oid' type b/c extent type uses it.
+      skotsovo   10/24/95 -  update according to new variable length ref
+      cxcheng    10/05/95 -  add null support, change prototypes to calls
+      cxcheng    10/03/95 -  add OCITypeMethodOrder() to get ORDER method
+      cxcheng    09/28/95 -  add OCITypeElemm() for collection types support
+      skotsovo   06/05/95 -  add adt_type parameter to ortsab() 
+      skotsovo   05/10/95 -  ifdef'd out ortgafp() 
+      skotsovo   03/07/95 -  update interface to only include release 1
+      skotsovo   02/22/95 -  add multiset accessors 
+      skotsovo   02/09/95 -  update according to new ots doc 
+      skotsovo   01/31/95 -  add rest of release 1 types 
+      skotsovo   01/24/95 -  categorize sint32, double, and real as number types 
+                             (with precision and scale) instead of scalar types.
+      skotsovo   01/12/95 -  remove dependency from ortdty interface 
+      skotsovo   01/03/95 -  remove orotyp accessors 
+      skotsovo   12/12/94 -  update comments 
+      skotsovo   12/05/94 -  change OCITypeElemParameterizedTyper interface 
+      skotsovo   10/26/94 -  add type version table 
+      skotsovo   10/17/94 -  fix ortgafp() comments 
+      skotsovo   10/14/94 -  modify ortgafp() parameters 
+      skotsovo   10/14/94 -  add examples 
+      skotsovo   10/13/94 -  add a few new routines 
+      jwijaya    10/07/94 -  add namespace to pin by name 
+      jwijaya    10/02/94 -  connection handle -> connection number 
+      skotsovo   09/13/94 -  modify example to use updated oririni interface 
+      skotsovo   08/25/94 -  change scale to sb1 from sb2 
+      skotsovo   07/28/94 -  add ortbeg() and ortend() 
+      skotsovo   07/14/94 -  add decimal type & call graph
+      skotsovo   06/28/94 -  subset by removing miscellaneous functions 
+      skotsovo   06/28/94 -  consistently put comments before typedefs 
+      skotsovo   06/27/94 -  modify according to new header file template, add
+                             more examples, and change ortcty() to return a
+                             reference to the type
+      skotsovo   06/24/94 -  add functions to get type information from orotyp 
+      skotsovo   06/20/94 -  finish modifying according to header template 
+      skotsovo   06/09/94 -  modify according to header file template 
+      skotsovo   06/08/94 -  replace s.h with oratypes.h 
+      skotsovo   05/24/94 -  modify comments & update example
+      skotsovo   05/23/94 -  modify fnt names for create, alter and drop type 
+      skotsovo   05/18/94 -  remove ortdme() -- delete a method 
+      skotsovo   05/17/94 -  add tdo parameter to all type modifiers 
+      skotsovo   05/11/94 -  return text* instead of including it in arglist 
+      skotsovo   11/16/93 -  creation
+  
+   }
+{$ifndef ORO_ORACLE}
+{ $include <oro.h>}
+{$endif}
+  {--------------------------------------------------------------------------- }
+  {                         SHORT NAMES SUPPORT SECTION                        }
+  {--------------------------------------------------------------------------- }
+{$ifdef SLSHORTNAME}
+  { the following are short names that are only supported on IBM mainframes
+     with the SLSHORTNAME defined.
+     With this all subsequent long names will actually be substituted with
+     the short names here  }
+
+  const
+     OCITypeArrayByName = ortgatyp;     
+     OCITypeAttrByName = ortgabn;     
+     OCITypeAttrNext = ortgabi;     
+     OCITypeAttrs = ortgtna;     
+     OCITypeByRef = ortgtbrf;     
+     OCITypeCollElem = ortgcel;     
+     OCITypeCollExtTypeCode = ortgcsqt;     
+     OCITypeCollSize = ortgcne;     
+     OCITypeCollTypeCode = ortgdttc;     
+     OCITypeElem = ortado;     
+     OCITypeElemCharSetForm = ortgscform;     
+     OCITypeElemCharSetID = ortgscid;     
+     OCITypeElemDefaultValue = ortgpdv;     
+     OCITypeElemExtTypeCode = ortgasqt;     
+     OCITypeElemLength = ortgsl;     
+     OCITypeElemName = ortganm;     
+     OCITypeElemNumPrec = ortgnp;     
+     OCITypeElemNumScale = ortgns;     
+     OCITypeElemParamMode = ortgpmo;     
+     OCITypeElemParameterizedType = ortgpa;     
+     OCITypeElemType = ortgaty;     
+     OCITypeElemTypeCode = ortgatc;     
+     OCITypeIter = ortitr;     
+     OCITypeIterFree = ortifre;     
+     OCITypeIterNew = ortinew;     
+     OCITypeIterSet = ortiset;     
+     OCITypeMethod = ortmdo;     
+     OCITypeMethodByName = ortgmbn;     
+     OCITypeMethodEncap = ortgmen;     
+     OCITypeMethodFlags = ortgmfl;     
+     OCITypeMethodMap = ortgmmap;     
+     OCITypeMethodName = ortgmnm;     
+     OCITypeMethodNext = ortgmbi;     
+     OCITypeMethodOrder = ortgmor;     
+     OCITypeMethodOverload = ortgmno;     
+     OCITypeMethodParams = ortgmnp;     
+     OCITypeMethods = ortgtnm;     
+     OCITypeName = ortgtme;     
+     OCITypeParamByName = ortgpbn;     
+     OCITypeParamPos = ortgpps;     
+     OCITypeSchema = ortgtsch;     
+     OCITypeTypeCode = ortgttc;     
+     OCITypeVTInit = ortvini;     
+     OCITypeVTInsert = ortvins;     
+     OCITypeVTSelect = ortvsel;     
+     OCITypeVersion = ortgtvn;     
+{$endif}
+  { SLSHORTNAME  }
+  {============================ }  { PUBLIC TYPES AND CONSTANTS  }
+  {============================ }
+  {----------------------------- TYPE DESCRIPTION ---------------------------- }
+  {
+   * OCIType - OCI Type Description Object 
+   *
+   * The contents of an 'OCIType' is private/opaque to clients.  Clients just 
+   * need to declare and pass 'OCIType' pointers in to the type manage
+   * functions.
+   * The pointer points to the type in the object cache.  Thus, clients don't
+   * need to allocate space for this type and must NEVER free the pointer to the
+   * 'OCIType'.
+    }
+
+  type
+    POCIType = pointer;
+  {------------------------- TYPE ELEMENT DESCRIPTION ------------------------ }
+  {
+   * OCITypeElem - OCI Type Element object
+   *
+   * The contents of an 'OCITypeElem' is private/opaque to clients. Clients just 
+   * need to declare and pass 'OCITypeElem' pointers in to the type manager 
+   * functions.
+   *
+   * 'OCITypeElem' objects contains type element information such as the numeric
+   * precision for example, for number objects, and the number of elements for
+   * arrays.
+   * They ARE used to describe type attributes, collection elements,
+   * method parameters, and method results. Hence they are pass in or returned
+   * by attribute, collection, and method parameter/result accessors.
+    }
+    POCITypeElem = pointer;
+
+  {--------------------------- METHOD DESCRIPTION --------------------------- }
+  {
+   * OCITypeMethod - OCI Method Description object 
+   *
+   * The contents of an 'OCITypeMethod' is private/opaque to clients.  Clients
+   * just need to declare and pass 'OCITypeMethod' pointers in to the type
+   * manager functions.
+   * The pointer points to the method in the object cache.  Thus, clients don't
+   * need to allocate space for this type and must NEVER free the pointer to 
+   * the 'OCITypeMethod'.
+    }
+    POCITypeMethod = pointer;
+
+  {--------------------------- TYPE ACCESS ITERATOR -------------------------- }
+  {
+   * OCITypeIter- OCI Type Iterator
+   *
+   * The contents of an 'orti' is private/opaque to clients.  Clients just 
+   * need to declare and pass 'orti' pointers in to the type manager functions.
+   * The iterator is used to retreive MDO's and ADO's that belong to the TDO
+   * one at a time. It needs to be allocated by the 'OCITypeIterNew()' function
+   * call and deallocated with the 'OCITypeIterFree()' function call.
+    }
+    POCITypeIter = pointer;
+
+  {================== }
+  { PUBLIC FUNCTIONS  }
+  {================== }
+  {-------------------------------------------------------------------------- }
+  {                                  ITERATOR                                 }
+  {-------------------------------------------------------------------------- }
+  {-----------------------_- OCITypeIterNew --------------------------------- }
+  { ** OBSOLETE **  }
+
+{$IFNDEF LinkDynamically}
+  function OCITypeIterNew(env:POCIEnv; err:POCIError; tdo:POCIType; var iterator_ort:POCITypeIter):sword;cdecl;external ocilib name 'OCITypeIterNew';
+{$ELSE}
+var OCITypeIterNew : function (env:POCIEnv; err:POCIError; tdo:POCIType; var iterator_ort:POCITypeIter):sword;cdecl;
+{$ENDIF}
+
+  {
+    NAME: OCITypeIterNew - OCI Iterator NEW
+    PARAMETERS:
+         env (IN/OUT) - OCI environment handle initialized in object mode
+         err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+         tdo (IN) - pointer to the pinned type in the object cache to
+                  initialize the iterator with
+         iterator_ort (OUT) - pointer to the pointer to the new iterator created
+    DESCRIPTION:
+         Create a new instance of a method/attribute iterator and initalize
+         it's values.
+    RETURNS:
+          OCI_SUCCESS if the function completes successfully.
+          OCI_INVALID_HANDLE if 'env' or 'err' is null. 
+          OCI_ERROR if
+             1) any of the required parameters is null.
+             2) error while allocating space for the iterator.
+   }
+  {------------------------ OCITypeIterSet --------------------------------- }
+  { ** OBSOLETE **  }
+{$IFNDEF LinkDynamically}
+  function OCITypeIterSet(env:POCIEnv; err:POCIError; tdo:POCIType; iterator_ort:POCITypeIter):sword;cdecl;external ocilib name 'OCITypeIterSet';
+{$ELSE}
+  OCITypeIterSet : function (env:POCIEnv; err:POCIError; tdo:POCIType; iterator_ort:POCITypeIter):sword;cdecl;
+{$ENDIF}
+
+  {
+    NAME: OCITypeIterSet - OCI Iterator SET
+    PARAMETERS:
+         env (IN/OUT) - OCI environment handle initialized in object mode
+         err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+         tdo (IN) - pointer to the pinned type in the object cache to
+                  initialize the iterator with
+         iterator_ort (IN/OUT) - pointer to the iterator to set
+    DESCRIPTION:
+         Initializes the iterator. This is used to reset the state of the
+         iterator.
+    RETURNS:
+          OCI_SUCCESS if the function completes successfully.
+          OCI_INVALID_HANDLE if 'env' or 'err' is null. 
+          OCI_ERROR if
+             1) any of the required parameters is null.
+   }
+  {------------------------ OCITypeIterFree --------------------------------- }
+  { ** OBSOLETE **  }
+{$IFNDEF LinkDynamically}
+  function OCITypeIterFree(env:POCIEnv; err:POCIError; iterator_ort:POCITypeIter):sword;cdecl;external ocilib name 'OCITypeIterFree';
+{$ELSE}
+  OCITypeIterFree : function (env:POCIEnv; err:POCIError; iterator_ort:POCITypeIter):sword;cdecl;
+{$ENDIF}
+
+  {
+    NAME: OCITypeIterFree - OCI Iterator FREe
+    PARAMETERS:
+         env (IN/OUT) - OCI environment handle initialized in object mode
+         err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+         iterator_ort (IN/OUT) - pointer to the iterator to free
+    DESCRIPTION:
+         Free space allocated for the iterator.
+    RETURNS:
+          OCI_SUCCESS if the function completes successfully.
+          OCI_INVALID_HANDLE if 'env' or 'err' is null. 
+          OCI_ERROR if
+             1) any of the required parameters is null.
+             2) error while freeing the iterator, probably bad iterator pointer.
+   }
+  {-------------------------------------------------------------------------- }
+  {                                  TYPE GET                                 }
+  {-------------------------------------------------------------------------- }
+  { ** OBSOLETE **  }
+{$IFNDEF LinkDynamically}
+  function OCITypeByName(env:POCIEnv; err:POCIError; svc:POCISvcCtx; schema_name:Poratext; s_length:ub4;
+             type_name:Poratext; t_length:ub4; version_name:Poratext; v_length:ub4; pin_duration:OCIDuration;
+             get_option:OCITypeGetOpt;var tdo:POCIType):sword;cdecl;external ocilib name 'OCITypeByName';
+{$ELSE}
+  OCITypeByName : function (env:POCIEnv; err:POCIError; svc:POCISvcCtx; schema_name:Poratext; s_length:ub4;
+             type_name:Poratext; t_length:ub4; version_name:Poratext; v_length:ub4; pin_duration:OCIDuration;
+             get_option:OCITypeGetOpt;var tdo:POCIType):sword;cdecl;
+{$ENDIF}
+
+  {
+    NAME: OCITypeByName - OCI Get the most current version of an existing TYPe
+                    by name.
+    PARAMETERS:
+         env (IN/OUT) - OCI environment handle initialized in object mode
+         err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+         svc (IN) - OCI service handle
+         schema_name (IN, optional) - name of schema associated with the 
+                    type.  By default, the user's schema name is used.
+         s_length (IN) - length of the 'schema_name' parameter
+         type_name (IN) - name of the type to get
+         t_length (IN) - length of the 'type_name' parameter
+         version_name (IN, optional) - user readable version of the type.
+                    Pass (oratext *)0 for the most current version.
+         v_length (IN) - length of version_name in bytes. Should be 0 if
+                    the most current version is to be retrieved.
+         pin_duration (IN) - pin duration (e.g. until the end of current
+                    transaction).  See 'oro.h' for a description of
+                    each option.
+         get_option (IN) - options for loading the types. It can be one of two
+                     values:
+                    OCI_TYPEGET_HEADER for only the header to be loaded, or
+                    OCI_TYPEGET_ALL for the TDO and all ADO and MDOs to be
+                      loaded.
+         tdo (OUT) - pointer to the pinned type in the object cache
+    DESCRIPTION:
+         Get a pointer to a version of the existing type associated
+         with schema/type name.
+    RETURNS:
+          OCI_SUCCESS if the function completes successfully.
+          OCI_INVALID_HANDLE if 'env' or 'err' is null. 
+          OCI_ERROR if
+             1) any of the required parameters is null.
+             2) the adt type associated with schema/type name does not exist.
+    NOTE:
+         Schema and type names are CASE-SENSITIVE. If they have been created
+         via SQL, you need to use uppercase names.
+   }
+{$IFNDEF LinkDynamically}
+  function OCITypeArrayByName(env:POCIEnv; err:POCIError; svc:POCISvcCtx; array_len:ub4; schema_name:array of Poratext;
+             s_length:array of ub4; type_name:array of Poratext; t_length:array of ub4; version_name:array of Poratext; v_length:array of ub4;
+             pin_duration:OCIDuration; get_option:OCITypeGetOpt; var tdo:POCIType):sword;cdecl;external ocilib name 'OCITypeArrayByName';
+{$ELSE}
+  OCITypeArrayByName : function (env:POCIEnv; err:POCIError; svc:POCISvcCtx; array_len:ub4; schema_name:array of Poratext;
+             s_length:array of ub4; type_name:array of Poratext; t_length:array of ub4; version_name:array of Poratext; v_length:array of ub4;
+             pin_duration:OCIDuration; get_option:OCITypeGetOpt; var tdo:POCIType):sword;cdecl;
+{$ENDIF}
+
+  {
+    NAME: OCITypeArrayByName - OCI Get array of TYPes by name.
+    PARAMETERS:
+         env (IN/OUT) - OCI environment handle initialized in object mode
+         err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+         svc (IN) - OCI service handle
+         array_len (IN) - number of schema_name/type_name/version_name entries to
+                    be retrieved.
+         schema_name (IN, optional) - array of schema names associated with the
+                    types to be retrieved.  The array must have array_len
+                    elements if specified.
+                    If 0 is supplied, the default schema is assumed, otherwise
+                    it MUST have array_len number of elements.
+                    0 can be supplied for one or more of the entries to indicate
+                    that the default schema is desired for those entries.
+         s_length (IN) - array of schema_name lengths with each entry
+                    corresponding to the length of the corresponding schema_name
+                    entry in the schema_name array in bytes.
+                    The array must either have array_len number of elements or
+                    it MUST be 0 if schema_name is not specified.
+         type_name (IN) - array of the names of the types to retrieve. This
+                    MUST have array_len number of elements.
+         t_length (IN) - array of the lengths of type names in the type_name
+                    array in bytes.
+         version_name (IN) - array of the version names of the types to retrieve
+                    corresponding. This can be 0 to indicate retrieval of the
+                    most current versions, or it MUST have array_len number of
+                    elements.
+                    If 0 is supplied, the most current version is assumed,
+                    otherwise it MUST have array_len number of elements.
+                    0 can be supplied for one or more of the entries to indicate
+                    that the current version is desired for those entries.
+         v_length (IN) - array of the lengths of version names in the
+                    version_name array in bytes.
+         pin_duration (IN) - pin duration (e.g. until the end of current
+                    transaction) for the types retreieve.  See 'oro.h' for a
+                    description of each option.
+         get_option (IN) - options for loading the types. It can be one of two
+                     values:
+                    OCI_TYPEGET_HEADER for only the header to be loaded, or
+                    OCI_TYPEGET_ALL for the TDO and all ADO and MDOs to be
+                      loaded.
+         tdo (OUT) - output array for the pointers to each pinned type in the
+                    object cache. It must have space for array_len pointers.
+                    Use OCIObjectGetObjectRef() to obtain the CREF to each
+                    pinned type descriptor.
+    DESCRIPTION:
+         Get pointers to the existing types associated with the schema/type name
+         array. This is similar to OCITypeByName() except that all the TDO's are
+         retreived via a single network roundtrip.
+    RETURNS:
+          OCI_SUCCESS if the function completes successfully.
+          OCI_INVALID_HANDLE if 'env' or 'err' is null. 
+          OCI_ERROR if
+             1) any of the required parameters is null.
+             2) one or more adt types associated with a schema/type name entry
+                does not exist.
+   }
+{$IFNDEF LinkDynamically}
+  function OCITypeByRef(env:POCIEnv; err:POCIError; type_ref:POCIRef; pin_duration:OCIDuration; get_option:OCITypeGetOpt;
+             var tdo:POCIType):sword;cdecl;external ocilib name 'OCITypeByRef';
+{$ELSE}
+  OCITypeByRef : function (env:POCIEnv; err:POCIError; type_ref:POCIRef; pin_duration:OCIDuration; get_option:OCITypeGetOpt;
+             var tdo:POCIType):sword;cdecl;
+{$ENDIF}
+
+  {
+    NAME: OCITypeArrayByRef - OCI Get array of TYPes by REF.
+    PARAMETERS:
+         env (IN/OUT) - OCI environment handle initialized in object mode
+         err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+         type_ref (IN) - OCIRef * pointing to the particular version of
+                    the type descriptor object to obtain.
+                    The array must have array_len elements if specified.
+         pin_duration (IN) - pin duration (e.g. until the end of current
+                    transaction) for the type to retreieve.  See 'oro.h' for a
+                    description of each option.
+         get_option (IN) - options for loading the type. It can be one of two
+                     values:
+                    OCI_TYPEGET_HEADER for only the header to be loaded, or
+                    OCI_TYPEGET_ALL for the TDO and all ADO and MDOs to be
+                      loaded.
+         tdo (OUT) - pointer to the pinned type in the object cache
+    DESCRIPTION:
+         Get pointers to the 
+         with the schema/type name array. This is similar to OCITypeByName()
+         except that all the TDO's are retreived via a single network roundtrip.
+    RETURNS:
+          OCI_SUCCESS if the function completes successfully.
+          OCI_INVALID_HANDLE if 'env' or 'err' is null. 
+          OCI_ERROR if
+             1) any of the required parameters is null.
+             2) one or more adt types associated with a schema/type name entry
+                does not exist.
+   }
+{$IFNDEF LinkDynamically}
+  function OCITypeArrayByRef(env:POCIEnv; err:POCIError; array_len:ub4; var type_ref:POCIRef; pin_duration:OCIDuration;
+             get_option:OCITypeGetOpt; var tdo:POCIType):sword;cdecl;external ocilib name 'OCITypeArrayByRef';
+{$ELSE}
+  OCITypeArrayByRef : function (env:POCIEnv; err:POCIError; array_len:ub4; var type_ref:POCIRef; pin_duration:OCIDuration;
+             get_option:OCITypeGetOpt; var tdo:POCIType):sword;cdecl;
+{$ENDIF}
+
+  {
+    NAME: OCITypeArrayByRef - OCI Get array of TYPes by REF.
+    PARAMETERS:
+         env (IN/OUT) - OCI environment handle initialized in object mode
+         err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+         array_len (IN) - number of schema_name/type_name/version_name entries to
+                    be retrieved.
+         type_ref (IN) - array of OCIRef * pointing to the particular version of
+                    the type descriptor object to obtain.
+                    The array must have array_len elements if specified.
+         pin_duration (IN) - pin duration (e.g. until the end of current
+                    transaction) for the types retreieve.  See 'oro.h' for a
+                    description of each option.
+         get_option (IN) - options for loading the types. It can be one of two
+                     values:
+                    OCI_TYPEGET_HEADER for only the header to be loaded, or
+                    OCI_TYPEGET_ALL for the TDO and all ADO and MDOs to be
+                      loaded.
+         tdo (OUT) - output array for the pointers to each pinned type in the
+                    object cache. It must have space for array_len pointers.
+                    Use OCIObjectGetObjectRef() to obtain the CREF to each
+                    pinned type descriptor.
+    DESCRIPTION:
+         Get pointers to the 
+         with the schema/type name array. This is similar to OCITypeByName()
+         except that all the TDO's are retreived via a single network roundtrip.
+    RETURNS:
+          OCI_SUCCESS if the function completes successfully.
+          OCI_INVALID_HANDLE if 'env' or 'err' is null. 
+          OCI_ERROR if
+             1) any of the required parameters is null.
+             2) one or more adt types associated with a schema/type name entry
+                does not exist.
+   }
+  {-------------------------------------------------------------------------- }
+  {                              TYPE ACCESSORS                               }
+  {-------------------------------------------------------------------------- }
+  {---------------------------- OCITypeName --------------------------------- }
+  { ** OBSOLETE **  }
+{$IFNDEF LinkDynamically}
+  function OCITypeName(env:POCIEnv; err:POCIError; tdo:POCIType; n_length:Pub4):Poratext;cdecl;external ocilib name 'OCITypeName';
+{$ELSE}
+  OCITypeName : function (env:POCIEnv; err:POCIError; tdo:POCIType; n_length:Pub4):Poratext;cdecl;
+{$ENDIF}
+
+  {
+     NAME: OCITypeName -  ORT Get a Type's naME.
+     PARAMETERS:
+          env (IN/OUT) - OCI environment handle initialized in object mode
+          err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+          tdo (IN) - pointer to to the type descriptor in the object cache
+          n_length (OUT) - length (in bytes) of the returned type name.  The
+                 caller must allocate space for the ub4 before calling this
+                 routine.
+     REQUIRES:
+          1) All type accessors require that the type be pinned before calling
+             any accessor.
+          2) All input parameters must not be NULL and must be valid.
+          3) 'n_length' must point to an allocated ub4.
+     DESCRIPTION:
+          Get the name of the type.
+     RETURNS:
+          the name of the type
+     NOTES:
+          The type descriptor, 'tdo', must be unpinned when the accessed 
+          information is no longer needed.
+    }
+  {------------------------ OCITypeSchema --------------------------------- }
+  { ** OBSOLETE **  }
+{$IFNDEF LinkDynamically}
+  function OCITypeSchema(env:POCIEnv; err:POCIError; tdo:POCIType; n_length:Pub4):Poratext;cdecl;external ocilib name 'OCITypeSchema';
+{$ELSE}
+  OCITypeSchema : function (env:POCIEnv; err:POCIError; tdo:POCIType; n_length:Pub4):Poratext;cdecl;
+{$ENDIF}
+
+  {
+     NAME: OCITypeSchema -  ORT Get a Type's SCHema name.
+     PARAMETERS:
+          env (IN/OUT) - OCI environment handle initialized in object mode
+          err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+          tdo (IN) - pointer to to the type descriptor in the object cache
+          n_length (OUT) - length (in bytes) of the returned schema name.  The
+                 caller must allocate space for the ub4 before calling this
+                 routine.
+     REQUIRES:
+          1) All type accessors require that the type be pinned before calling
+             any accessor. 
+          2) All input parameters must not be NULL and must be valid.
+          3) 'n_length' must point to an allocated ub4.
+     DESCRIPTION:
+          Get the schema name of the type.
+     RETURNS:
+          the schema name of the type
+     NOTES:
+          The type descriptor, 'tdo', must be unpinned when the accessed 
+          information is no longer needed.
+    }
+  {------------------------ OCITypeTypeCode --------------------------------- }
+  { ** OBSOLETE **  }
+{$IFNDEF LinkDynamically}
+  function OCITypeTypeCode(env:POCIEnv; err:POCIError; tdo:POCIType):OCITypeCode;cdecl;external ocilib name 'OCITypeTypeCode';
+{$ELSE}
+  OCITypeTypeCode : function (env:POCIEnv; err:POCIError; tdo:POCIType):OCITypeCode;cdecl;
+{$ENDIF}
+
+  {
+     NAME: OCITypeTypeCode - OCI Get a Type's Type Code.
+     PARAMETERS: 
+          env (IN/OUT) - OCI environment handle initialized in object mode
+          err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+          tdo (IN) - pointer to to the type descriptor in the object cache
+     REQUIRES:
+          1) All type accessors require that the type be pinned before calling 
+             any accessor. 
+          2) All input parameters must not be NULL and must be valid.
+     DESCRIPTION:
+          Get the type code of the type.
+     RETURNS:
+          The type code of the type.
+     NOTES:
+          The type descriptor, 'tdo', must be unpinned when the accessed 
+          information is no longer needed.
+    }
+  {----------------------- OCITypeCollTypeCode ------------------------------- }
+  { ** OBSOLETE **  }
+{$IFNDEF LinkDynamically}
+  function OCITypeCollTypeCode(env:POCIEnv; err:POCIError; tdo:POCIType):OCITypeCode;cdecl;external ocilib name 'OCITypeCollTypeCode';
+{$ELSE}
+  OCITypeCollTypeCode : function (env:POCIEnv; err:POCIError; tdo:POCIType):OCITypeCode;cdecl;
+{$ENDIF}
+
+  {
+     NAME: OCITypeCollTypeCode - OCI Get a Domain Type's Type Code.
+     PARAMETERS: 
+          env (IN/OUT) - OCI environment handle initialized in object mode
+          err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+          tdo (IN) - pointer to to the type descriptor in the object cache
+     REQUIRES:
+          1) All type accessors require that the type be pinned before calling 
+             any accessor. 
+          2) All input parameters must not be NULL and must be valid.
+          3) 'tdo' MUST point to a named collection type.
+     DESCRIPTION:
+          Get the type code of the named collection type. For V8.0, named
+          collection types can only be variable length arrays and nested tables.
+     RETURNS:
+          OCI_TYPECODE_VARRAY for variable length array, and
+          OCI_TYPECODE_TABLE for nested tables.
+     NOTES:
+          The type descriptor, 'tdo', should be unpinned when the accessed 
+          information is no longer needed.
+    }
+  {------------------------- OCITypeVersion --------------------------------- }
+  { ** OBSOLETE **  }
+{$IFNDEF LinkDynamically}
+  function OCITypeVersion(env:POCIEnv; err:POCIError; tdo:POCIType; v_length:Pub4):Poratext;cdecl;external ocilib name 'OCITypeVersion';
+{$ELSE}
+  OCITypeVersion : function (env:POCIEnv; err:POCIError; tdo:POCIType; v_length:Pub4):Poratext;cdecl;
+{$ENDIF}
+
+  {
+     NAME: OCITypeVersion - OCI Get a Type's user-readable VersioN. 
+     PARAMETERS: 
+          env (IN/OUT) - OCI environment handle initialized in object mode
+          err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+          tdo (IN) - pointer to to the type descriptor in the object cache
+          v_length (OUT) - length (in bytes) of the returned user-readable 
+                 version.  The caller must allocate space for the ub4 before 
+                 calling this routine.
+     REQUIRES:
+          1) All type accessors require that the type be pinned before calling 
+             any accessor. 
+          2) All input parameters must not be NULL and must be valid.
+          3) 'v_length' must point to an allocated ub4.
+     DESCRIPTION:
+          Get the user-readable version of the type.
+     RETURNS:
+          The user-readable version of the type
+     NOTES:
+          The type descriptor, 'tdo', must be unpinned when the accessed 
+          information is no longer needed.
+    }
+  {--------------------------- OCITypeAttrs --------------------------------- }
+  { ** OBSOLETE **  }
+{$IFNDEF LinkDynamically}
+  function OCITypeAttrs(env:POCIEnv; err:POCIError; tdo:POCIType):ub4;cdecl;external ocilib name 'OCITypeAttrs';
+{$ELSE}
+  OCITypeAttrs : function (env:POCIEnv; err:POCIError; tdo:POCIType):ub4;cdecl;
+{$ENDIF}
+
+  {
+     NAME: OCITypeAttrs - OCI Get a Type's Number of Attributes. 
+     PARAMETERS: 
+          env (IN/OUT) - OCI environment handle initialized in object mode
+          err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+          tdo (IN) - pointer to to the type descriptor in the object cache
+     REQUIRES:
+          1) All type accessors require that the type be pinned before calling 
+             any accessor. 
+          2) All input parameters must not be NULL and must be valid.
+     DESCRIPTION:
+          Get the number of attributes in the type.
+     RETURNS:
+          The number of attributes in the type. 0 for ALL non-ADTs.
+     NOTES:
+          The type descriptor, 'tdo', must be unpinned when the accessed 
+          information is no longer needed.
+    }
+  {------------------------- OCITypeMethods --------------------------------- }
+  { ** OBSOLETE **  }
+{$IFNDEF LinkDynamically}
+  function OCITypeMethods(env:POCIEnv; err:POCIError; tdo:POCIType):ub4;cdecl;external ocilib name 'OCITypeMethods';
+{$ELSE}
+  OCITypeMethods : function (env:POCIEnv; err:POCIError; tdo:POCIType):ub4;cdecl;
+{$ENDIF}
+
+  {
+     NAME: OCITypeMethods - OCI Get a Type's Number of Methods. 
+     PARAMETERS: 
+          env (IN/OUT) - OCI environment handle initialized in object mode
+          err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+          tdo (IN) - pointer to to the type descriptor in the object cache
+     REQUIRES:
+          1) All type accessors require that the type be pinned before calling 
+             any accessor. 
+          2) All input parameters must not be NULL and must be valid.
+     DESCRIPTION:
+          Get the number of methods in a type.
+     RETURNS:
+          The number of methods in the type
+     NOTES:
+          The type descriptor, 'tdo', must be unpinned when the accessed 
+          information is no longer needed.
+    }
+  {-------------------------------------------------------------------------- }
+  {                     TYPE ELEMENT INFORMATION ACCESSORS                    }
+  {-------------------------------------------------------------------------- }
+  {------------------------ OCITypeElemName --------------------------------- }
+  { ** OBSOLETE **  }
+{$IFNDEF LinkDynamically}
+  function OCITypeElemName(env:POCIEnv; err:POCIError; elem:POCITypeElem; n_length:Pub4):Poratext;cdecl;external ocilib name 'OCITypeElemName';
+{$ELSE}
+  OCITypeElemName : function (env:POCIEnv; err:POCIError; elem:POCITypeElem; n_length:Pub4):Poratext;cdecl;
+{$ENDIF}
+
+  {
+     NAME: OCITypeElemName - OCI Get an Attribute's NaMe. 
+     PARAMETERS: 
+          env (IN/OUT) - OCI environment handle initialized in object mode
+          err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+          elem (IN) - pointer to the type element descriptor in the object cache
+          n_length (OUT) - length (in bytes) of the returned attribute name.  
+                 The caller must allocate space for the ub4 before calling this 
+                 routine.
+     REQUIRES:
+          1) All type accessors require that the type be pinned before calling 
+             any accessor. 
+          2) All input parameters must not be NULL and must be valid.
+          3) 'n_length' must point to an allocated ub4.
+     DESCRIPTION:
+          Get the name of the attribute.
+     RETURNS:
+          the name of the attribute and the length in n_length
+     NOTES:
+          The type must be unpinned when the accessed information is no 
+          longer needed.
+    }
+  {------------------------ OCITypeElemTypeCode ------------------------------ }
+  { ** OBSOLETE **  }
+{$IFNDEF LinkDynamically}
+  function OCITypeElemTypeCode(env:POCIEnv; err:POCIError; elem:POCITypeElem):OCITypeCode;cdecl;external ocilib name 'OCITypeElemTypeCode';
+{$ELSE}
+  OCITypeElemTypeCode : function (env:POCIEnv; err:POCIError; elem:POCITypeElem):OCITypeCode;cdecl;
+{$ENDIF}
+
+  {
+     NAME: OCITypeElemTypeCode - OCI Get an Attribute's TypeCode. 
+     PARAMETERS: 
+          env (IN/OUT) - OCI environment handle initialized in object mode
+          err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+          elem (IN) - pointer to the type element descriptor in the object cache
+     REQUIRES:
+          1) All type accessors require that the type be pinned before calling 
+             any accessor. 
+          2) All input parameters must not be NULL and must be valid.
+     DESCRIPTION:
+          Get the typecode of an attribute's type.
+     RETURNS:
+          the typecode of the attribute's type.  If this is a scalar type, the 
+          typecode sufficiently describes the scalar type and no further calls 
+          need to be made.  Valid scalar types include: OCI_TYPECODE_SIGNED8,
+          OCI_TYPECODE_UNSIGNED8, OCI_TYPECODE_SIGNED16, OCI_TYPECODE_UNSIGNED16,
+          OCI_TYPECODE_SIGNED32, OCI_TYPECODE_UNSIGNED32, OCI_TYPECODE_REAL,
+          OCI_TYPECODE_DOUBLE, OCI_TYPECODE_DATE,
+          OCI_TYPECODE_MLSLABEL, OROTCOID, OCI_TYPECODE_OCTET, or OROTCLOB.
+          This function converts the CREF (stored in the attribute) into a
+          typecode.
+     NOTES:
+         The type must be unpinned when the accessed information is no 
+         longer needed.
+    }
+  {------------------------ OCITypeElemType --------------------------------- }
+  { ** OBSOLETE **  }
+{$IFNDEF LinkDynamically}
+  function OCITypeElemType(env:POCIEnv; err:POCIError; elem:POCITypeElem; var elem_tdo:POCIType):sword;cdecl;external ocilib name 'OCITypeElemType';
+{$ELSE}
+  OCITypeElemType : function (env:POCIEnv; err:POCIError; elem:POCITypeElem; var elem_tdo:POCIType):sword;cdecl;
+{$ENDIF}
+
+  {
+    PARAMETERS
+       env (IN/OUT) - OCI environment handle initialized in object mode
+       err (IN/OUT) - error handle. If there is an error, it is
+               recorded in 'err' and this function returns OCI_ERROR.
+               The error recorded in 'err' can be retrieved by calling
+               OCIErrorGet().
+       elem (IN) - pointer to the type element descriptor in the object cache
+       elem_tdo (OUT) - If the function completes successfully, 'elem_tdo'
+              points to the type descriptor (in the object cache) of the type of
+              the element.
+  
+    REQUIRES
+       1) All type accessors require that the type be pinned before calling
+          any accessor.  This can be done by calling 'OCITypeByName()'.
+       2) if 'elem' is not null, it must point to a valid type element descriptor
+          in the object cache.
+  
+    DESCRIPTION
+       Get the type tdo of the type of this element.
+    RETURNS
+       OCI_SUCCESS if the function completes successfully.
+       OCI_INVALID_HANDLE if 'env' or 'err' is null. 
+       OCI_ERROR if
+           1) any of the parameters is null.
+  
+    NOTES
+       The type must be unpinned when the accessed information is no
+       longer needed.  This can be done by calling 'OCIObjectUnpin()'.
+    }
+  {------------------------- OCITypeElemFlags ------------------------------- }
+  { ** OBSOLETE **  }
+{$IFNDEF LinkDynamically}
+  function OCITypeElemFlags(env:POCIEnv; err:POCIError; elem:POCITypeElem):ub4;cdecl;external ocilib name 'OCITypeElemFlags';
+{$ELSE}
+  OCITypeElemFlags : function (env:POCIEnv; err:POCIError; elem:POCITypeElem):ub4;cdecl;
+{$ENDIF}
+
+  {
+     NAME: OCITypeElemFlags - OCI Get a Elem's FLags
+                                (inline, constant, virtual, constructor,
+                                destructor). 
+     PARAMETERS: 
+          env (IN/OUT) - OCI environment handle initialized in object mode
+          err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+          elem (IN) - pointer to the type element descriptor in the object cache
+     REQUIRES:
+          1) All type accessors require that the type be pinned before calling 
+             any accessor. 
+          2) All input parameters must not be NULL and must be valid.
+     DESCRIPTION:
+          Get the flags of a type element (attribute, parameter).
+     RETURNS:
+          The flags of the type element.
+     NOTES:
+          The flag bits are not externally documented. Use only the macros
+          in the last section (ie. OCI_TYPEPARAM_IS_REQUIRED, and
+          OCI_TYPEELEM_IS_REF) to test for them only. The type must be unpinned
+          when the accessed information is no longer needed.
+    }
+  {------------------------ OCITypeElemNumPrec ------------------------------ }
+  { ** OBSOLETE **  }
+{$IFNDEF LinkDynamically}
+  function OCITypeElemNumPrec(env:POCIEnv; err:POCIError; elem:POCITypeElem):ub1;cdecl;external ocilib name 'OCITypeElemNumPrec';
+{$ELSE}
+  OCITypeElemNumPrec : function (env:POCIEnv; err:POCIError; elem:POCITypeElem):ub1;cdecl;
+{$ENDIF}
+
+  {
+     NAME: OCITypeElemNumPrec - Get a Number's Precision.  This includes float,
+                                decimal, real, double, and oracle number.
+     PARAMETERS: 
+          env (IN/OUT) - OCI environment handle initialized in object mode
+          err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+          elem (IN) - pointer to the type element descriptor in the object cache
+     REQUIRES:
+          All input parameters must not be NULL and must be valid.
+     DESCRIPTION:
+          Get the precision of a float, decimal, long, unsigned long, real, 
+          double, or Oracle number type. 
+     RETURNS:
+          the precision of the float, decimal, long, unsigned long, real, double,
+          or Oracle number 
+    }
+  {------------------------- OCITypeElemNumScale ----------------------------- }
+  { ** OBSOLETE **  }
+{$IFNDEF LinkDynamically}
+  function OCITypeElemNumScale(env:POCIEnv; err:POCIError; elem:POCITypeElem):sb1;cdecl;external ocilib name 'OCITypeElemNumScale';
+{$ELSE}
+  OCITypeElemNumScale : function (env:POCIEnv; err:POCIError; elem:POCITypeElem):sb1;cdecl;
+{$ENDIF}
+
+  {
+     NAME: OCITypeElemNumScale - Get a decimal or oracle Number's Scale 
+     PARAMETERS: 
+          env (IN/OUT) - OCI environment handle initialized in object mode
+          err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+          elem (IN) - pointer to the type element descriptor in the object cache
+     REQUIRES:
+          All input parameters must not be NULL and must be valid.
+     DESCRIPTION:
+          Get the scale of a decimal, or Oracle number type. 
+     RETURNS:
+          the scale of the decimal, or Oracle number 
+    }
+  {------------------------ OCITypeElemLength ------------------------------- }
+  { ** OBSOLETE **  }
+{$IFNDEF LinkDynamically}
+  function OCITypeElemLength(env:POCIEnv; err:POCIError; elem:POCITypeElem):ub4;cdecl;external ocilib name 'OCITypeElemLength';
+{$ELSE}
+  OCITypeElemLength : function (env:POCIEnv; err:POCIError; elem:POCITypeElem):ub4;cdecl;
+{$ENDIF}
+
+  {
+     NAME: OCITypeElemLength - Get a raw, fixed or variable length String's
+                               length in bytes.
+     PARAMETERS: 
+          env (IN/OUT) - OCI environment handle initialized in object mode
+          err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+          elem (IN) - pointer to the type element descriptor in the object cache
+     REQUIRES:
+          All input parameters must not be NULL and must be valid.
+     DESCRIPTION:
+          Get the length of a raw, fixed or variable length string type. 
+     RETURNS:
+          length of the raw, fixed or variable length string
+    }
+  {----------------------- OCITypeElemCharSetID ----------------------------- }
+  { ** OBSOLETE **  }
+{$IFNDEF LinkDynamically}
+  function OCITypeElemCharSetID(env:POCIEnv; err:POCIError; elem:POCITypeElem):ub2;cdecl;external ocilib name 'OCITypeElemCharSetID';
+{$ELSE}
+  OCITypeElemCharSetID : function (env:POCIEnv; err:POCIError; elem:POCITypeElem):ub2;cdecl;
+{$ENDIF}
+
+  {
+     NAME: OCITypeElemCharSetID - Get a fixed or variable length String's
+                                  character set ID
+     PARAMETERS: 
+          env (IN/OUT) - OCI environment handle initialized in object mode
+          err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+          elem (IN) - pointer to the type element descriptor in the object cache
+     REQUIRES:
+          All input parameters must not be NULL and must be valid.
+     DESCRIPTION:
+          Get the character set ID of a fixed or variable length string type. 
+     RETURNS:
+          character set ID of the fixed or variable length string
+    }
+  {---------------------- OCITypeElemCharSetForm ---------------------------- }
+  { ** OBSOLETE **  }
+{$IFNDEF LinkDynamically}
+  function OCITypeElemCharSetForm(env:POCIEnv; err:POCIError; elem:POCITypeElem):ub2;cdecl;external ocilib name 'OCITypeElemCharSetForm';
+{$ELSE}
+  OCITypeElemCharSetForm : function (env:POCIEnv; err:POCIError; elem:POCITypeElem):ub2;cdecl;
+{$ENDIF}
+
+  {
+     NAME: OCITypeElemCharSetForm - Get a fixed or variable length String's
+                                    character set specification form.
+     PARAMETERS: 
+          env (IN/OUT) - OCI environment handle initialized in object mode
+          err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+          elem (IN) - pointer to the attribute information in the object cache
+     REQUIRES:
+          All input parameters must not be NULL and must be valid.
+     DESCRIPTION:
+          Get the character form of a fixed or variable length string type.
+          The character form is an enumerated value that can be one of the
+          4 values below:
+                 SQLCS_IMPLICIT for CHAR, VARCHAR2, CLOB w/o a specified set
+                 SQLCS_NCHAR    for NCHAR, NCHAR VARYING, NCLOB
+                 SQLCS_EXPLICIT for CHAR, etc, with "CHARACTER SET ..." syntax
+                 SQLCS_FLEXIBLE for PL/SQL "flexible" parameters
+     RETURNS:
+          character form of the fixed or variable string
+    }
+  {--------------------- OCITypeElemParameterizedType ------------------------ }
+  { ** OBSOLETE **  }
+{$IFNDEF LinkDynamically}
+  function OCITypeElemParameterizedType(env:POCIEnv; err:POCIError; elem:POCITypeElem; var type_stored:POCIType):sword;cdecl;external ocilib name 'OCITypeElemParameterizedType';
+{$ELSE}
+  OCITypeElemParameterizedType : function (env:POCIEnv; err:POCIError; elem:POCITypeElem; var type_stored:POCIType):sword;cdecl;
+{$ENDIF}
+
+  {
+     NAME: OCITypeElemParameterizedType 
+     PARAMETERS: 
+          env (IN/OUT) - OCI environment handle initialized in object mode
+          err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+          elem (IN) - pointer to the type element descriptor in the object cache
+          type_stored (OUT) - If the function completes successfully, 
+                 and the parameterized type is complex, 'type_stored' is NULL.
+                 Otherwise, 'type_stored' points to the type descriptor (in the 
+                 object cache) of the type that is stored in the parameterized 
+                 type.  The caller must allocate space for the OCIType* 
+                 before calling this routine and must not write into the space.
+     REQUIRES:
+          All input parameters must be valid.
+     DESCRIPTION:
+          Get a descriptor to the parameter type of a parameterized type.
+          Parameterized types are types of the form:
+            REF T
+            VARRAY (n) OF T
+          etc, where T is the parameter in the parameterized type.
+          Additionally is_ref is set if the parameter is a PTR or REF.
+          For example, it is set for REF T or VARRAY(n) OF REF T.
+     RETURNS:
+          OCI_SUCCESS if the function completes successfully.
+          OCI_INVALID_HANDLE if 'env' or 'err' is null. 
+          OCI_ERROR if
+              1) any of the parameters is null.
+              2) 'type_stored' is not NULL but points to NULL data.
+     NOTES:
+          Complex parameterized types will be in a future release (once 
+          typedefs are supported.  When setting the parameterized type 
+          information, the user must typedef the contents if it's a
+          complex parameterized type.  Ex. for varray<varray<car>>, use
+          'typedef varray<car> varcar' and then use varray<varcar>. 
+    }
+  {----------------------- OCITypeElemExtTypeCode ---------------------------- }
+  { ** OBSOLETE **  }
+{$IFNDEF LinkDynamically}
+  function OCITypeElemExtTypeCode(env:POCIEnv; err:POCIError; elem:POCITypeElem):OCITypeCode;cdecl;external ocilib name 'OCITypeElemExtTypeCode';
+{$ELSE}
+  OCITypeElemExtTypeCode : function (env:POCIEnv; err:POCIError; elem:POCITypeElem):OCITypeCode;cdecl;
+{$ENDIF}
+
+  {
+     NAME: OCITypeElemExtTypeCode - OCI Get an element's SQLT constant.
+     PARAMETERS:
+          env (IN/OUT) - OCI environment handle initialized in object mode
+          err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+          elem (IN) - pointer to the type element descriptor in the object cache
+     REQUIRES:
+          1) All type accessors require that the type be pinned before calling
+             any accessor.
+          2) All input parameters must not be NULL and must be valid.
+     DESCRIPTION:
+          Get the internal Oracle typecode associated with an attribute's type.
+          This is the actual typecode for the attribute when it gets mapped
+          to a column in the Oracle database.
+     RETURNS:
+          The Oracle typecode associated with the attribute's type.
+     NOTES:
+          The type must be unpinned when the accessed information is no
+          longer needed.
+    }
+  {-------------------------------------------------------------------------- }
+  {                           ATTRIBUTE ACCESSORS                             }
+  {-------------------------------------------------------------------------- }
+  {------------------------ OCITypeAttrByName ------------------------------- }
+  { ** OBSOLETE **  }
+{$IFNDEF LinkDynamically}
+  function OCITypeAttrByName(env:POCIEnv; err:POCIError; tdo:POCIType; name:Poratext; n_length:ub4;
+             var elem:POCITypeElem):sword;cdecl;external ocilib name 'OCITypeAttrByName';
+{$ELSE}
+  OCITypeAttrByName : function (env:POCIEnv; err:POCIError; tdo:POCIType; name:Poratext; n_length:ub4;
+             var elem:POCITypeElem):sword;cdecl;
+{$ENDIF}
+
+  {
+     NAME: OCITypeAttrByName - OCI Get an Attribute By Name. 
+     PARAMETERS: 
+          env (IN/OUT) - OCI environment handle initialized in object mode
+          err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+          tdo (IN) - pointer to to the type descriptor in the object cache
+          name (IN) - the attribute's name 
+          n_length (IN) - length (in bytes) of the 'name' parameter
+          elem (OUT) - If this function completes successfully, 'elem' points to 
+                 the selected type element descriptor pertaining to the
+                 attributein the object cache.
+     REQUIRES:
+          1) All type accessors require that the type be pinned before calling 
+             any accessor. 
+          2) if 'tdo' is not null, it must point to a valid type descriptor 
+             in the object cache.
+     DESCRIPTION:
+          Get an attribute given its name.  
+     RETURNS:
+          OCI_SUCCESS if the function completes successfully.
+          OCI_INVALID_HANDLE if 'env' or 'err' is null. 
+          OCI_ERROR if
+              1) any of the required parameters is null.
+              2) the type does not contain an attribute with the input 'name'. 
+              3) 'name' is NULL.
+     NOTES:
+          The type descriptor, 'tdo', must be unpinned when the accessed 
+          information is no longer needed.
+          Schema and type names are CASE-SENSITIVE. If they have been created
+          via SQL, you need to use uppercase names.
+    }
+  {------------------------ OCITypeAttrNext --------------------------------- }
+  { ** OBSOLETE **  }
+{$IFNDEF LinkDynamically}
+  function OCITypeAttrNext(env:POCIEnv; err:POCIError; iterator_ort:POCITypeIter; var elem:POCITypeElem):sword;cdecl;external ocilib name 'OCITypeAttrNext';
+{$ELSE}
+  OCITypeAttrNext : function (env:POCIEnv; err:POCIError; iterator_ort:POCITypeIter; var elem:POCITypeElem):sword;cdecl;
+{$ENDIF}
+
+  {
+     NAME: OCITypeAttrNext - OCI Get an Attribute By Iteration.
+     PARAMETERS: 
+          env (IN/OUT) - OCI environment handle initialized in object mode
+          err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+          iterator_ort (IN/OUT) - iterator for retrieving the next attribute;
+                 see OCITypeIterNew() to initialize iterator.
+          elem (OUT) - If this function completes successfully, 'elem' points to 
+                 the selected type element descriptor pertaining to the
+                 attributein the object cache.
+     REQUIRES:
+          1) All type accessors require that the type be pinned before calling 
+              any accessor. 
+          2) if 'tdo' is not null, it must point to a valid type descriptor 
+             in the object cache.
+     DESCRIPTION:
+          Iterate to the next attribute to retrieve.
+     RETURNS:
+          OCI_SUCCESS if the function completes successfully.
+          OCI_NO_DATA if there are no more attributes to iterate on; use
+              OCITypeIterSet() to reset the iterator if necessary.
+          OCI_INVALID_HANDLE if 'env' or 'err' is null. 
+          OCI_ERROR if
+              1) any of the required parameters is null.
+     NOTES:
+          The type must be unpinned when the accessed information is no 
+          longer needed.
+    }
+  {-------------------------------------------------------------------------- }
+  {                           COLLECTION ACCESSORS                            }
+  {-------------------------------------------------------------------------- }
+  {------------------------ OCITypeCollElem --------------------------------- }
+  { ** OBSOLETE **  }
+{$IFNDEF LinkDynamically}
+  function OCITypeCollElem(env:POCIEnv; err:POCIError; tdo:POCIType; var element:POCITypeElem):sword;cdecl;external ocilib name 'OCITypeCollElem';
+{$ELSE}
+  OCITypeCollElem : function (env:POCIEnv; err:POCIError; tdo:POCIType; var element:POCITypeElem):sword;cdecl;
+{$ENDIF}
+
+  {
+     NAME: OCITypeCollElem
+     PARAMETERS: 
+          env (IN/OUT) - OCI environment handle initialized in object mode
+          err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+          tdo (IN) - pointer to the type descriptor in the object cache
+          element (IN/OUT) - If the function completes successfully, this
+                 points to the descriptor for the collection's element.
+                 It is stored in the same format as an ADT attribute's
+                 descriptor.
+                 If *element is NULL, OCITypeCollElem() implicitly allocates a
+                 new instance of OCITypeElem in the object cache. This instance
+                 will be
+                 automatically freed at the end of the session, and does not have
+                 to be freed explicitly.
+                 If *element is not NULL, OCITypeCollElem() assumes that it
+                 points to a valid OCITypeElem descriptor and will copy the
+                 results into it.
+     REQUIRES:
+          All input parameters must be valid.
+     DESCRIPTION:
+          Get a pointer to the descriptor (OCITypeElem) of the element of an
+          array or the rowtype of a nested table.
+     RETURNS:
+          OCI_SUCCESS if the function completes successfully.
+          OCI_INVALID_HANDLE if 'env' or 'err' is null. 
+          OCI_ERROR if
+              1) any of the parameters is null.
+              2) the type TDO does not point to a valid collection's type.
+     NOTES:
+          Complex parameterized types will be in a future release (once 
+          typedefs are supported.  When setting the parameterized type 
+          information, the user must typedef the contents if it's a
+          complex parameterized type.  Ex. for varray<varray<car>>, use
+          'typedef varray<car> varcar' and then use varray<varcar>. 
+    }
+  {------------------------ OCITypeCollSize --------------------------------- }
+  { ** OBSOLETE **  }
+{$IFNDEF LinkDynamically}
+  function OCITypeCollSize(env:POCIEnv; err:POCIError; tdo:POCIType; num_elems:Pub4):sword;cdecl;external ocilib name 'OCITypeCollSize';
+{$ELSE}
+  OCITypeCollSize : function (env:POCIEnv; err:POCIError; tdo:POCIType; num_elems:Pub4):sword;cdecl;
+{$ENDIF}
+
+  {
+     NAME: OCITypeCollSize - OCI Get a Collection's Number of Elements.
+     PARAMETERS: 
+          env (IN/OUT) - OCI environment handle initialized in object mode
+          err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+          tdo (IN) - pointer to the type descriptor in the object cache
+          num_elems (OUT) - number of elements in collection
+     REQUIRES:
+          All input parameters must be valid. tdo points to an array type
+          defined as a domain.
+     DESCRIPTION:
+          Get the number of elements stored in a fixed array or the maximum 
+          number of elements in a variable array.
+     RETURNS:
+          OCI_SUCCESS if the function completes successfully.
+          OCI_INVALID_HANDLE if 'env' or 'err' is null. 
+          OCI_ERROR if
+              1) any of the parameters is null.
+              2) 'tdo' does not point to a domain with a collection type.
+     NOTES:
+          Complex parameterized types will be in a future release (once 
+          typedefs are supported.  When setting the parameterized type 
+          information, the user must typedef the contents if it's a
+          complex parameterized type.  Ex. for varray<varray<car>>, use
+          'typedef varray<car> varcar' and then use varray<varcar>. 
+    }
+  {------------------------ OCITypeCollExtTypeCode --------------------------- }
+  { ** OBSOLETE **  }
+{$IFNDEF LinkDynamically}
+  function OCITypeCollExtTypeCode(env:POCIEnv; err:POCIError; tdo:POCIType; sqt_code:POCITypeCode):sword;cdecl;external ocilib name 'OCITypeCollExtTypeCode';
+{$ELSE}
+  OCITypeCollExtTypeCode : function (env:POCIEnv; err:POCIError; tdo:POCIType; sqt_code:POCITypeCode):sword;cdecl;
+{$ENDIF}
+
+  {
+     NAME: ortcsqt - OCI Get a Collection element's DTY constant.
+     PARAMETERS:
+          env (IN/OUT) - OCI environment handle initialized in object mode
+          err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+          tdo (IN) - pointer to the type descriptor in the object cache
+          sqt_code (OUT) - SQLT code of type element.
+     REQUIRES:
+          1) All type accessors require that the type be pinned before calling
+             any accessor.
+          2) All input parameters must not be NULL and must be valid.
+     DESCRIPTION:
+          Get the SQLT constant associated with an domain's element type.
+          The SQLT codes are defined in <sqldef.h> and are needed for OCI/OOCI
+          use.
+     RETURNS:
+          OCI_SUCCESS if the function completes successfully.
+          OCI_INVALID_HANDLE if 'env' or 'err' is null.
+          OCI_ERROR if
+              1) any of the parameters is null.
+              2) 'tdo' does not point to a domain with a collection type.
+     NOTES:
+          The type must be unpinned when the accessed information is no
+          longer needed.
+    }
+  {-------------------------------------------------------------------------- }
+  {                             METHOD ACCESSORS                              }
+  {-------------------------------------------------------------------------- }
+  {------------------------- OCITypeMethodOverload -------------------------- }
+  { ** OBSOLETE **  }
+{$IFNDEF LinkDynamically}
+  function OCITypeMethodOverload(env:POCIEnv; err:POCIError; tdo:POCIType; method_name:Poratext; m_length:ub4):ub4;cdecl;external ocilib name 'OCITypeMethodOverload';
+{$ELSE}
+  OCITypeMethodOverload : function (env:POCIEnv; err:POCIError; tdo:POCIType; method_name:Poratext; m_length:ub4):ub4;cdecl;
+{$ENDIF}
+
+  {
+     NAME: OCITypeMethodOverload - OCI Get type's Number of Overloaded names
+                                   for the given method name.
+     PARAMETERS:
+          gp (IN/OUT) - pga environment handle.  Any errors are recorded here.
+          tdo (IN) - pointer to to the type descriptor in the object cache
+          method_name (IN) - the method's name
+          m_length (IN) - length (in bytes) of the 'method_name' parameter
+     REQUIRES:
+          1) All type accessors require that the type be pinned before calling
+             any accessor.
+          2) if 'tdo' is not null, it must point to a valid type descriptor
+             in the object cache.
+     DESCRIPTION:
+          Overloading of methods implies that more than one method may have the
+          same method name.  This routine returns the number of methods that
+          have the given method name.  If there are no methods with the input
+          method name, 'num_methods' is 0.  The caller uses this information when
+          allocating space for the array of mdo and/or position pointers before
+          calling 'OCITypeMethodByName()' or 'ortgmps()'.
+     RETURNS:
+          The number of methods with the given name. 0 if none contains the
+          name.
+     NOTES:
+          Schema and type names are CASE-SENSITIVE. If they have been created
+          via SQL, you need to use uppercase names.
+    }
+  {------------------------ OCITypeMethodByName ------------------------------ }
+  { ** OBSOLETE **  }
+{$IFNDEF LinkDynamically}
+  function OCITypeMethodByName(env:POCIEnv; err:POCIError; tdo:POCIType; method_name:Poratext; m_length:ub4;
+             var mdos:POCITypeMethod):sword;cdecl;external ocilib name 'OCITypeMethodByName';
+{$ELSE}
+  OCITypeMethodByName : function (env:POCIEnv; err:POCIError; tdo:POCIType; method_name:Poratext; m_length:ub4;
+             var mdos:POCITypeMethod):sword;cdecl;
+{$ENDIF}
+
+  {
+     NAME: OCITypeMethodByName - OCI Get one or more Methods with Name. 
+     PARAMETERS: 
+          env (IN/OUT) - OCI environment handle initialized in object mode
+          err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+          tdo (IN) - pointer to to the type descriptor in the object cache
+          method_name (IN) - the methods' name  
+          m_length (IN) - length (in bytes) of the 'name' parameter
+          mdos (OUT) - If this function completes successfully, 'mdos' points to
+                  the selected methods in the object cache.  The caller must
+                  allocate space for the array of OCITypeMethod pointers before
+                  calling this routine and must not write into the space.
+                  The number of OCITypeMethod pointers that will be returned can
+                  be obtained by calling 'OCITypeMethodOverload()'.
+     REQUIRES:
+          1) All type accessors require that the type be pinned before calling 
+             any accessor. 
+          2) if 'tdo' is not null, it must point to a valid type descriptor 
+             in the object cache.
+     DESCRIPTION:
+          Get one or more methods given the name.  
+     RETURNS:
+          OCI_SUCCESS if the function completes successfully.
+          OCI_INVALID_HANDLE if 'env' or 'err' is null. 
+          OCI_ERROR if
+              1) any of the required parameters is null.
+              2) No methods in type has name 'name'.
+              3) 'mdos' is not NULL but points to NULL data.
+     NOTES:
+          The type must be unpinned when the accessed information is no 
+          longer needed.
+          Schema and type names are CASE-SENSITIVE. If they have been created
+          via SQL, you need to use uppercase names.
+    }
+  {------------------------ OCITypeMethodNext -------------------------------- }
+  { ** OBSOLETE **  }
+{$IFNDEF LinkDynamically}
+  function OCITypeMethodNext(env:POCIEnv; err:POCIError; iterator_ort:POCITypeIter; var mdo:POCITypeMethod):sword;cdecl;external ocilib name 'OCITypeMethodNext';
+{$ELSE}
+  OCITypeMethodNext : function (env:POCIEnv; err:POCIError; iterator_ort:POCITypeIter; var mdo:POCITypeMethod):sword;cdecl;
+{$ENDIF}
+
+  {
+     NAME: OCITypeMethodNext - OCI Get a Method By Iteration.
+     PARAMETERS: 
+          env (IN/OUT) - OCI environment handle initialized in object mode
+          err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+          iterator_ort (IN/OUT) - iterator for retrieving the next method;
+                 see OCITypeIterNew() to set iterator.
+          mdo (OUT) - If this function completes successfully, 'mdo' points to 
+                 the selected method descriptor in the object cache.  Positions 
+                 start at 1.  The caller must allocate space for the
+                 OCITypeMethod* before calling this routine and must not write 
+                 nto the space. 
+     REQUIRES:
+           1) All type accessors require that the type be pinned before calling 
+              any accessor. 
+          2) if 'tdo' is not null, it must point to a valid type descriptor 
+             in the object cache.
+     DESCRIPTION:
+          Iterate to the next method to retrieve.
+     RETURNS:
+          OCI_SUCCESS if the function completes successfully.
+          OCI_NO_DATA if there are no more attributes to iterate on; use
+              OCITypeIterSet() to reset the iterator if necessary.
+          OCI_INVALID_HANDLE if 'env' or 'err' is null. 
+          OCI_ERROR if
+              1) any of the required parameters is null.
+              2) 'mdo' is not NULL but points to NULL data.
+     NOTES:
+          The type must be unpinned when the accessed information is no 
+          longer needed.
+    }
+  {------------------------ OCITypeMethodName -------------------------------- }
+  { ** OBSOLETE **  }
+{$IFNDEF LinkDynamically}
+  function OCITypeMethodName(env:POCIEnv; err:POCIError; mdo:POCITypeMethod; n_length:Pub4):Poratext;cdecl;external ocilib name 'OCITypeMethodName';
+{$ELSE}
+  OCITypeMethodName : function (env:POCIEnv; err:POCIError; mdo:POCITypeMethod; n_length:Pub4):Poratext;cdecl;
+{$ENDIF}
+
+  {
+     NAME: OCITypeMethodName - OCI Get a Method's NaMe. 
+     PARAMETERS: 
+          env (IN/OUT) - OCI environment handle initialized in object mode
+          err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+          mdo (IN) - pointer to the method descriptor in the object cache
+          n_length (OUT) - length (in bytes) of the 'name' parameter.  The caller
+                 must allocate space for the ub4 before calling this routine.
+     REQUIRES:
+          1) All type accessors require that the type be pinned before calling 
+             any accessor. 
+          2) All input parameters must not be NULL and must be valid.
+     DESCRIPTION:
+          Get the (non-unique) real name of the method.
+     RETURNS:
+          the non-unique name of the method or NULL if there is an error.
+     NOTES:
+          The type must be unpinned when the accessed information is no 
+          longer needed.
+    }
+  {------------------------ OCITypeMethodEncap ------------------------------- }
+  { ** OBSOLETE **  }
+{$IFNDEF LinkDynamically}
+  function OCITypeMethodEncap(env:POCIEnv; err:POCIError; mdo:POCITypeMethod):OCITypeEncap;cdecl;external ocilib name 'OCITypeMethodName';
+{$ELSE}
+  OCITypeMethodEncap : function (env:POCIEnv; err:POCIError; mdo:POCITypeMethod):OCITypeEncap;cdecl;
+{$ENDIF}
+
+  {
+     NAME: OCITypeMethodEncap - Get a Method's ENcapsulation (private/public). 
+     PARAMETERS: 
+          env (IN/OUT) - OCI environment handle initialized in object mode
+          err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+          mdo (IN) - pointer to the method descriptor in the object cache
+     REQUIRES:
+          1) All type accessors require that the type be pinned before calling 
+             any accessor. 
+          2) All input parameters must not be NULL and must be valid.
+     DESCRIPTION:
+          Get the encapsulation (private, or public) of a method.
+     RETURNS:
+          the encapsulation (private, or public) of the method
+     NOTES:
+          The type must be unpinned when the accessed information is no 
+          longer needed.
+    }
+  {------------------------ OCITypeMethodFlags ------------------------------- }
+  { ** OBSOLETE **  }
+{$IFNDEF LinkDynamically}
+  function OCITypeMethodFlags (env:POCIEnv; err:POCIError; mdo:POCITypeMethod):OCITypeMethodFlag;cdecl;external ocilib name 'OCITypeMethodEncap';
+{$ELSE}
+  OCITypeMethodFlags : function (env:POCIEnv; err:POCIError; mdo:POCITypeMethod):OCITypeMethodFlag;cdecl;
+{$ENDIF}
+
+  {
+     NAME: OCITypeMethodFlags - OCI Get a Method's FLags
+                                (inline, constant, virtual, constructor,
+                                destructor). 
+     PARAMETERS: 
+          env (IN/OUT) - OCI environment handle initialized in object mode
+          err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+          mdo (IN) - pointer to the method descriptor in the object cache
+     REQUIRES:
+          1) All type accessors require that the type be pinned before calling 
+             any accessor. 
+          2) All input parameters must not be NULL and must be valid.
+     DESCRIPTION:
+          Get the flags (inline, constant, virutal, constructor, destructor) of
+          a method.
+     RETURNS:
+          the flags (inline, constant, virutal, constructor, destructor) of
+          the method
+     NOTES:
+          The type must be unpinned when the accessed information is no 
+          longer needed.
+    }
+  {------------------------ OCITypeMethodMap --------------------------------- }
+  { ** OBSOLETE **  }
+{$IFNDEF LinkDynamically}
+  function OCITypeMethodMap(env:POCIEnv; err:POCIError; tdo:POCIType; var mdo:POCITypeMethod):sword;cdecl;external ocilib name 'OCITypeMethodMap';
+{$ELSE}
+  OCITypeMethodMap : function (env:POCIEnv; err:POCIError; tdo:POCIType; var mdo:POCITypeMethod):sword;cdecl;
+{$ENDIF}
+
+  {
+     NAME: OCITypeMethodMap - OCI Get the Method's MAP function.
+     PARAMETERS: 
+          env (IN/OUT) - OCI environment handle initialized in object mode
+          err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+          tdo (IN) - pointer to to the type descriptor in the object cache
+          mdo (OUT) - If this function completes successfully, and there is a 
+                 map function for this type, 'mdo' points to the selected method 
+                 descriptor in the object cache.  Otherwise, 'mdo' is null.
+     REQUIRES:
+          1) All type accessors require that the type be pinned before calling 
+             any accessor. 
+          2) All required input parameters must not be NULL and must be valid.
+     DESCRIPTION:
+          A type may have only one map function.  'OCITypeMethodMap()' finds
+          this function, if it exists, and returns a reference and a pointer to
+          the method descriptor in the object cache.  If the type does not have a
+          map (relative ordering) function, then 'mdo_ref' and 'mdo' are set
+          to null and an error is returned.
+     RETURNS:
+          OCI_SUCCESS if the function completes successfully.
+          OCI_INVALID_HANDLE if 'env' or 'err' is null. 
+          OCI_ERROR if
+              the type does not contain a map function.
+     NOTES:
+          The type must be unpinned when the accessed information is no 
+          longer needed.
+    }
+  {------------------------ OCITypeMethodOrder ------------------------------- }
+  { ** OBSOLETE **  }
+{$IFNDEF LinkDynamically}
+  function OCITypeMethodOrder(env:POCIEnv; err:POCIError; tdo:POCIType; var mdo:POCITypeMethod):sword;cdecl;external ocilib name 'OCITypeMethodOrder';
+{$ELSE}
+  OCITypeMethodOrder : function (env:POCIEnv; err:POCIError; tdo:POCIType; var mdo:POCITypeMethod):sword;cdecl;
+{$ENDIF}
+
+  {
+     NAME: OCITypeMethodOrder - OCI Get the Method's ORder function.
+     PARAMETERS: 
+          env (IN/OUT) - OCI environment handle initialized in object mode
+          err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+          tdo (IN) - pointer to to the type descriptor in the object cache
+          mdo (OUT) - If this function completes successfully, and there is a 
+                 map function for this type, 'mdo' points to the selected method 
+                 descriptor in the object cache.  Otherwise, 'mdo' is null.
+     REQUIRES:
+          1) All type accessors require that the type be pinned before calling 
+             any accessor. 
+          2) All required input parameters must not be NULL and must be valid.
+     DESCRIPTION:
+          A type may have only one ORder or MAP function. 'OCITypeMethodOrder()'
+          finds this function, if it exists, and returns a ref and a pointer
+          to the method descriptor in the object cache.  If the type does not
+          have a map (relative ordering) function, then 'mdo_ref' and 'mdo' are
+          set to null and an error is returned.
+     RETURNS:
+          OCI_SUCCESS if the function completes successfully.
+          OCI_INVALID_HANDLE if 'env' or 'err' is null. 
+          OCI_ERROR if
+              the type does not contain a map function.
+     NOTES:
+          The type must be unpinned when the accessed information is no 
+          longer needed.
+    }
+  {------------------------ OCITypeMethodParams ------------------------------ }
+  { ** OBSOLETE **  }
+{$IFNDEF LinkDynamically}
+  function OCITypeMethodParams(env:POCIEnv; err:POCIError; mdo:POCITypeMethod):ub4;cdecl;external ocilib name 'OCITypeMethodParams';
+{$ELSE}
+  OCITypeMethodParams : function (env:POCIEnv; err:POCIError; mdo:POCITypeMethod):ub4;cdecl;
+{$ENDIF}
+
+  {
+     NAME: OCITypeMethodParams - OCI Get a Method's Number of Parameters. 
+     PARAMETERS: 
+          env (IN/OUT) - OCI environment handle initialized in object mode
+          err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+          mdo (IN) - pointer to the method descriptor in the object cache
+     REQUIRES:
+          1) All type accessors require that the type be pinned before calling 
+             any accessor. 
+          2) All input parameters must not be NULL and must be valid.
+     DESCRIPTION:
+          Get the number of parameters in a method.
+     RETURNS:
+          the number of parameters in the method
+     NOTES:
+          The type must be unpinned when the accessed information is no 
+          longer needed.
+    }
+  {-------------------------------------------------------------------------- }
+  {                             RESULT ACCESSORS                              }
+  {-------------------------------------------------------------------------- }
+  {-------------------------- OCITypeResult --------------------------------- }
+  { ** OBSOLETE **  }
+{$IFNDEF LinkDynamically}
+  function OCITypeResult(env:POCIEnv; err:POCIError; mdo:POCITypeMethod; var elem:POCITypeElem):sword;cdecl;external ocilib name 'OCITypeResult';
+{$ELSE}
+  OCITypeResult : function (env:POCIEnv; err:POCIError; mdo:POCITypeMethod; var elem:POCITypeElem):sword;cdecl;
+{$ENDIF}
+
+  {
+     NAME: OCITypeResult - OCI Get a method's result type descriptor.
+     PARAMETERS: 
+          env (IN/OUT) - OCI environment handle initialized in object mode
+          err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+          mdo (IN) - pointer to the method descriptor in the object cache
+          elem (OUT) - If this function completes successfully, 'rdo' points to 
+                 the selected result (parameter) descriptor in the object cache.
+     REQUIRES:
+          1) All type accessors require that the type be pinned before calling 
+             any accessor.
+          2) 'elem' MUST be the address of an OCITypeElem pointer.
+     DESCRIPTION:
+          Get the result of a method.
+     RETURNS:
+          OCI_SUCCESS if the function completes successfully.
+          OCI_INVALID_HANDLE if 'env' or 'err' is null. 
+          OCI_ERROR if
+              1) any of the required parameters is null.
+              2) method returns no results.
+     NOTES:
+          The method must be unpinned when the accessed information is no 
+          longer needed.
+    }
+  {-------------------------------------------------------------------------- }
+  {                           PARAMETER ACCESSORS                             }
+  {-------------------------------------------------------------------------- }
+  {------------------------ OCITypeParamByPos ------------------------------- }
+  { ** OBSOLETE **  }
+{$IFNDEF LinkDynamically}
+  function OCITypeParamByPos(env:POCIEnv; err:POCIError; mdo:POCITypeMethod; position:ub4; var elem:POCITypeElem):sword;cdecl;external ocilib name 'OCITypeParamByPos';
+{$ELSE}
+  OCITypeParamByPos : function (env:POCIEnv; err:POCIError; mdo:POCITypeMethod; position:ub4; var elem:POCITypeElem):sword;cdecl;
+{$ENDIF}
+
+  {
+     NAME: OCITypeParamByPos - OCI Get a Parameter in a method By Position. 
+     PARAMETERS: 
+          env (IN/OUT) - OCI environment handle initialized in object mode
+          err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+          mdo (IN) - pointer to the method descriptor in the object cache
+          position (IN) - the parameter's position.  Positions start at 1.
+          elem (OUT) - If this function completes successfully, 'elem' points to 
+                 the selected parameter descriptor in the object cache.
+     REQUIRES:
+          1) All type accessors require that the type be pinned before calling 
+             any accessor. 
+     DESCRIPTION:
+          Get a parameter given its position in the method.  Positions start 
+          at 1.  
+     RETURNS:
+          OCI_SUCCESS if the function completes successfully.
+          OCI_INVALID_HANDLE if 'env' or 'err' is null. 
+          OCI_ERROR if
+              1) any of the required parameters is null.
+              2) 'position' is not >= 1 and <= the number of parameters in the
+                 method.
+     NOTES:
+          The type must be unpinned when the accessed information is no 
+          longer needed.
+    }
+  {------------------------ OCITypeParamByName ------------------------------- }
+  { ** OBSOLETE **  }
+{$IFNDEF LinkDynamically}
+  function OCITypeParamByName(env:POCIEnv; err:POCIError; mdo:POCITypeMethod; name:Poratext; n_length:ub4;
+             var elem:POCITypeElem):sword;cdecl;external ocilib name 'OCITypeParamByName';
+{$ELSE}
+  OCITypeParamByName : function (env:POCIEnv; err:POCIError; mdo:POCITypeMethod; name:Poratext; n_length:ub4;
+             var elem:POCITypeElem):sword;cdecl;
+{$ENDIF}
+
+  {
+     NAME: OCITypeParamByName - OCI Get a Parameter in a method By Name. 
+     PARAMETERS: 
+          env (IN/OUT) - OCI environment handle initialized in object mode
+          err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+          mdo (IN) - pointer to the method descriptor in the object cache
+          name (IN) - the parameter's name
+          n_length (IN) - length (in bytes) of the 'name' parameter
+          elem (OUT) - If this function completes successfully, 'elem' points to 
+                 the selected parameter descriptor in the object cache.
+     REQUIRES:
+          1) All type accessors require that the type be pinned before calling 
+             any accessor. 
+          2) if 'mdo' is not null, it must point to a valid method descriptor 
+             in the object cache.
+     DESCRIPTION:
+          Get a parameter given its name.  
+     RETURNS:
+          OCI_SUCCESS if the function completes successfully.
+          OCI_INVALID_HANDLE if 'env' or 'err' is null. 
+          OCI_ERROR if
+              1) any of the required parameters is null.
+              2) the method does not contain a parameter with the input 'name'. 
+     NOTES:
+          The type must be unpinned when the accessed information is no 
+          longer needed.
+    }
+  {------------------------ OCITypeParamPos --------------------------------- }
+  { ** OBSOLETE **  }
+{$IFNDEF LinkDynamically}
+  function OCITypeParamPos(env:POCIEnv; err:POCIError; mdo:POCITypeMethod; name:Poratext; n_length:ub4;
+             position:Pub4; var elem:POCITypeElem):sword;cdecl;external ocilib name 'OCITypeParamPos';
+{$ELSE}
+  OCITypeParamPos : function (env:POCIEnv; err:POCIError; mdo:POCITypeMethod; name:Poratext; n_length:ub4;
+             position:Pub4; var elem:POCITypeElem):sword;cdecl;
+{$ENDIF}
+
+  {
+     NAME: OCITypeParamPos - OCI Get a parameter's position in a method
+     PARAMETERS: 
+          env (IN/OUT) - OCI environment handle initialized in object mode
+          err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+          mdo (IN) - pointer to the method descriptor in the object cache
+          name (IN) - the parameter's name
+          n_length (IN) - length (in bytes) of the 'name' parameter
+          position (OUT) - If this function completes successfully, 'position' 
+                 points to the position of the parameter in the method starting 
+                 at position 1. position MUST point to space for a ub4.
+          elem (OUT) - If this function completes successfully, and 
+                 the input 'elem' is not NULL, 'elem' points to the selected 
+                 parameter descriptor in the object cache.
+     REQUIRES:
+          1) All type accessors require that the type be pinned before calling 
+             any accessor. 
+          2) if 'mdo' is not null, it must point to a valid method descriptor 
+             in the object cache.
+     DESCRIPTION:
+          Get the position of a parameter in a method.  Positions start at 1.
+     RETURNS:
+          OCI_SUCCESS if the function completes successfully.
+          OCI_INVALID_HANDLE if 'env' or 'err' is null. 
+          OCI_ERROR if
+              1) any of the parameters is null.
+              2) the method does not contain a parameter with the input 'name'. 
+     NOTES:
+          The type must be unpinned when the accessed information is no 
+          longer needed.
+    }
+  {------------------------ OCITypeParamElemMode ----------------------------- }
+  { ** OBSOLETE **  }
+{$IFNDEF LinkDynamically}
+  function OCITypeElemParamMode(env:POCIEnv; err:POCIError; elem:POCITypeElem):OCITypeParamMode;cdecl;external ocilib name 'OCITypeElemParamMode';
+{$ELSE}
+  OCITypeElemParamMode : function (env:POCIEnv; err:POCIError; elem:POCITypeElem):OCITypeParamMode;cdecl;
+{$ENDIF}
+
+  {
+     NAME: OCITypeElemParamMode - OCI Get a parameter's mode
+     PARAMETERS: 
+          env (IN/OUT) - OCI environment handle initialized in object mode
+          err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+          elem (IN) - pointer to the parameter descriptor in the object cache
+                  (represented by an OCITypeElem)
+     REQUIRES:
+          1) All type accessors require that the type be pinned before calling 
+             any accessor. 
+          2) All input parameters must not be NULL and must be valid.
+     DESCRIPTION:
+          Get the mode (in, out, or in/out) of the parameter.
+     RETURNS:
+          the mode (in, out, or in/out) of the parameter
+     NOTES:
+          The type must be unpinned when the accessed information is no 
+          longer needed.
+    }
+  {------------------------- OCITypeElemDefaultValue ------------------------- }
+  { ** OBSOLETE **  }
+{$IFNDEF LinkDynamically}
+  function OCITypeElemDefaultValue(env:POCIEnv; err:POCIError; elem:POCITypeElem; d_v_length:Pub4):Poratext;cdecl;external ocilib name 'OCITypeElemDefaultValue';
+{$ELSE}
+  OCITypeElemDefaultValue : function (env:POCIEnv; err:POCIError; elem:POCITypeElem; d_v_length:Pub4):Poratext;cdecl;
+{$ENDIF}
+
+  {
+     NAME: OCITypeElemDefaultValue - OCI Get the element's Default Value. 
+     PARAMETERS: 
+          env (IN/OUT) - OCI environment handle initialized in object mode
+          err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+          elem (IN) - pointer to the parameter descriptor in the object cache
+                  (represented by an OCITypeElem)
+          d_v_length (OUT) - length (in bytes) of the returned default value.
+                 The caller must allocate space for the ub4 before calling this 
+                 routine.
+     REQUIRES:
+          1) All type accessors require that the type be pinned before calling 
+             any accessor. 
+          2) All input parameters must not be NULL and must be valid.
+     DESCRIPTION:
+          Get the default value in text form (PL/SQL) of an element. For V8.0,
+          this only makes sense for a method parameter.
+     RETURNS:
+          The default value (text) of the parameter.
+     NOTES:
+          The type must be unpinned when the accessed information is no 
+          longer needed.
+    }
+  {-------------------------------------------------------------------------- }
+  {                           TYPE VERSION TABLE                              }
+  {-------------------------------------------------------------------------- }
+  { For V8.0, the type version table is meant to be an internal data structure
+     only for Oracle clients for type version maintanence purposes. A more
+     general version of the API may be made public in subsequent releases.  }
+  {--------------------------- OCITypeVTInit -------------------------------- }
+  { ** OBSOLETE **  }
+{$IFNDEF LinkDynamically}
+  function OCITypeVTInit(env:POCIEnv; err:POCIError):sword;cdecl;external ocilib name 'OCITypeVTInit';
+{$ELSE}
+  OCITypeVTInit : function (env:POCIEnv; err:POCIError):sword;cdecl;
+{$ENDIF}
+
+  {
+     NAME: OCITypeVTInit - OCI type Version table INItialize
+     PARAMETERS:
+          env (IN/OUT) - OCI environment handle initialized in object mode
+          err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+     REQUIRES:
+          none
+     DESCRIPTION:
+          Allocate space for and initialize the type version table and the type
+          version table's index.
+     RETURNS:
+          OCI_SUCCESS if the function completes successfully.
+          OCI_INVALID_HANDLE if 'env' or 'err' is null.
+          OCI_ERROR if internal errors occurrs during initialization.
+    }
+  {--------------------------- OCITypeVTInsert ------------------------------- }
+  { ** OBSOLETE **  }
+{$IFNDEF LinkDynamically}
+  function OCITypeVTInsert(env:POCIEnv; err:POCIError; schema_name:Poratext; s_n_length:ub4; type_name:Poratext;
+             t_n_length:ub4; user_version:Poratext; u_v_length:ub4):sword;cdecl;external ocilib name 'OCITypeVTInsert';
+{$ELSE}
+  OCITypeVTInsert : function (env:POCIEnv; err:POCIError; schema_name:Poratext; s_n_length:ub4; type_name:Poratext;
+             t_n_length:ub4; user_version:Poratext; u_v_length:ub4):sword;cdecl;
+{$ENDIF}
+
+  {
+     NAME: OCITypeVTInsert - OCI type Version table INSert entry.
+     PARAMETERS:
+          env (IN/OUT) - OCI environment handle initialized in object mode
+          err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+          schema_name (IN, optional) - name of schema associated with the 
+                    type.  By default, the user's schema name is used.
+          s_n_length (IN) - length of the 'schema_name' parameter
+          type_name (IN) - type name to insert
+          t_n_length (IN) - length (in bytes) of the 'type_name' parameter
+          user_version (IN) - user readable version of the type
+          u_v_length (IN) - length (in bytes) of the 'user_version' parameter
+     REQUIRES:
+          none
+     DESCRIPTION:
+          Insert an entry into the type version table and the type version
+          table's index.  The entry's type name and user readable version
+          fields are updated with the input values.  All other fields are
+          initialized to null.
+     RETURNS:
+          OCI_SUCCESS if the function completes successfully.
+          OCI_INVALID_HANDLE if 'env' or 'err' is null.
+          OCI_ERROR if
+              1) any of the parameters is invalid.
+              2) an entry for 'type_name' has already been registered in the
+                 type version table.
+    }
+  {------------------------------ OCITypeVTSelect ---------------------------- }
+  { OCITypeVTSelect - OCI type VERSion table SELECT entry  }
+  { ** OBSOLETE **  }
+{$IFNDEF LinkDynamically}
+  function OCITypeVTSelect(env:POCIEnv; err:POCIError; schema_name:Poratext; s_n_length:ub4; type_name:Poratext;
+             t_n_length:ub4; var user_version:Poratext; u_v_length:Pub4; version:Pub2):sword;cdecl;external ocilib name 'OCITypeVTSelect';
+{$ELSE}
+  OCITypeVTSelect : function (env:POCIEnv; err:POCIError; schema_name:Poratext; s_n_length:ub4; type_name:Poratext;
+             t_n_length:ub4; var user_version:Poratext; u_v_length:Pub4; version:Pub2):sword;cdecl;
+{$ENDIF}
+
+  {
+     NAME: OCITypeVTSelect - OCI type Version table SELect entry.
+     PARAMETERS:
+          env (IN/OUT) - OCI environment handle initialized in object mode
+          err (IN/OUT) - error handle. If there is an error, it is
+                  recorded in 'err' and this function returns OCI_ERROR.
+                  The error recorded in 'err' can be retrieved by calling
+                  OCIErrorGet().
+          schema_name (IN, optional) - name of schema associated with the 
+                    type.  By default, the user's schema name is used.
+          s_n_length (IN) - length of the 'schema_name' parameter
+          type_name (IN) - type name to select
+          t_n_length (IN) - length (in bytes) of the 'type_name' parameter
+          user_version (OUT, optional) - pointer to user readable version of the
+                   type
+          u_v_length (OUT, optional) - length (in bytes) of the 'user_version'
+                   parameter
+          version (OUT, optional) - internal type version
+     REQUIRES:
+          All input parameters must not be NULL and must be valid.
+     DESCRIPTION:
+          Select an entry in the type version table by name.
+     RETURNS:
+          OCI_SUCCESS if the function completes successfully.
+          OCI_INVALID_HANDLE if 'env' or 'err' is null.
+          OCI_ERROR if
+              1) any of the parameters is invalid.
+              2) an entry with 'type_name' does not exist.
+    }
+  { Compatibility function - following function prototype retained for 
+     compatibility only  }
+{$IFNDEF LinkDynamically}
+  function ortgcty(env:POCIEnv; err:POCIError; coll_tdo:POCIType; var collelem_tdo:POCIType):sword;cdecl;external ocilib name 'ortgcty';
+{$ELSE}
+  ortgcty : function (env:POCIEnv; err:POCIError; coll_tdo:POCIType; var collelem_tdo:POCIType):sword;cdecl;
+{$ENDIF}
+
+  {--------------------------------------------------------------------------- }
+  {               Transient Type Construction functions                        }
+  {--------------------------------------------------------------------------- }
+{$IFNDEF LinkDynamically}
+  function OCITypeBeginCreate(svchp:POCISvcCtx; errhp:POCIError; tc:OCITypeCode; dur:OCIDuration; var _type:POCIType):sword;cdecl;external ocilib name 'OCITypeBeginCreate';
+{$ELSE}
+  OCITypeBeginCreate : function (svchp:POCISvcCtx; errhp:POCIError; tc:OCITypeCode; dur:OCIDuration; var _type:POCIType):sword;cdecl;
+{$ENDIF}
+
+  {
+     NAME: OCITypeBeginCreate - OCI Type Begin Creation of a transient type.
+     REMARKS
+         Begins the construction process for a transient type. The type will be
+         anonymous (no name). To create a persistent named type, the CREATE TYPE
+         statement should be used from SQL. Transient types have no identity.
+         They are pure values.
+     PARAMETERS:
+         svchp (IN)       - The OCI Service Context.
+         errhp (IN/OUT)   - The OCI error handle. If there is an error, it is
+                            recorded in errhp and this function returns
+                            OCI_ERROR. Diagnostic information can be obtained by
+                            calling OCIErrorGet().
+         tc               - The TypeCode for the type. The Typecode could
+                            correspond to a User Defined Type or a Built-in type.
+                            Currently, the permissible values for User Defined 
+                            Types are OCI_TYPECODE_OBJECT for an Object Type
+                            (structured), OCI_TYPECODE_VARRAY for a VARRAY
+                            collection type or OCI_TYPECODE_TABLE for a nested
+                            table collection type. For Object types,
+                            OCITypeAddAttr() needs to be called to add each of
+                            the attribute types. For Collection types,
+                            OCITypeSetCollection() needs to be called.
+                            Subsequently, OCITypeEndCreate() needs to be called 
+                            to finish the creation process.
+                            The permissible values for Built-in type codes are
+                            specified in the user manual. Additional information
+                            on built-ins if any (like precision, scale for
+                            numbers, character set info for VARCHAR2s etc.) must
+                            be set with a subsequent call to OCITypeSetBuiltin().
+                            Subsequently OCITypeEndCreate() needs to be called
+                            to finish the creation process.
+         dur              - The allocation duration for the Type. Could be a
+                            predefined or a user defined duration.
+         type(OUT)        - The OCIType (Type Descriptor) that is being
+                            constructed.
+    RETURNS:
+          OCI_SUCCESS if the function completes successfully.
+          OCI_ERROR on error.
+   }
+{$IFNDEF LinkDynamically}
+  function OCITypeSetCollection(svchp:POCISvcCtx; errhp:POCIError; _type:POCIType; collelem_info:POCIParam; coll_count:ub4):sword;cdecl;external ocilib name 'OCITypeSetCollection';
+{$ELSE}
+  OCITypeSetCollection : function (svchp:POCISvcCtx; errhp:POCIError; _type:POCIType; collelem_info:POCIParam; coll_count:ub4):sword;cdecl;
+{$ENDIF}
+
+  {
+     NAME: OCITypeSetCollection - OCI Type Set Collection information
+     REMARKS :
+         Set Collection type information. This call can be called only if the
+         OCIType has been constructed with a collection typecode.
+     PARAMETERS:
+         svchp (IN)      -  The OCI Service Context.
+         errhp (IN/OUT)  -  The OCI error handle. If there is an error, it is 
+                            recorded in errhp and this function returns
+                            OCI_ERROR. Diagnostic information can be obtained by
+                            calling OCIErrorGet().
+         type(IN OUT)    -  The OCIType (Type Descriptor) that is being
+                            constructed.
+         collelem_info   -  collelem_info provides information on the collection
+                            element. It is obtained by allocating an OCIParam
+                            (parameter handle) and setting type information in
+                            the OCIParam using OCIAttrSet() calls.
+         coll_count      -  The count of elements in the collection. Pass 0 for
+                            a nested table (unbounded).
+    RETURNS:
+          OCI_SUCCESS if the function completes successfully.
+          OCI_ERROR on error.
+   }
+{$IFNDEF LinkDynamically}
+  function OCITypeSetBuiltin(svchp:POCISvcCtx; errhp:POCIError; _type:POCIType; builtin_info:POCIParam):sword;cdecl;external ocilib name 'OCITypeSetBuiltin';
+{$ELSE}
+  OCITypeSetBuiltin : function (svchp:POCISvcCtx; errhp:POCIError; _type:POCIType; builtin_info:POCIParam):sword;cdecl;
+{$ENDIF}
+
+  {
+     NAME: OCITypeSetBuiltin - OCI Type Set Builtin information.
+     REMARKS:
+         Set Built-in type information. This call can be called only if the
+         OCIType has been constructed with a built-in typecode
+         (OCI_TYPECODE_NUMBER etc.).
+     PARAMETERS:
+         svchp (IN)       - The OCI Service Context.
+         errhp (IN/OUT)   - The OCI error handle. If there is an error, it is 
+                            recorded in errhp and this function returns
+                            OCI_ERROR. Diagnostic information can be obtained by
+                            calling OCIErrorGet().
+         type(IN OUT)     - The OCIType (Type Descriptor) that is being
+                            constructed.
+         builtin_info     - builtin_info provides information on the built-in
+                            (like precision, scale, charater set etc.). It is
+                            obtained by allocating an OCIParam (parameter handle)
+                            and setting type information in the OCIParam using
+                             OCIAttrSet() calls.
+    RETURNS:
+          OCI_SUCCESS if the function completes successfully.
+          OCI_ERROR on error.
+   }
+{$IFNDEF LinkDynamically}
+  function OCITypeAddAttr(svchp:POCISvcCtx; errhp:POCIError; _type:POCIType; a_name:Poratext; a_length:ub4;
+             attr_info:POCIParam):sword;cdecl;external ocilib name 'OCITypeAddAttr';
+{$ELSE}
+  OCITypeAddAttr : function (svchp:POCISvcCtx; errhp:POCIError; _type:POCIType; a_name:Poratext; a_length:ub4;
+             attr_info:POCIParam):sword;cdecl;
+{$ENDIF}
+
+  {
+     NAME: OCITypeAddAttr - OCI Type Add Attribute to an Object Type.
+     REMARKS:
+         Adds an attribute to an Object type (that was constructed earlier with
+         typecode OCI_TYPECODE_OBJECT).
+     PARAMETERS:
+         svchp (IN)       - The OCI Service Context
+         errhp (IN/OUT)   - The OCI error handle. If there is an error, it is
+                            recorded in errhp and this function returns
+                            OCI_ERROR. Diagnostic information can be obtained by
+                            calling OCIErrorGet().
+         type (IN/OUT)    - The Type description that is being constructed.
+         a_name(IN)       - Optional. gives the name of the attribute.
+         a_length         - Optional. gives length of attribute name.
+         attr_info        - Information on the attribute. It is obtained by
+                            allocating an OCIParam (parameter handle) and setting
+                            type information in the OCIParam using OCIAttrSet()
+                            calls.
+    RETURNS:
+          OCI_SUCCESS if the function completes successfully.
+          OCI_ERROR on error.
+   }
+{$IFNDEF LinkDynamically}
+  function OCITypeEndCreate(svchp:POCISvcCtx; errhp:POCIError; _type:POCIType):sword;cdecl;external ocilib name 'OCITypeEndCreate';
+{$ELSE}
+  OCITypeEndCreate : function (svchp:POCISvcCtx; errhp:POCIError; _type:POCIType):sword;cdecl;
+{$ENDIF}
+
+  {
+     NAME: OCITypeEndCreate - OCI Type End Creation
+     REMARKS:
+         Finishes construction of a type description.Subsequently, only access
+         will be allowed.
+     PARAMETERS:
+         svchp (IN)       - The OCI Service Context
+         errhp (IN/OUT)   - The OCI error handle. If there is an error, it is
+                            recorded in errhp and this function returns
+                            OCI_ERROR. Diagnostic information can be obtained by
+                            calling OCIErrorGet().
+         type (IN/OUT)    - The Type description that is being constructed.
+     RETURNS:
+          OCI_SUCCESS if the function completes successfully.
+          OCI_ERROR on error.
+   }
+  {========================= }
+  { PUBLIC MACROS AND FLAGS  }
+  {========================= }
+  {-------------------------------------------------------------------------- }
+  {                          TYPE ELEMENT FLAGS                               }
+  {-------------------------------------------------------------------------- }
+  { element is a REF  }
+
+  const
+     OCI_TYPEELEM_REF = $8000;     
+  { parameter is required  }
+     OCI_TYPEPARAM_REQUIRED = $0800;     
+  { macros to test flags  }
+
+//  function OCI_TYPEELEM_IS_REF(elem_flag : longint) : longint;
+
+//  function OCI_TYPEPARAM_IS_REQUIRED(param_flag : longint) : longint;
+
+{implementation
+
+  function OCI_TYPEELEM_IS_REF(elem_flag : longint) : longint;
+    begin
+//       OCI_TYPEELEM_IS_REF:=(elem_flag(@(OCI_TYPEELEM_REF)))<>0;
+    end;
+
+  function OCI_TYPEPARAM_IS_REQUIRED(param_flag : longint) : longint;
+    begin
+//       OCI_TYPEPARAM_IS_REQUIRED:=(param_flag(@(OCI_TYPEPARAM_REQUIRED)))<>0;
+    end;
+
+
+end.}