#include "stdafx.h"
#include <assert.h>
#include <Mscoree.h>
int _tmain(int argc, _TCHAR* argv[])
{
ICLRRuntimeHost* clrHost = NULL;
HRESULT hr = CorBindToRuntimeEx(0, L"wks", 0, CLSID_CLRRuntimeHost, IID_ICLRRuntimeHost, (LPVOID*)&clrHost);
assert(SUCCEEDED(hr));
clrHost->Start();
ICLRControl* clrControl = NULL;
hr = clrHost->GetCLRControl(&clrControl);
assert(SUCCEEDED(hr));
DWORD* ret = NULL;
hr = clrHost->ExecuteInDefaultAppDomain(L"ManagedApp.exe"
, L"ManagedApp.Program"
, L"SayHello"
, L"Native Stuff"
, ret );
assert(SUCCEEDED(hr));
return 0;
}