"Unable to create specified ActiveX control" error; registry entries all seem valid

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

"Unable to create specified ActiveX control" error; registry entries all seem valid
 
Bryan Lynn




Posts: 5
Joined: 2012-10-08
We have developed a Word add-in using ADX that makes use of custom task panes and this add-in is being used by hundreds of customers.

In the past week, we have had 3 completely different customers start to see "Unable to create specified ActiveX control" errors when they try to open a custom task pane in our add-in. To be clear, our add-in loads and runs fine; it's only when attempting to open/access a custom task pane that this error appears.

In all 3 instances of this error, the add-in (and the add-in's custom task panes) have worked fine. As far as the customers are concerned, nothing has changed about their Windows/MS Word environment; suddenly (and all within the past week) this started happening. The customers are different combinations of MS Word 2013/2016 and Windows 7/10.

Uninstalling and re-installing our add-in does not solve the problem; the "Unable to create specified ActiveX control" error still persists.

We have received registry exports from two of the customers and all appears good. That is:

* We can find the custom task pane GUID at "HKEY_CLASSES_ROOT\{ProgID}\CLSID"

* We can find the registry entries at both:

HKEY_CLASSES_ROOT\CLSID\{GUID}
HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{GUID}

All relevant registry entries (InprocServer32, Class, Assembly, CodeBase, etc.) look perfect.

We are baffled as to why this is happening. Like I mentioned, in all 3 instances, this seemingly "randomly" starting happening last week. Before last week, the custom task panes opened as expected.

Our questions to the ADX team:

1) Do you have any ideas or troubleshooting steps for us to take?

2) These customers are not running the latest release of ADX (9.1.4620). In the release notes for 9.1.4620, we see this:

>>> False positive reports for Add-in Express's binaries by some antivirus software

Is it possible this somehow an antivirus problem and perhaps antivirus changes were deployed to these customers and that is causing the issue? Again, the add-in itself is running fine; it's just the custom task pane that is causing this issue.

For your reference, below is what is being captured in our log file when this error occurs. This is logged every time one of these customers attempts to open a custom task pane in our add-in.

=======

<Entry LogLevel="Exception">
<DateTime>2018-07-17 21:01:03.762</DateTime>
<Process>9016</Process>
<Method>AddinExpress.MSO.ADXAddinModule.DoError</Method>
<Message>An unhandled exception was caught by the exception handler.</Message>
<Exception>
<Type>System.Runtime.InteropServices.COMException</Type>
<Source />
<Message>Unable to create specified ActiveX control.</Message>
<HResult>-2147467259</HResult>
<StackTrace>
at System.RuntimeType.ForwardCallToInvokeMember(String memberName, BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData&amp; msgData)
at AddinExpress.MSO.ICTPFactory.CreateCTP(String CTPAxID, String CTPTitle, Object CTPParentWindow)
at AddinExpress.MSO.ADXAddinModule.AddCustomTaskPanes(Object parent, String outlookFolderName)
</StackTrace>
</Exception>
</Entry>

=======

Thank you for your help!
Posted 18 Jul, 2018 19:54:35 Top
Andrei Smolin


Add-in Express team


Posts: 16334
Joined: 2006-05-11
Hello Bryan,

We have the following report in our mail:

We have many customers running an Excel Add-in developed with Add-in-express several years ago.
On windows 10 and on windows 7, respectively, the KB4054530 and the KB4338819 Windows updates pushed on July 10th introduce an issue.

Specifically, if the machine has UAC disabled, and they attempt to open Excel and load our add-in, the exception below is thrown -

Exception Source:
Exception Type: System.Runtime.InteropServices.COMException
Exception Message: Unable to create specified ActiveX control.
Exception Target Site: ForwardCallToInvokeMember

---- Stack Trace ----
System.RuntimeType.ForwardCallToInvokeMember(memberName As String, flags As BindingFlags, target As Object, aWrapperTypes As Int32[], msgData As MessageData&)
mscorlib.dll: N 0191 (0xBF) IL
AddinExpress.MSO.ICTPFactory.CreateCTP(CTPAxID As String, CTPTitle As String, CTPParentWindow As Object)
mscorlib.dll: N 00000 (0x0) JIT
AddinExpress.MSO.ADXAddinModule.AddCustomTaskPanes(parent As Object, outlookFolderName As String)
mscorlib.dll: N 0000 (0x0) IL


Since July 10th, we have about 30 companies with this issue.
All of the companies reporting issue so far have UAC Disabled.

We can remove these updates and return to normal operations.
Or we can enable UAC temporarily and re-install the Excel add-in and problem will go away However, Windows Update will re-push the update some time later and the problem returns Enabling UAC permanently resolves the issue as well.
We can't tell our customers to Enable UAC because I'm sure they will point out that it worked just fine before the update


We found one other article related to this issue that is not Office specific that describes the same problem reported about 5 days ago- https://answers.sap.com/questions/565393/net-framework-472-update-breaks-crystal-reports-wi.html


We try to get more information about this issue.

Could you please check if the following code works on an affected machine?

Sub ssdfsdfs()
Dim obj As Object
On Error Resume Next
Set obj = CreateObject("{the ProgId of your task pane here}")
If Err <> 0 Then
    Debug.Print "LastDllError", Err.LastDllError, "Number", Err.Number, "Source", Err.Source, "Description", Err.Description,
End If
On Error GoTo 0
If obj Is Nothing Then
    Debug.Print "Nothing"
Else
    Debug.Print "OK"
End If
End Sub


These are the steps to follow in order to check this code:

1. You need to register your add-in; this also registers the UserControl used as a Custom Task Pane. Start any Office application e.g. Excel, create a new workbook and press {Alt+F11} to open the VBA IDE. In the VBA IDE, in the Project window, locate the project corresponding to the new workbook, double-click the Sheet1(Sheet1) or ThisWorkbook item and paste the code above to the body of the module.

2. Make sure the code is compilable: see menu Debug | Compile {project name}.

3. Get the ProgId of your CTP: copy the value of the ControlProgId property of the ADXTaskpane object corresponding to your CTP; see the editor of Task Panes collection of the add-in module; or, see the InitializeComponent() method called from the module's constructor.

4. Replace the placeholder string in the code with the ProgId of your CTP

5. To run the macro, set the text cursor within the body of the method pasted, and Press {F5}. Then open the Immediate window; see the View menu or press {CTRL+G}. What’s printed in that window for you?

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 19 Jul, 2018 01:17:41 Top
Bryan Lynn




Posts: 5
Joined: 2012-10-08
Thank you for the information, Andrei.

We are working on reproducing this issue ourselves using the information you provided (the updates that cause this + UAC Disabled) and then will update this thread with the information you've requested.
Posted 19 Jul, 2018 11:56:51 Top
Andrei Smolin


Add-in Express team


Posts: 16334
Joined: 2006-05-11
Hello Bryan,

We've got a report from a customer who experiences the same issue.


We ran the VBA with our ProgID for our add-in’s task pane as you suggested in a Windows 7 environment with UAC disabled and July 10th Windows updates applied and this error occurs:

LastDllError 0 Number -2147024894 Source VBAProject Description Automation error
The system cannot find the file specified. Nothing

If we enable UAC after that and run the VBA, there is no error.

My original KB number were off and we investigated some more. What we are sure of right now is that the updates from last week are definitely involved, but nailing down which update is difficult.

We believe on Windows 7 and Windows 10, a part of this update causes our Excel Add-ins to fail to load when they previously worked (since 2013 they have worked with no issue.) :
https://support.microsoft.com/en-us/help/4340559/security-and-quality-rollup-updates-for-net-framework-2-0-sp2-3-0-sp2
https://support.microsoft.com/en-us/help/4338420/description-of-the-security-and-quality-rollup-updates-for-net-framewo


These updates have interesting language that may apply:
• An "elevation of privilege" vulnerability exists in .NET Framework that could allow an attacker to elevate their user rights level. To exploit the vulnerability, an attacker would first have to access the local computer, and then run a malicious program. This update addresses the vulnerability by correcting how .NET Framework enables COM objects. To learn more about this vulnerability, see Microsoft Common Vulnerabilities and Exposures CVE-2018-8202.

This is interesting because it specifically mentions .NET elevation and COM objects.


Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 23 Jul, 2018 01:19:51 Top
Andrei Smolin


Add-in Express team


Posts: 16334
Joined: 2006-05-11
Posted 25 Jul, 2018 06:13:13 Top