Maybe getting closer. Found this document on codeguru.com called "Determining URL from ActiveX Control"
http://www.codeguru.com/internet/WebUrlActiveX.html
This is EXACTLY what I need, but alas it is written in C. Can anyone interpret for me into VB?
Code:HRESULT hrResult = S_FALSE; IOleClientSite *pClientSite = NULL; IMoniker* pMoniker = NULL; LPOLESTR sDisplayName; // If using ATL to develop, use the m_spClientSite data // member of CComControl class. // If using MFC, use the following code: // (member function of COleControl class // - don't forget to call release) // pClientSite = GetClientSite(); hrResult = m_spClientSite->GetMoniker(OLEGETMONIKER_TEMPFORUSER, OLEWHICHMK_CONTAINER, &pMoniker); if(SUCCEEDED(hrResult)) { hrResult = pMoniker->GetDisplayName(NULL, NULL, &sDisplayName); pMoniker->Release(); } //TODO : relevant processing with sDisplayName and //free sDisplayName using SysFreeString()




Reply With Quote