This documentation is archived and is not being maintained.


Returns the installation directory of the common language runtime that is loaded into the process. The installation directory is fully qualified, for example, "c:\windows\\framework\v1.0.3705".


HRESULT GetCORSystemDirectory(
  LPWSTR pbuffer,   
  DWORD cchBuffer, 
  DWORD* dwlength

Header file: Include Mscoree.h.

Library: Link with Mscoree.lib.


pbuffer [in]
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.
cchBuffer [in]
The number of characters in pbuffer.
dwLength [out]
The number of characters returned in pbuffer.