|
-
Apr 19th, 2002, 08:54 AM
#1
Thread Starter
Hyperactive Member
How to Get URL string with Active X Document
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.
Using VS 6 Enterprise w/ SP5 & Windows 2000 Professional
-
Apr 19th, 2002, 11:51 AM
#2
Thread Starter
Hyperactive Member
It hurts so bad! Surely there must be a way
Please help
Using VS 6 Enterprise w/ SP5 & Windows 2000 Professional
-
Apr 19th, 2002, 02:08 PM
#3
Thread Starter
Hyperactive Member
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()
Using VS 6 Enterprise w/ SP5 & Windows 2000 Professional
-
Apr 30th, 2002, 02:59 PM
#4
Thread Starter
Hyperactive Member
I still haven't figured this out.
Anyone with some help?
*taps fingers on table*
Using VS 6 Enterprise w/ SP5 & Windows 2000 Professional
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|