ADXIEToolBarItem.ToolBarObj coming null

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

ADXIEToolBarItem.ToolBarObj coming null
ADXIEToolBarItem.ToolBarObj coming null and Add-on not getting loaded in IE ToolBar 
Ra Ang




Posts: 10
Joined: 2019-09-12
Hi,

I am using add-in express for building my add-on.
My add-on was getting loaded properly in IE toolbar.
For some reason, I git cloned the same code in new directory and deleted the older directory,
and now I am getting error in the code as "ToolBarObj" is null, the add-on is also not even showing up in the IE toolbar.

Here is the line of the code which shows how I am accessing the toolbar:-

[QUOTE]if (this.ToolBars[0].ToolBarObj != null)
    return (IEToolbar)this.ToolBars[0].ToolBarObj;[/QUOTE]


Here is the code that I have in "InitializeComponent" of IEModule-

this.toolbarModuleItem = new AddinExpress.IE.ADXIEToolBarItem(this.components);
this.toolbarModuleItem.HelpText = "Help Text";
this.toolbarModuleItem.LoadAtStartup = true;
this.toolbarModuleItem.MenuText = "adxieToolBarItem1";
this.toolbarModuleItem.Title = "Test";
this.toolbarModuleItem.ToolBarType = "Test.InternetExplorer.IEToolbar";
this.ToolBars.Add(this.toolbarModuleItem);


When I run the application, the add-on is not even showing up on my IE toolbar.
I tried to Unregister and Register the Add-On, but still it didn't solve the issue.
Can you please let me know, what might have gone wrong in my code?

Thanks in advance,
RA
Posted 20 Sep, 2019 04:58:35 Top
Andrei Smolin


Add-in Express team


Posts: 17361
Joined: 2006-05-11
Hello RA,

In IE, choose Tools | Manage Add-ons, find your add-on, select it, click More Information and check the path: if Enhanced Protected Mode is turned on, the path must point to Program Files.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 20 Sep, 2019 06:00:25 Top
Ra Ang




Posts: 10
Joined: 2019-09-12
Hi Andrei,

Thank you for the prompt reply.

On my machine, the "Enhanced Protected Mode" is Off and the path in the
"More information" is showing the path where my Add-On DLL is located.

Can you please let me know why the add-on is not event showing in the
IE toolbar? Also, why in the code the
ToolBarObj 
is null?

Thanks,
RA
Posted 20 Sep, 2019 06:45:20 Top
Andrei Smolin


Add-in Express team


Posts: 17361
Joined: 2006-05-11
Hello RA,

It is null if the add-on does not load. It looks like you have "Enable third-party browser extensions" disabled in IE options.

Also, check adxloader.log in c:\Users\<User name>\AppData\Local\Microsoft\Windows\INetCache\Low\<project name>\. Does it contain any errors or warnings?

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 20 Sep, 2019 09:30:10 Top
Ra Ang




Posts: 10
Joined: 2019-09-12
Hi Andrei,

The setting "Enable third-party browser extensions" is enabled on my machine.
I checked the adxloader.log, it is not showing any error as such.
Here is the log:-

Add-in Express Loader Log File: 09/23/2019 10:34:28:304

Loader version: 10.0.6240.0
IE Protected Mode: On
Operating System: Microsoft Windows 10 Professional (build 17763), 64-bit
Process Owner: Administrator
Command Line: "C:Program Files (x86)Internet ExplorerIEXPLORE.EXE" SCODEF:18544 CREDAT:9474 /prefetch:2
Run 'As Administrator': No
Process Elevated: No
Integrity Level: Low
UAC (User Account Control): On
------------------------------------------------------------------------
10:34:28:307 2100 18356 Start.
10:34:28:307 2100 18356 Creating a new instance of the add-on loader.
10:34:28:307 2100 18356 Loading mscoree.dll
10:34:28:308 2100 18356 INFO: Assembly codebase - C:myProj	est-ie-addon.dll.
10:34:28:401 2100 18356 INFO: Assembly version - 1.0.13.0.
10:34:28:401 2100 18356 Success.
10:34:28:401 2100 18356 Loading the configuration from the system registry.
10:34:28:402 2100 18356 Getting the latest CLR version.
10:34:28:405 2100 18356 The latest CLR version is 'v4.0.30319'.
10:34:28:405 2100 18356 The configuration has been loaded successfully.
10:34:28:405 2100 18356     Runtime version: v4.0.30319.
10:34:28:405 2100 18356     Assembly name: test-ie-addon, PublicKeyToken=2D44C7C5884A420F.
10:34:28:405 2100 18356     Class name: test.InternetExplorer.IEModule.
10:34:28:405 2100 18356     Registry key: CLSID{CA684F19-F519-4BC5-9047-AEC418A5536A}.
10:34:28:405 2100 18356 Creating tab window manager...
10:34:28:408 2100 18356 Success.
10:34:28:617 2100 18356 Attempting to create a new instance of the managed add-on class: CLR - v4.0.30319
10:34:28:617 2100 18356 Loading CLR: v4.0.30319.
10:34:28:617 2100 18356 Calling CLRCreateInstance method.
10:34:28:617 2100 18356 Success.
10:34:28:617 2100 18356 Calling GetRuntime method.
10:34:28:617 2100 18356 Success.
10:34:28:617 2100 18356 Checking if the hosting API of .NET Framework v4.0 beta is installed.
10:34:28:617 2100 18356 The hosting API is up to date.
10:34:28:617 2100 18356 Calling SetDefaultStartupFlags method.
10:34:28:617 2100 18356 Failed with flag 'STARTUP_LOADER_OPTIMIZATION_MULTI_DOMAIN_HOST' (HRESULT = -2147024809).
10:34:28:617 2100 18356 Calling GetInterface method for the CorRuntimeHost interface.
10:34:28:617 2100 18356 Success.
10:34:28:617 2100 18356 Starting CLR...
10:34:28:617 2100 18356 Success.
10:34:28:617 2100 18356 Getting the CLR version.
10:34:28:618 2100 18356 The CLR v4.0.30319 has been initialized successfully.
10:34:28:618 2100 18356 Creating a new domain setup.
10:34:28:618 2100 18356 Success.
10:34:28:618 2100 18356 Getting the add-in directory.
10:34:28:618 2100 18356 Success. The directory is 'C:myProj	est-ie-addoninDebug'
10:34:28:618 2100 18356 The configuration file is 'C:myProj	est-ie-addoninDebug	est-ie-addon.dll.config'
10:34:28:618 2100 18356 The 'shadow copy' is disabled.
10:34:28:618 2100 18356 Creating a new application domain.
10:34:28:619 2100 18356 Success.
10:34:28:619 2100 18356 Creating an instance of the managed class. Assembly identity: 'test-ie-addon, PublicKeyToken=2D44C7C5884A420F'
10:34:29:089 2100 18356 Success.
10:34:29:089 2100 18356 Unwrapping the managed class.
10:34:29:152 2100 18356 Success.
10:34:29:152 2100 18356 Querying the ObjectWithSite interface.
10:34:29:153 2100 18356 Success.
10:34:29:153 2100 18356 Querying the IOleCommandTarget interface.
10:34:29:153 2100 18356 Success.
10:34:29:153 2100 18356 Querying the IDocHostUIHandler interface.
10:34:29:154 2100 18356 Success.
10:34:29:154 2100 18356 Getting the dispid of the 'Dispose' method.
10:34:29:162 2100 18356 Success.
10:34:29:162 2100 18356 Getting the dispid of the 'InitializeModule' method.
10:34:29:163 2100 18356 Success.
10:34:29:163 2100 18356 Getting the dispid of the 'InitializeLoaderAPI5' method.
10:34:29:163 2100 18356 Success.
10:34:29:163 2100 18356 The managed add-on class has been created successfully.
10:34:29:673 2100 18356 Patching IDocHostUIHandler interface...
10:34:29:673 2100 18356 Success.
10:34:29:673 2100 18356 Patching IOleCommandTarget interface...
10:34:29:673 2100 18356 Success.
10:34:36:757 2100 18620 Start.
10:34:36:758 2100 18620 Creating a new instance of the add-on loader.
10:34:36:758 2100 18620 Success.
10:34:36:758 2100 18620 Loading the configuration from the system registry.
10:34:36:758 2100 18620 Getting the latest CLR version.
10:34:36:762 2100 18620 The latest CLR version is 'v4.0.30319'.
10:34:36:762 2100 18620 The configuration has been loaded successfully.
10:34:36:762 2100 18620     Runtime version: v4.0.30319.
10:34:36:762 2100 18620     Assembly name: test-ie-addon, PublicKeyToken=2D44C7C5884A420F.
10:34:36:762 2100 18620     Class name: test.InternetExplorer.IEModule.
10:34:36:763 2100 18620     Registry key: CLSID{CA684F19-F519-4BC5-9047-AEC418A5536A}.
10:34:36:763 2100 18620 Creating tab window manager...
10:34:36:768 2100 18620 Success.
10:34:36:771 2100 18620 Attempting to create a new instance of the managed add-on class: CLR - v4.0.30319
10:34:36:771 2100 18620 Creating an instance of the managed class. Assembly identity: 'test-ie-addon, PublicKeyToken=2D44C7C5884A420F'
10:34:36:771 2100 18620 Success.
10:34:36:772 2100 18620 Unwrapping the managed class.
10:34:36:772 2100 18620 Success.
10:34:36:772 2100 18620 Querying the ObjectWithSite interface.
10:34:36:772 2100 18620 Success.
10:34:36:772 2100 18620 Querying the IOleCommandTarget interface.
10:34:36:772 2100 18620 Success.
10:34:36:772 2100 18620 Querying the IDocHostUIHandler interface.
10:34:36:772 2100 18620 Success.
10:34:36:772 2100 18620 Getting the dispid of the 'Dispose' method.
10:34:36:772 2100 18620 Success.
10:34:36:772 2100 18620 Getting the dispid of the 'InitializeModule' method.
10:34:36:772 2100 18620 Success.
10:34:36:772 2100 18620 Getting the dispid of the 'InitializeLoaderAPI5' method.
10:34:36:772 2100 18620 Success.
10:34:36:772 2100 18620 The managed add-on class has been created successfully.
10:34:36:890 2100 18620 Patching IDocHostUIHandler interface...
10:34:36:890 2100 18620 Success.
10:34:36:890 2100 18620 Patching IOleCommandTarget interface...
10:34:36:890 2100 18620 Success.


Can you please let me know, what might have gone wrong in my code?

Thanks,
RA
Posted 23 Sep, 2019 00:18:44 Top
Andrei Smolin


Add-in Express team


Posts: 17361
Joined: 2006-05-11
Hello Ra,

Thank you for the log. It contains an indication of a problem: we suppose that there's an IE add-on that causes the issue.

Ra Ang writes:
10:34:28:617 2100 18356 Calling SetDefaultStartupFlags method.
10:34:28:617 2100 18356 Failed with flag 'STARTUP_LOADER_OPTIMIZATION_MULTI_DOMAIN_HOST' (HRESULT = -2147024809).


Could you please check if the issue reproducible with other IE add-ons turned off?

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 24 Sep, 2019 04:55:30 Top
Ra Ang




Posts: 10
Joined: 2019-09-12
Hi Andrei,

I tried to remove the reference to AddinExpress.IE in my add-on project. UnRegister and Register the add-on again.
And somehow it solved the issue.

Thank you for providing help.

Thanks,
RA
Posted 25 Sep, 2019 23:56:15 Top
Andrei Smolin


Add-in Express team


Posts: 17361
Joined: 2006-05-11
Hello RA,

Ra Ang writes:
And somehow it solved the issue.


A really mysterious one...

Thank you for letting us know!

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 26 Sep, 2019 00:43:36 Top
Ra Ang




Posts: 10
Joined: 2019-09-12
Hi Andrei,

The issue re-appeared on my colleague's machine.
The issue appeared when he tried to "Un-Register" through "Addin-Express-->Unregitser" context menu. He started getting the error.

We tried to UnRegister and Register again but no luck.
We cleaned up the loader log file to get the latest logs. Despite "UnRegister" and "Register" and restarting the solution the loader log file is still blank.

Can you please let me know what might be the cause for this issue? How can we solve it?
We are blocked on this issue, so any help will be appreciated.

Thanks,
RA
Posted 09 Oct, 2019 03:35:56 Top
Andrei Smolin


Add-in Express team


Posts: 17361
Joined: 2006-05-11
Hello RA,

ADXIEToolBarItem.ToolBarObj returns null if the toolbar is turned off (= not visible in IE). adxloader.log may not be created if Enhanced Protected Mode is on or if the add-on doesn't load.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 09 Oct, 2019 04:41:02 Top