Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to generate AxInterop files?

Tags:

interop

We have a .NET project that relies on an old VB6 OCX (The entire thing was originally VB6 and C++ and we are gradually migrating it all to .Net but we need it working in its present half-migrated state). One of our developers can build the project but no-one else can.

The developer finds that he has references to an interop.foo.dll file and an AxInterop.foo.dll, both of which exist.

I have built the VB6 project and added a reference to the OCX into my copy of the .NET project by browsing to it. I now have a reference to the interop.foo.dll, which exists, but I do not have a reference to the AxInterop.foo.dll and that file does not exist either. I also have errors like "Type 'AxFoo.AxocxFoo' is not defined" which stop the project building.

How would I go about generating this AxInterop.foo.dll file and referencing it? I can see lots of StackOverflow questions about what these files are but nothing saying how they are generated!

Many thanks,

--- Alistair.

like image 710
user41013 Avatar asked Nov 14 '11 13:11

user41013


1 Answers

I have solved it: the solution is to use the aximp.execommand-line tool.

References

  • Equivalent question and answer on a Microsoft forum

  • MSDN page about aximp.exe(Windows Forms ActiveX Control Importer)

like image 90
2 revs Avatar answered Nov 05 '22 10:11

2 revs