Sign in to follow this  
Followers 0
=sinister=

Function not found in dll.

6 posts in this topic

#1 ·  Posted (edited)

I can never seem to call a function in a dll... @error always returns 3 (For function not found...)

using System;
namespace Test
{
    public class Runner
    {
        public String test()
        {
            return ("test");
        }
    }
}

There is my dll. I compile it, everything is fine.

I don't know too much about C#, and it's the first time I have tried creating a dll.

Here is my autoit dll call:

$dll = DllOpen(".\mydll.dll")
     $test = DllCall($dll, "str", "test")
     MsgBox(0, "Debug", @error)
DllClose($dll)
Edited by =sinister=

Share this post


Link to post
Share on other sites



I can never seem to call a function in a dll... @error always returns 3 (For function not found...)

using System;
namespace Test
{
    public class Runner
    {
        public String test()
        {
            return ("test");
        }
    }
}

There is my dll. I compile it, everything is fine.

I don't know too much about C#, and it's the first time I have tried creating a dll.

Here is my autoit dll call:

$dll = DllOpen(".\mydll.dll")
     $test = DllCall($dll, "str", "test")
     MsgBox(0, "Debug", @error)
DllClose($dll)
Try

$dll = DllOpen("mydll.dll")

or

$dll = DllOpen("mydll")

or

$dll = DllOpen("full path\mydll.dll")

just kidding :)

Did you say C#?


♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites

Um.. yes, my dll is written in C#.

Share this post


Link to post
Share on other sites

Um.. yes, my dll is written in C#.

You probably need devs for that.

Read this


♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites

Hi,

Can you attach your dll to your post?

Cheers

Share this post


Link to post
Share on other sites

I've changed it a little:

using System;
using System.Windows.Forms;
namespace Test
{
    public class Runner
    {
        public void test()
        {
            MessageBox.Show("Why isn't this working >=O");

        }
    }
}

ClassLibrary1.dll

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  
Followers 0