Internet Explorer 9 Explorer Bar Entry point
-
Thursday, July 05, 2012 2:29 PM
Hi,
I'm trying to develop an explorer bar for Internet Explorer 9 using C#. My extension has an interface in which the user must log in. Once logged in the status "Connected" is displayed in the explorer bar component. The problem is that every time the user opens a new tab, the InitializeComponent() method is called to build a new instance of the user interface and the login information is lost... I need to create the user interface at the first run and display that user interface for every new tab.
I'm completely new in Internet Explorer Development, so I need some help on where to start...
Thanks in advance!
Greg
All Replies
-
Thursday, July 05, 2012 3:07 PMTake a look here: http://code.msdn.microsoft.com/CSIEExplorerBar-ba8fe182
-
Friday, July 06, 2012 9:06 AM
Thanks for your answer! I already saw that example, but it doesn't have what I need which is preserve the login information on new tabs... if the user is logged it doesn't makes sense to login again.
Any other suggestions?
Thanks.
-
Friday, July 06, 2012 11:40 AMYou can save it to registry. To make this flexible you'd need a "manager" or "broker" process that runs externally and communicates with your tabs via IPC
-
Monday, July 09, 2012 9:31 AM
Hi Yuriy! Do you know any working example or tutorial from which I could learn that?...
Thanks.
-
Monday, July 09, 2012 12:19 PM
I'm not aware of any ready-made example of this, but the idea is quite simple with COM, for example:
- Create an out-of-proc COM server. ATL is of great help with its COM exe server wizard template. I created an MTA object.
- In your installer, set auto-elevation registry key for your COM exe to 3:
HKML\Software\Microsoft\Internet Explorer\Low Rights\ElevationPolicy\{<GUID>}] AppPath=<PATH> AppName=<MODULE_NAME> Policy=dword:00000003 <GUID>: new GUID <PATH>: path to module without name <MODULE_NAME>: module name without path 3: silent elevation
- Create some sort of RAII class that would instantiate your broker and provide accesss to it.
- Make sure you initialize COM to appropriate threading model before you try to call CoCreateInstance, in every thread you want to use your broker. UrlMon is frivolous with COM. Something like this will work:
class CScopedCoInitialize { public: CScopedCoInitialize(DWORD dwCoInit = COINIT_MULTITHREADED) { m_fDoUnInit = (CoInitializeEx(nullptr, dwCoInit) == S_OK); } ~CScopedCoInitialize() { if (m_fDoUnInit) CoUninitialize(); } private: bool m_bfDoUnInit; };
Yuriy- Edited by Yuriy Gettya Monday, July 09, 2012 12:21 PM
-
Tuesday, July 10, 2012 11:09 AM
Thanks for your answer Yuriy!
I'm not sure if I have time to implement that... I will check with my boss.. but if I do I will give you feedback!
Thank you very much!
-
Wednesday, July 18, 2012 4:40 PMHow about marking it as a reply or helpful then? :)


