While trying to host the CLR, I keep getting this:
error C2440: 'function' : cannot convert from 'const IID' to 'DWORD'
My code:
ICLRRuntimeHost *host = NULL;
HRESULT result = CorBindToRuntime(NULL, L"wks", CLSID_CLRRuntimeHost,
IID_ICLRRuntimeHost, (PVOID*)&host);
This is in C, by the way. Not C++.
EDIT: When I compile this with C++, it works just fine. Shouldn't it behave the same in either language?
From guiddef.h:
In other words, in C++, those two are references, and in C, they are pointers. You need to use:
The last parameter of CorBindToRuntime is defined as LPVOID*, not PVOID*. Maybe thats the problem?