Jump to content

VB.Net dll trouble


mberry
 Share

Recommended Posts

I am somewhat new to .NET and am having difficulty making a valid reference to the AutoItX3 dll file. I am coding in VB using Visual Studio 2005 Professional and the 2.0 Framework. So far, I have only been adding references to the .NET framework, this is my first attempt at adding a COM dll...

As a very simple test, I made a windows application project and I added a project reference to c:\Program Files (x86)\AutoIt3\AutoItx\AutoItX3.dll and then tried to test it using a button click on my default form. I opened the windows Calculator app to perform a simple test...

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

Dim obj1 As New AutoItX3Lib.AutoItX3

obj1.WinExists("Calculator")

End Sub

It fails on the Dim line and says...BadImageFormatException was unhandled. Retrieving the COM class factory for component with CLSID {1A671297-FA74-4422-80FA-6C5D8CE4DE04} failed due to the following error: 800700c1.

I am able to use the dll successfully in old school vba in a similar way - just add a reference, then instantiate the AutoItX3 class, but I am missing something in .NET - can anyone help?

Thanks.

Link to comment
Share on other sites

  • 1 year later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...