Hello,
Is there any C# equivalent of the code below?
HRESULT hr;
ActiveXSite* pSite;
pSite = CAxWindowlessHost<CMainDlg>::CreateControlSite(L"AgControl.AgControl", NULL, IDC_AGCONTROL1);
if ( pSite != NULL )
{
// disable right-click!
pSite->SetAllowRClick(false);
// set moniker URL
CComBSTR bstrUrl("file:///C:/Temp/SilverlightDemo.xap");
pSite->SetUrl(bstrUrl);
PropertyParams props;
props.push_back( PropertyParam(L"Windowless", L"true") );
props.push_back( PropertyParam(L"MinRuntimeVersion", L"2.0.31005.0") );
props.push_back( PropertyParam(L"Source", static_cast<LPCWSTR>(bstrUrl)) );
props.push_back( PropertyParam(L"InitParams", L"") );
hr = pSite->ActivateAx(rc, false, props);
}