Does anyone know how to do this?
I am running and Active X document within Internet Explorer.
I need to get the URL String so I can parse out certain variables within it.
Printable View
Does anyone know how to do this?
I am running and Active X document within Internet Explorer.
I need to get the URL String so I can parse out certain variables within it.
It hurts so bad! Surely there must be a way
Please help
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()
I still haven't figured this out.
Anyone with some help?
*taps fingers on table*