Re: Dynamically linking to OCI libraries in Windows

From: Keith Majkut <kmajkut_at_netcom.com>
Date: 1996/08/25
Message-ID: <kmajkutDwpMEo.IFH_at_netcom.com>#1/1


In article <01bb9066$ce8f91c0$04d3a6c7_at_mexico.silverrun.com>, Alain Gilbert <alain.gilbert_at_silverrun.com> wrote:
>When programming with the oci libraries we use to dynamically linked the
>oracle DLL so that we can cope with an incorrect setup.
>
>For Windows 3.1 we use "ora7win.dll",
>For Windows 95 and Windows NT we use "ora7nt.dll".
>
>Everything is fine except when Oracle introduce a new version and rename
>the DLL. To cope with it we also look for "ora71.dll" and "ora72.dll".
>
>Is there a way (avoiding static linking) to find the current DLL name for
>the oci libraries?

Nope. Anyway, I think you have the right idea. I think you can now see the naming pattern as well. The The 7.1 DLL had 'NT' in it since it was only built and tested for NT. For 7.2, the DLL is just ORA72.DLL since it's common to NT/95. 7.3 is ORA73.DLL. The 16bit windows one is the same except it's got 'WIN' on the end.
If you look at the latest OCI releases you'll see a new link lib/dll called OCIW32.LIB/DLL or OCIW16.LIB/DLL. These will do a LoadLibrary() for you. What they have is a list of OCI libs that are tried(newest first), but there is also an override entry in the registry, just in case. You could use this one or just do it (LoadLibrary) yourself...
>
>TIA
>Alain Gilbert
Received on Sun Aug 25 1996 - 00:00:00 CEST

Original text of this message