Jump to content
Sign in to follow this  
E1M1

How to call C# made DLL?

Recommended Posts

E1M1

C#

namespace test
{
    public class test
    {
        public static string testreturn()
        {
            return "this is a test return string";
        }
    }
}

au3

$call = DllCall("test.dll","str","testreturn")
MsgBox(0,0,@error)

msgbox displays 3. any ideas what to do?

Edited by E1M1

edited

Share this post


Link to post
Share on other sites
Richard Robertson

It won't ever work like that because the .Net framework doesn't compile native dlls.

AutoIt cannot load .Net dlls right now. I've been working on a way to do so but it's not easy or simple.

Share this post


Link to post
Share on other sites
Fubarable

If you know some C, you could probably use MS Visual Studio write a small C utility program to create a DLL that can then make calls to the .NET DLL.

Share this post


Link to post
Share on other sites
Richard Robertson

Yes, a 3rd party middle man is required currently. However it will be limited to specific calls unless you can come up with some easy to use but fully accessible system.

Share this post


Link to post
Share on other sites
E1M1

maybe make C++ dll that receive whole DllCall() as string, then executes it by autoit rules, and then return array. I heard about plugins for au3 maybe these could help.


edited

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

×