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
 
Back
Top