Sign in to follow this  
Followers 0
frankzappa

Problems using my DLL

3 posts in this topic

Hey all,

i'm trying to use a DLL i wrote with my autoit script, but i'm stuck with a problem.

The DLL is ready, everything seems fine with it, so i wrote thos lines in my autoit script:

CODE
$DLL = DllOpen("DaBrainDll.dll")

$i = DllCall($DLL, "int", "StartUp")

msgbox(0, "", $i & " " & @error)

So, the call to DLLOpen is working ($DLL = 1), but the call to the function do not have any answers, i mean, the msgbox is empty...

Just to show how things are on the other side, my .def file for the DLL is

EXPORTS

StartUp

ShutDown

ReadEvents

SetXML

Action

And the .cpp is like this:

int _stdcall StartUp() {etc...}

Well, do someone see something wrong here?

thanks.

Share this post


Link to post
Share on other sites



$DLL = DllOpen("DaBrainDll.dll")
$i = DllCall($DLL, "int", "StartUp")
msgbox(0, "", $i[0] & " " & @error)

you call return an array back

Share this post


Link to post
Share on other sites

$DLL = DllOpen("DaBrainDll.dll")
$i = DllCall($DLL, "int", "StartUp")
msgbox(0, "", $i[0] & " " & @error)

you call return an array back

hohoho, exact answer. Thanks mate, now its working!

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