IE11 Process Management

Add-in Express™ Support Service
That's what is more important than anything else

IE11 Process Management
How can Add-In event processing operate across different IE 11 processes 
Subscribe
Louis Naber




Posts: 6
Joined: 2018-08-04
The use case for my Add-In is to recover from navigation errors caused by network and server outage in an enterprise setting.

The design is to detect a navigation error and display a local page to indicate out-of-service. Then start a timer that triggers an http request to verify the server is available after which a recovery url is loaded.

It appears as if the timer task is not triggered which may be to IE 11 running another process to display the out-of-service page and thus losing the timer task.

Can the loadinmainprocess configuration set to true force the Add-In to remain active in a process? Or is there another design to provide this function?

Best
~ Louis
Posted 19 Apr, 2019 14:46:03 Top
Andrei Smolin


Add-in Express team


Posts: 16325
Joined: 2006-05-11
Hello Louis,

Loadinmainprocess doesn't support IE 11; we don't recommend using it at all.

You should use a broker application to support some global settings and to let your tabs (in different IE processes) communicate with each other. Please have a look in section Protected Mode, see the PDF file in the folder {Add-in Express}\Docs on your development PC.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 22 Apr, 2019 09:02:40 Top
Louis Naber




Posts: 6
Joined: 2018-08-04
I love the broker architecture you've included! I got it up and running quickly.

Is there a way for the AddOn to receive events from the broker? I'd need to have the broker perform the network checks and then trigger the AddOn once the recovery is ready which could be a long time.

Thanks
~ Louis
Posted 22 Apr, 2019 15:21:45 Top
Andrei Smolin


Add-in Express team


Posts: 16325
Joined: 2006-05-11
Hello Louis,

        private uint WM_NETWORK_CHECK_IS_DONE = 0;

        [DllImport("User32.dll", CharSet = CharSet.Auto)]
        public static extern uint RegisterWindowMessage([MarshalAs(UnmanagedType.LPWStr)] string lpString);

        [DllImport("User32.dll")]
        public static extern int PostMessage(IntPtr hWnd, uint Msg, IntPtr wParam, IntPtr lParam);

        private void IEBrokerModule_OnInitialize(object sender, ADXIEBrokerInitializeEventArgs e)
        {
            WM_NETWORK_CHECK_IS_DONE = RegisterWindowMessage("MyMessage_WM_NETWORK_CHECK_IS_DONE");
        }

        private void NotifyAllTabs(IntPtr myData)
        {
            foreach (ConnectionData connection in this.ActiveConnections)
            {
                PostMessage(connection.NativeWindowHandle, WM_NETWORK_CHECK_IS_DONE, myData, IntPtr.Zero);
            }
        }


Now you need to filter out and handle that message in the module's OnSendMessage.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 23 Apr, 2019 04:21:29 Top