I am converting an application in C++ to VB.NET.
The C++ application uses ATL CAxWindow class, how do I convert this to VB.NET? I mean what is the equivalent of CAxWindow in VB.NET. Or how can I access the ATL CAxWindow class in VB.NET??
Basically I need to create a window in VB.NET windows service to host a LeadTools Control (third party tools).
This is the function I am trying to convert to VB.NET from C++
void
{
_bstr_t strLicense = LICENSE;
AtlAxWinInit();
RECT rect = {0,0,100,100};
oWin.Create(NULL,rect,
HRESULT hr;
IClassFactory2Ptr pCF;
IPersistStreamInitPtr pPSI;
hr = CoGetClassObject(LEAD::CLSID_LEAD,CLSCTX_ALL,NULL,IID_IClassFactory2,(
hr = pCF->CreateInstanceLic(NULL,NULL,
pCF.Release();
hr = mpLEAD->QueryInterface(&pPSI);
hr = pPSI->InitNew();
pPSI.Release();
_COM_SMARTPTR_TYPEDEF(IAxWinHostWindow,IID_IAxWinHostWindow);
IAxWinHostWindowPtr pHost;
hr = oWin.AttachControl(mpLEAD,(IUnknown**)&pHost);
pHost.Release();
}
Thanks in advance,
Purnima.