COMException thrown by an OCX Control

0

We are porting all of our project to support 64-bit platforms. All the OCX controls are migrated to target 64-bit. However, I see this error

ClassFactory cannot supply requested class (Exception from HRESULT: 0x80040111 (CLASS_E_CLASSNOTAVAILABLE))

when I use an AxInterop for the OCX control and invoke EndInit() on it in the InitializeComponent() of the winForm. The same control is also utilized in many other WinForm applications where I do not see this particular issue. So, I am guessing its not an issue with the control as such.

However, I observed a rather odd behavior with the form. There are two different OCX controls. One control is added twice(as in with two different names) and the second control is added only once. So, if I remove any one of these from the form or comment it out, I do not observe this exception anymore.

I have tried re-registering the control, regenerating Interops, however, that hasn't helped till now.

c#
com
ocx
asked on Stack Overflow Sep 9, 2016 by Siddhant

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0