Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: using oracle client in C++ with Visual Studio 2005

Re: using oracle client in C++ with Visual Studio 2005

From: Martin T. <bilbothebagginsbab5_at_freenet.de>
Date: Wed, 27 Jun 2007 14:27:24 -0700
Message-ID: <1182979644.043031.28050@n2g2000hse.googlegroups.com>


On Jun 27, 6:36 pm, laurent <laurento..._at_gmail.com> wrote:
> On Jun 27, 7:56 am, "Martin T." <bilbothebagginsb..._at_freenet.de>
> wrote:
>
>
>
>
>
> > On Jun 26, 6:07 pm, laurent <laurento..._at_gmail.com> wrote:
>
> > > On Jun 26, 11:42 am, sybrandb <sybra..._at_gmail.com> wrote:
>
> > > (snip)
>
> > > i have a complete client. i actually tried a few of them. Instant
> > > client and the one delivered with oracle XE both include a dll
> > > (OCI.dll) which depends on the wrong version of the miscrosoft
> > > runtime library, and cause random failures of my application, when an
> > > object allocated by the old runtime gets freed in the new runtime. My
> > > application builds and runs most of the time but random crashes are a
> > > show stopper.
>
> > > Laurent
>
> > Thats why you don't allocate memory in one module and deallocate it in
> > another.
>
> this is hard to do when a library returns a pointer to an object it
> has allocated for you.
>

Brrrr. :-) Well, maybe you can create a simple wrapper dll that links to the same dll as the OCI.dll and supplies a ociFree(void*); function, that just calls free() so that the correct one is used ...

> > If the OCI.dll needs this, then it's a crappy interface. (Yes, I know,
> > not very helpful here, sorry.)
> > Maybe you can come up with a workaround where the memory stuff is kept
> > to each module.
>
> working around stupid APIs is becoming the main part of my job since
> the powers that be decided microsoft and oracle were the way to go.
>

Well. If it'd be simple everyone could do it ... ;-)

good luck!
Martin Received on Wed Jun 27 2007 - 16:27:24 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US