Re: Determine client version on the fly

From: Rauf Sarwar <rs_arwar_at_hotmail.com>
Date: 5 Oct 2002 11:18:41 -0700
Message-ID: <92eeeff0.0210051018.4fb428c1_at_posting.google.com>


Alexander.Kuznetsov_at_marshmc.com (Alexander Kuznetsov) wrote in message news:<ac5bc7c1.0210041131.36ed5de7_at_posting.google.com>...
> Hi all,
> A VC++ 6.0 application running on NT/Win2000 needs to determine the
> version of Oracle client installed on that particular box. Options are
> Oracle 7, 8, 9.
> I'd be most thankful for suggestions
> Alexander

This is for versions 7.3.x and up.

  1. Is Oracle installed or not. Check registry key exist at, HKLM\SOFTWARE\ORACLE if not {exit} else continue
  2. If Oracle installed, get default ORACLE_HOME from registry. HKLM\SOFTWARE\ORACLE[ORACLE_HOME]
  3. If directory, %ORACLE_HOME%\RDBMS73 exists then Version = 7.3.x {exit} else continue (Not sure if directory name is same for versions 7.x to 7.2.x)
  4. If directory, %ORACLE_HOME%\RDBMS80 exists then Version = 8.0.x {exit} else continue
  5. If directory, %ORACLE_HOME%\RDBMS exists then Version = 8.1.x OR 9.x Using Windows api Version.dll (GetFileVersionInfoA) get file version of %ORACLE_HOME%\bin\ociw32.dll If first number of version = 8 then Version = 8.1.x If first number of version = 9 then Version = 9.x

/Rauf Sarwar Received on Sat Oct 05 2002 - 20:18:41 CEST

Original text of this message