32-bit ActiveX control in a 64-bit .NET application

I am creating a C # .Net application that I want to compile for "All processors". I also want to include a specific ActiveX control in the user interface of this application, but the ActiveX control I'm trying to use does not support 32 bits. Is there any trick or job that I can use to use this control to work?

How to embed an ActiveX control in a web browser control? Will this work?

+3
source share
2 answers

You need to run the ActiveX control in a separate 32-bit process. It will be difficult, it will have its own window, which will not be part of the user interface of your 64-bit process. Although this is explicitly prohibited by the SDK docs, you can try using the Windows 3 application built into the SetParent () API function. It might work.

You will have many additional problems, the connection between the processes is quite complicated (you will need Remoting or WCF), the hard part deals with exceptions. One bombardment process from another survives and never notices that something is wrong, will not be beautiful.

Perhaps the Target Target option is starting to seem attractive?

+2
source

You cannot load 32-bit components into a 64-bit application, but you can wrap the component in your own process and use IPC to use the functions of this component. Of course, this may not be possible depending on the actual component.

+2
source

Source: https://habr.com/ru/post/908144/


All Articles