Jump to content

Dll Call Problem


kizsdet
 Share

Recommended Posts

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..

Link to comment
Share on other sites

Dont know anything about vb but

dim $test 
$test = DllCall("Project1.dll","int","addme","int",1,"int",2) 
If @error then 
exit 
endif  
msgbox("","try",$test[0]) ; dllcall returns an array
Edited by JohnOne

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

Monkey's are, like, natures humans.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Link to comment
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
 Share

  • Recently Browsing   0 members

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