32bit & 64bit ActiveX with same GUIDs?
I have an MFC ActiveX control building in VS2010. I can build 32 or 64 bit versions which register and run fine from 32 and 64 bit target apps.
The problem is the 64 bit version of the control cant be added to the toolbox in VS and therfore dropped on the form in designer view (which some customers like to do). The control also contains some GUI items which are more troublesome to add programmatically.
Can i build both versions of the control with the same guids? Would this allow the 32bit version to go into the toolbox but the 64 bit one to be used at runtime if the final application is targetted at x64?
Or is there another way of getting the toolbox support with a 64 app and ActiveX?
Although it can generate 64 bits applications, Visual Studio 2010 is a 32 bits application so you can only add to the toolbox 32 bits version of ActiveX controls. It's highly recommended that you use the same guids for 32 and 64 bits versions of your control so it will be correctly referenced when your application is compiled for 32 and 64 bits.