Automation interface.

Got a problem you cannot solve? Try here.
Post Reply
bokkie
Posts: 767
Joined: Sun Feb 08, 2009 6:30 am

Automation interface.

Post by bokkie »

Is it possible to use the automation interface in a .Net application? I tried adding the miaauto.dll as a reference hoping a COM wrapper would be created but .Net throws an invalid COM error when it tries to add the reference. I believe you can use the automation interface in Delphi but I need to target .Net specifically.

If it's possible, well and good. If not, I won't lose any kip time over it.
Peter. Smartly dressed, he still resembles an unmade bed.
InstallAware MVP
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Post by MichaelNesmith »

Hi Peter,

.NET can call arbitrary Win32 DLL's via a technique called P/Invoke. You just declare the function prototypes and then invoke them as if you were calling the standard Win32 API, there's no difference in the process.

You could also call our COM library, but I know miaauto.dll is more frequently updated, so I think P/Invoke is exactly what you need to do.
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
Post Reply