Home » Developer & Programmer » Precompilers, OCI & OCCI » Environment::createEnvironment() & Unicode support
Environment::createEnvironment() & Unicode support [message #162708] Mon, 13 March 2006 05:00
eugene.gandyl
Messages: 1
Registered: March 2006
Location: Israel
Junior Member
Hi,

According to Oracle® C++ Call Interface Programmer's Guide 10g Release 1 (10.1) the createEnvironment method should is declared like:

static Environment * createEnvironment(
Mode mode = DEFAULT,
void *ctxp = 0,
void *(*malocfp)(void *ctxp, size_t size) = 0,
void *(*ralocfp)(void *ctxp, void *memptr, size_t newsize) = 0,
void (*mfreefp)(void *ctxp, void *memptr) = 0,
const std::string &charset,
const std::string &ncharset);

But the occiControl.h (it was installed by oracle-instantclient-devel-10.2.0.1-1.i386.rpm) contains different declaration:

static Environment * createEnvironment(
const OCCI_STD_NAMESPACE::string &charset,
const OCCI_STD_NAMESPACE::string &ncharset,
Mode mode = DEFAULT,
void *ctxp = 0,
void *(*malocfp)(void *ctxp, size_t size) = 0,
void *(*ralocfp)(void *ctxp, void *memptr,
size_t newsize) = 0,
void (*mfreefp)(void *ctxp, void *memptr) = 0);

Is there an error in Programmer's Guide or my h-file is wrong?

When I run my programm, it seems that it works fine, but when I use "Parasoft Insure++®" (a tool for automated run-time C/C++ application testing) it reports the following error:

[unknown:unknown] **WRITE_NULL**

Writing to a null pointer: <argument 1>

Stack trace where the error occurred:
times() (interface)
sltrgatime64()
kghinp()
kpuinit0()
kpuenvcr()
OCIEnvNlsCreate()
oracle::occi::Environment::createEnvironment()

The call to the createEnvironment is:

Environment *env;

....

env = Environment::createEnvironment ("UTF8","OCCIUTF16", Environment::THREADED_MUTEXED);

Does anybody have an information regarding the issue?
Previous Topic: Can a Pro*c program run without an oracle client installed on the machine ?
Next Topic: capture output from execl() or system()
Goto Forum:
  


Current Time: Wed Jul 23 05:45:46 CDT 2014

Total time taken to generate the page: 0.12216 seconds