This documentation is archived and is not being maintained.

CorBindToCurrentRuntime

Loads the common language runtime into a process using version information stored in an XML file. The format of the XML file is modeled on the standard application configuration file as described in Configuration File Schema.

Syntax

HRESULT CorBindToCurrentRuntime(
  LPCWSTR pwszFileName,   
  REFCLSID rclsid,      
  REFIID riid,    
  LPVOID *ppv
);   

Header file: Include Mscoree.h.

Library: link Link with Mscoree.lib.

Parameters

pwszFileName [in]
The name of an application configuration file that specifies the version of the common language runtime to load. If the file name is not fully qualified, it is assumed to be in the same directory as the executable making the call.

The version of the runtime to be loaded is described by the version attribute in the <requiredRuntime> element of the configuration file.

If no version is specified, or if the <requiredRuntime> element cannot be found, the latest version of the common language runtime that is installed on the machine is loaded.

rclsid [in]
The CLSID of the coclass that implements the interface you are looking for. Supported values are CLSID_CorRuntimeHost or null.
riid [in]
The IID of the interface you are requesting. Supported values are IID_ICorRuntimeHost or null.
ppv [out]
The returned interface pointer.
Show: