size for OCIHandleAlloc
Date: 2000/07/28
Message-ID: <8lssp8$4n3$1_at_nnrp1.deja.com>#1/1
Hi, Oracle World.
I am using Oracle OCI. According the documnets, all the OCI data structure are opaque to users. When calling OCI funcs, just leave the size field as 0 and func ptr field as NULL.
I look at the smaples under $ORACLE_HOME/ora81/oci/samples and find that some programs call OCIHandleAlloc by:
(void) OCIHandleAlloc(
(dvoid *) envhp, (dvoid **) &errhp, OCI_HTYPE_ERROR, (size_t) 0, (dvoid **) 0);
And some call (cdemodsc.c) it by:
(void) OCIHandleAlloc(
(dvoid *) envhp,
(dvoid **) &errhp,
(ub4) OCI_HTYPE_ERROR,
52,
(dvoid **) &tmp); /* tmp is just a dvoid ptr */
I just wonder why they just hardcoded the size here? Is the size the same in all platforms? I guess this is because the old version hardcoded the size and they didn't check. Is there a optimized size?
Does someone hack into the OCI DLL and take a look at their data structure?
Thanks,
--ye
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Fri Jul 28 2000 - 00:00:00 CEST