Skip to content

Remove the GetCLRRuntimeHost export from coreclr binary #52688

@AaronRobinsonMSFT

Description

@AaronRobinsonMSFT

The GetCLRRuntimeHost export on the coreclr binary is a way to get at the COM interface hosting API that is no longer supported in .NET 5+. We should get rid of this API and simplify the internal initialization logic by removing the COM API style. Since it is no longer supported and we have no test coverage assets it is sitting there waiting to get broken.

extern "C"
DLLEXPORT
HRESULT GetCLRRuntimeHost(REFIID riid, IUnknown **ppUnk)
{
WRAPPER_NO_CONTRACT;
return CorHost2::CreateObject(riid, (void**)ppUnk);
}

The new API is officially documented with guidance and a sample can be found here.

/cc @vitek-karas @elinor-fung

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions