« First look at DirectX, DirectShow | Main | SHDocVw, Microsoft Web Browser ActiveX Control »

ActiveX interop & aximp.exe tool.

A wrapper has to be created for an ActiveX control before it can be used. This can be done manually by declaring C# classes with the appropriate attributes. The easy way is to use aximp.exe, when it works.

 

aximp.exe can be used manually, in which case you add references to the generated Foo.dll and AxFoo.dll manually, or automatically, by customizing the toolbox with a reference to the control and then dragging it onto a form. In this case the dll’s are named AxInterop.SHDocVw.dll and Interop.SHDocVw.dll.

If you only add a reference to the COM control to the project’s references folder, things don’t seem to work.

Comments

Thank you for posting this. It saved my day.

Jason

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)