Search code examples
visual-studioactivex

Can't use ActiveX component, built on Visual Studio 2019


I have an ActiveX control that I build in Visual Studio. But once registered, it cannot be used. Specific examples:

  1. It builds on Visual Studio 17 with all the latest updates, successfully registers and controls can be used, for example, in RadStudio, in Visual Basic, in C # in the studio, etc.

  2. It builds on Visual Studio 19 with all the latest updates, registers successfully, but RadStudio does not see it. And in VisualBasic, the component is visible, but when you try to add it to the form, an "Unspecified Error" error pops up. At the same time, everything is ok in the studio in C #: everything sees and works.

At the same time, the source codes are absolutely the same, all those compilation flags, linking, etc. What could be the reason?


Solution

  • Ok. I found reason. Somehow in my vs2019 PreferredToolArchitecture was set to x64 instead of x86. By changing it to x86 everything becomes good.