GetCORSystemDirectory Function

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

This function is deprecated. It is superseded by the ICLRRuntimeInfo::GetRuntimeDirectory method provided in the .NET Framework version 4.

HRESULT GetCORSystemDirectory ( 
    [out] LPWSTR  pbuffer,   
    [in]  DWORD   cchBuffer, 
    [out] DWORD*  dwlength
); 

Parameters

  • pbuffer
    [out] 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 into the process. If the runtime has not yet been loaded into the process, the function returns the appropriate directory information for the latest version of the runtime installed on the computer.

  • cchBuffer
    [in] The size, in bytes, of pbuffer.

  • dwLength
    [out] The number of characters returned in pbuffer.

Remarks

Caution noteCaution

Do not use this function in processes that are running version 4 of the CLR. If an earlier version of the CLR is installed on the computer, this function returns the installation directory for that version.

Requirements

Platforms: See .NET Framework System Requirements.

Header: MSCorEE.h

Library: MSCorEE.dll

.NET Framework Versions: 4, 3.5 SP1, 3.5, 3.0 SP1, 3.0, 2.0 SP1, 2.0, 1.1, 1.0

See Also

Other Resources

.NET Framework 1.1 and 2.0 Hosting Global Static Functions