Quantcast
Channel: Common Language Runtime Internals and Architecture forum
Viewing all articles
Browse latest Browse all 1710

Initialization CLR error

$
0
0

I'm using this:


C++Выделить код
1
2
3
4
5
6
7
8
9

HRESULT hr;    ICLRMetaHost    *pMetaHost = nullptr;    ICLRRuntimeHost *pRuntimeHost = nullptr;    ICLRRuntimeInfo *pRuntimeInfo = nullptr;     hr = CLRCreateInstance(CLSID_CLRMetaHost, IID_ICLRMetaHost, (LPVOID *)&pMetaHost);    hr = pMetaHost->GetRuntime(L"v4.0.30319", IID_PPV_ARGS(&pRuntimeInfo));    hr = pRuntimeInfo->GetInterface(CLSID_CLRRuntimeHost, IID_PPV_ARGS(&pRuntimeHost));    hr = pRuntimeHost->Start();

But on calling Start(), i have hr=1

 if i use GetRuntime with L"v2.0.50727" it will be ok. hr=0

i have .net 4.6.1 on my machine

why i'm getting this?



Viewing all articles
Browse latest Browse all 1710

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>