how to get the framework directory from native c++

  • Thread starter Thread starter Ben Schwehn
  • Start date Start date
B

Ben Schwehn

Hello,

what is the best way to get the path to the most recent installed
version of the framework?

In a managed app I could use RuntimeEnvironment.GetRuntimeDirectory()
(however - I believe - this does not return the most recent installed
version but the currently used).

Is there an API function that I can use from an unmanaged app or do I
have to read the registry myself?

Thanks
 
Hi Ben,

Take a look at:
http://msdn.microsoft.com/library/d.../cpgenref/html/grfungetcorsystemdirectory.asp

The following comment is from that topic:

"A buffer in which the runtime returns a string that contains the fully
qualified name of the installation directory for the runtime that is loaded
in the process. If the runtime has not yet been loaded in the process, the
function returns the appropriate directory information for the latest
version of the runtime installed on the computer. "

Ronald Laeremans
Visual C++ team
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top