Go4Expert

Go4Expert (http://www.go4expert.com/)
-   MFC (http://www.go4expert.com/forums/mfc/)
-   -   How to search and reteieve the value of a key in the registry-VC++ (http://www.go4expert.com/forums/search-reteieve-value-key-registry-vcpp-t3062/)

Athish 19Feb2007 12:14

How to search and reteieve the value of a key in the registry-VC++
 
How to search and reteieve the value of a key in the registry through VC++ Application??

shabbir 19Feb2007 13:24

Re: How to search and reteieve the value of a key in the registry-VC++
 
Open Main Key with RegOpenKeyEx and get the necessary value with RegQueryValueEx API's

Athish 19Feb2007 17:30

Re: How to search and reteieve the value of a key in the registry-VC++
 
thanks for your reply shabbir..

i have one more query....kindly read the below one,


How to retrieve the ORACLE_HOME location from the Registry Editor through VC++ application, irrespective of the Oracle Version(either 9i or 10 G)??

Because, the ORACLE_HOME resides in different folders w.r.to the oracle version.

Currently, we are using a MFC function (RegOpenKeyEx()) to retrieve the ORACLE_HOME Location but this function requires the Complete folder path (For Instance,., SOFTWARE\\ORACLE for Oracle 9i and SOFTWARE\\ORACLE\\Key_oraclientlog_home2 for Oracle 10 G)

Instead of hardcoding the Complete folder path(as i mentioned above), is there an universal way to retreive the ORACLE_HOME Location from the Registry editor without mentioning the complete Folder path???

Please Advise..

Thanks Aathi

shabbir 19Feb2007 18:12

Re: How to search and reteieve the value of a key in the registry-VC++
 
That would depend on the Oracle and if you dont have any docs relating to Oracle installation its always not a good method to be finding it because a new version will break your system.

Athish 19Feb2007 18:19

Re: How to search and reteieve the value of a key in the registry-VC++
 
thank you for your view....

how to go about with this issue???

Better to hard code the location according to the Oracle Version for time being...anyway i agree with you that i need to rewrite again if any other newer version of oracle comes...

orelse any other better idea u can suggest????


thanks Aathi

shabbir 19Feb2007 22:04

Re: How to search and reteieve the value of a key in the registry-VC++
 
Have an ini file to have the probable locations and as and when new version comes up you can just add to the ini file so you dont need to be editing the code all the time or at clients place.


All times are GMT +5.5. The time now is 01:08.