Results 1 to 4 of 4

Thread: How to Get URL string with Active X Document

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2000
    Posts
    316

    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

  2. #2

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2000
    Posts
    316
    It hurts so bad! Surely there must be a way
    Please help
    Using VS 6 Enterprise w/ SP5 & Windows 2000 Professional

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2000
    Posts
    316
    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

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2000
    Posts
    316
    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
  •  



Click Here to Expand Forum to Full Width