Use 64 bit ActiveX component from a .NET assembly

2012-Jul-24 | Tags: cadprograming

Start64!I've been using the ADN utilities, which include some ActiveX controls. Now I'm migrating my project to x64 OS and have downloaded the 64 bit version of the controls, however I cannot place them on my Form in Visual Studio.

Solution -  Visual Studio is 32 bit on a 64 bit operating system as well, and it does not support 64 bit ActiveX components in the Form Designer. What you could do is create the component programmatically in your code.

In the following example I will be adding the AcadColor.ocx control to my .NET Form.

First, we need to create a wrapper for the ActiveX control. I start up Visual Studio 2008 x64 Win64 Command Prompt, go to the directory where the control is and run aximp.exe on it: Note: in case of Vista/Windows 7 you need to run the Command Prompt utility with elevated rights - right-click on the Command Prompt shortcut and select Run as administrator

facebook-3 twitter-3 rss-3 email-3