We have an application with a C++ ActiveX control, a .exe and several dlls.
I'm currently in the process of compiling all source code with VS2010 for .NETv4 and x64.
All binaries are OK now except for the AxInterop dll for the ActiveX control.
With VS2008 I create the x86, .NET3.5 AxInterop dll by creating a new Windows Form solution, add a reference to the ocx and drag the control on the form. Now VS2008 generates the AxInterop and Interop dlls for me. Those work fine.
I can do the same with VS2010 and the x64 ocx except for the part when I drag the control on the form. Because the control is x64 VS2010 cannot handle it.
So I tried AxImp.exe: "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\NETFX 4.0 Tools\x64\aximp.exe" MapWinGIS.ocx /out:AxInterop.MapWinGIS.dll
This is generating the AxInterop dll with a slightly different file size then the x86 version.
When I open both in IL DASM I see both have the same properties and methods. But when I use the manually generated AxInterop (which is still x86 BTW) I'm getting all kinds of compile errors in my other dlls and the exe.
After a closer look I see that some properties/methods on the correct version are:
class [Interop.MapWinGIS]MapWinGIS._DMap AxMapWinGIS.AxMap::ocx
but in the manually generated version:
View Complete Post