Jump to content

Recommended Posts

Posted

hi guys..can you help me with this one..i have a dll written in vb6..

Public Function addMe(x As Integer, y As Integer) As Integer

addMe = x + y

End Function

how can i call it from autoit?

here's what i have tried so far..

dim $test
$test = DllCall("Project1.dll","int","addme","int",1,"int",2)
msgbox("","try",$test)

thanks in advance..

Posted

thanks for the reply sir but still doesn't work..

here's the error found after removing the error handler..

Subscript used with non-Array variable.:
msgbox("","try",$test[0])
msgbox("","try",$test^ ERROR
Posted

You shouldnt get an error really, it should exit.

dim $test 
$test = DllCall("Project1.dll","int","addme","int",1,"int",2) 
If @error then 
msgbox("","try",@error); look in the helpfile for @error codes for dllcall
exit 
endif  
msgbox("","try",$test[0]) ; dllcall returns an array

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Posted

yes, its just exiting and not doing the dll function that why i remove the error handler to find whats the error.

anyone who got solution for this?

Posted

yes, its just exiting and not doing the dll function that why i remove the error handler to find whats the error.

anyone who got solution for this?

Get out of the freaking box you're in.

Run the code JohnOne gave you.

♡♡♡

.

eMyvnE

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
×
×
  • Create New...