Huihong
Thu Feb 02 17:46:50 CST 2006
In your non .NET program, you can first bind to a specific version of
.NET Framework using the unmanaged hosting api, e.g.,
ICorRuntimeHost* spRuntimeHost = NULL;
HRESULT hr = CorBindToRuntimeEx(
L"v1.1.4322",
L"wks", //Request a WorkStation build of the CLR
STARTUP_CONCURRENT_GC,
STARTUP_LOADER_OPTIMIZATION_SINGLE_DOMAIN,
CLSID_CorRuntimeHost,
IID_ICorRuntimeHost,
(void**)&spRuntimeHost
);
if (SUCCEEDED(hr))
hr = spRuntimeHost->Start();
This will force v1.1.4322 to be loaded. Make sure you do this before
any other .NET stuff coming up. I have used this on remotesoft tools,
and it work well for us.
Huihong
http://www.remotesoft.com
The best possible ways to secure .NET Code from decompilation