I'm working on a 32 bit c++ app which I build using VS 2010 Express. I downloaded the 32 bit instant client 12.0.1.2. The basic client ended up here::
I:\oraclexe\XEClient\12.0.1.2\Win32
and the sdk here:
I:\oraclexe\XEClient\12.0.1.2\Win32\sdk
The search order for libs VS 2010 is set as follows:
I:\oraclexe\XEClient\12.0.1.2\Win32\sdk\lib\msvc\vc10
I:\oraclexe\XEClient\12.0.1.2\Win32\sdk\lib\msvc
I copied these files to the same folder as the executable I built:
I:\oraclexe\XEClient\12.0.1.2\Win32\oci.dll
I:\oraclexe\XEClient\12.0.1.2\Win32\ociw32.dll
I:\oraclexe\XEClient\12.0.1.2\Win32\VC10\oraocci12.dll
The reason I did all this is because I have 64bit Oracle11GR2 installed on the same machine, so env var ORACLE_HOME points to I:\oraclexe\app\oracle\product\11.2.0\server and I:\oraclexe\app\oracle\product\11.2.0\server\bin is in the PATH env var. Obviously my 32bit app must link with 32bit libs and use 32bit DLLs hence the 32 bit client.
I verified OracleXE and the Listener are running and listening on port 1521.
Now whenever my app hits OCIEnvInit, it returns -1. I don't get any more info than that and can't explain why this happens nor where I should look for an answer:
OCIEnv* pEnv;
int status;
status = OCIEnvInit(&pEnv, OCI_DEFAULT, 0, 0);
Any help is greatly appreciated .