Connecting to a running instance of Internet Explorer Utah

Methods to connect to a running instance of IE

Local Companies

Windows data recovery software
001-9811111111
Road
City, UT
freeware undelete
980-000-0000
Street
Town, UT
Jon Sult
801-654-7943
1464 Capitol
Ogden, UT
DigiCert, Inc
(801) 701-9600
355 E. 520 W. Canopy Bldg
Lindon, UT
Wasatch Software
888-275-8850
5093 West 6275 South
West Jordan, UT
Windows data recovery software
001-9811111111
Road
City, UT
freeware undelete
980-000-0000
Street
Town, UT
Herman Street, Inc.
801-528-4159
2425 Lincoln Ave
Ogden, UT
Aha!Logic
(801) 705-9357
1055 East 100 South
Lindon, UT
I.M. Flash Technologies
(801) 767-3965
1550 East 3400 North
Lehi, UT

provided by: 
Originally published at Internet.com


There are some methods to connect to a running instance of IE. This one is how to connect through the ROT (Running Object Table).

Usually, an application connects to a running instance of another application using the Running Object table. However the Internet Explorer 4.0 doesn't not register itself in ROT. The solution is to write so-called "Browser Helper Object" – a tiny COM object that exposes IObjectWithSite interface and register itself in the ROT. Also it's necessary to register this object in the Registry under the following key: HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Browser Helper Objects\ The Internet Explorer will create new instance of each Browser Helper Object listed in registry every time new instance of Internet Expoler is started. HKLM\SOFTWARE\Microsoft\Windows \CurrentVersion\Explorer\Browser Helper Objects\{CE7C3CF0-4B15- 11D1-ABED-709549C10000}

The following code demonstrates how to allow multiple instances of the Internet Explorer to be registered in the ROT using item moniker. ///////////////////////////////////////////////////////////////////////////// IEHELPER.H #ifndef __IEHELPER_H_ #define __IEHELPER_H_ #include "resource.h" // main symbols ///////////////////////////////////////////////////////////////////////////// // CIEHelper class CIEHelper : public CComObjectRootEx, public CComCoClass, public IObjectWithSiteImpl, public IIEHelper { public: CIEHelper() { m_dwROTID = 0; } _1_CIEHelper() { } // IObjectWithSite interface STDMETHOD(SetSite)(IUnknown* pUnkSite); DECLARE_REGISTRY_RESOURCEID(IDR_IEHELPER) BEGIN_COM_MAP(CIEHelper) COM_INTERFACE_ENTRY(IIEHelper) COM_INTERFACE_ENTRY(IObjectWithSite) END_COM_MAP() // IIEHelper public: void SetROTID(DWORD dwValue) { m_dwROTID = dwValue; } private: DWORD m_dwROTID; void ROT_UnRegister(); void ROT_Register(); }; #endif //__IEHELPER_H_ /////////////////////////////////////////////////////////////////// IEHELPER.CPP // IEHelper.cpp : Implementation of CIEHelper #include "stdafx.h" #include "IE.h" #include "IEHelper.h" #include #include // the IID_IWebBrowser is located over there #include ///////////////////////////////////////////////////////////////////////////// // CIEHelper // // CObjectWithSite Methods // STDMETHODIMP CIEHelper::SetSite(IUnknown* pUnkSite) { USES_CONVERSION; // remove previously registered object from the table ROT_UnRegister(); // neccessary initialization HRESULT hResult = IObjectWithSiteImpl::SetSite(pUnkSite); // register helper object in the running object table ROT_Register(); return hResult; } /////////////////////////////////////////////////////////////////////////// // // // Private Section // const static TCHAR* szMonikerTemplateName = _T("Browser Helper Object"); // // register the object in the running object table // void CIEHelper::ROT_Register() { CComPtr pTable; if(GetRunningObjectTable(0, &pTable) == S_OK) { CComBSTR bstrItemName; CComPtr pMoniker; TCHAR szBuffer[1024]; sprintf(szBuffer, "%s | %d", szMonikerTemplateName, m_spUnkSite); bstrItemName = szBuffer; if(CreateItemMoniker(NULL, bstrItemName, &pMoniker) == S_OK) { DWORD dwRegister; if(pTable->Register(1, (IUnknown*)this, pMoniker, &dwRegister) == S_OK) { SetROTID(dwRegister); ATLTRACE("IIEHelper: the moniker %s has been registered successfully\n", szBuffer); } else { ATLTRACE("IIEHelper: failed to register moniker % s in the ROT\n", szBuffer); } } else { ATLTRACE("IIEHelper: failed to create moniker %s\n", szBuffer); } } else { ATLTRACE("IIEHelper: Could not retrieve the ROT pointer\n"); } } void CIEHelper::ROT_UnRegister() { CComPtr pTable; if(GetRunningObjectTable(0, &pTable) == S_OK) { HRESULT hRes = pTable->Revoke(m_dwROTID); ATLTRACE("IIEHelper: ID = %d, result code %x\n", m_dwROTID, hRes); } SetROTID(0); } ////////////////////////////////////////////////////////////////////// IEHELPER.RGS // The following lines should be included into the self-registration portion of // COM application... HKLM { SOFTWARE { Microsoft { Windows { CurrentVersion { Explorer { 'Browser Helper Objects' { } } } } } } } ...

Read article at Internet.com site

Featured Local Company

Windows data recovery software

001-9811111111
Road
City, UT
http://www.techddi.com

Data recovery software restores lost pictures, audio songs and text document files.

Related Articles
Regional Articles
- Connecting to a running instance of Internet Explorer American Fork UT
- Connecting to a running instance of Internet Explorer Bountiful UT
- Connecting to a running instance of Internet Explorer Brigham City UT
- Connecting to a running instance of Internet Explorer Cedar City UT
- Connecting to a running instance of Internet Explorer Centerville UT
- Connecting to a running instance of Internet Explorer Clearfield UT
- Connecting to a running instance of Internet Explorer Draper UT
- Connecting to a running instance of Internet Explorer Kaysville UT
- Connecting to a running instance of Internet Explorer Layton UT
- Connecting to a running instance of Internet Explorer Lehi UT
- Connecting to a running instance of Internet Explorer Logan UT
- Connecting to a running instance of Internet Explorer Magna UT
- Connecting to a running instance of Internet Explorer Midvale UT
- Connecting to a running instance of Internet Explorer Ogden UT
- Connecting to a running instance of Internet Explorer Orem UT
- Connecting to a running instance of Internet Explorer Park City UT
- Connecting to a running instance of Internet Explorer Pleasant Grove UT
- Connecting to a running instance of Internet Explorer Provo UT
- Connecting to a running instance of Internet Explorer Riverton UT
- Connecting to a running instance of Internet Explorer Roy UT
- Connecting to a running instance of Internet Explorer Saint George UT
- Connecting to a running instance of Internet Explorer Salt Lake City UT
- Connecting to a running instance of Internet Explorer Sandy UT
- Connecting to a running instance of Internet Explorer South Jordan UT
- Connecting to a running instance of Internet Explorer Spanish Fork UT
- Connecting to a running instance of Internet Explorer Springville UT
- Connecting to a running instance of Internet Explorer Tooele UT
- Connecting to a running instance of Internet Explorer Vernal UT
- Connecting to a running instance of Internet Explorer West Jordan UT
Related Articles
Related Local Event
Conference on Information Technology (CIT)
Dates: 10/19/2009 - 10/22/2008
Location: Salt Palace Convention Center
Salt Lake City, UT
View Details

Topics: 
Architecture & Design Languages & Tools Project Management Web Services
Database Microsoft & .NET Security Wireless
Java Open Source Techniques XML