Sign in to follow this  
Followers 0
Ramnath

Dll call

3 posts in this topic

Hi All,

I have created my own dll by using win32 dynamic linked lib and added one function with that(int __declspec(dllexport) callTest(int ,int )). I tried to call this from autoit by using function DllCall() but it always returns 0.

Im new to this area. Please help me.

Code:

$dllhandle = DllOpen(@ScriptDir & "\autoitdll.dll");

ConsoleWrite($dllhandle & @CRLF)

$AddResult = DllCall("autoitdll.dll","int:cdecl","callTest","int",5,"int",6)

Thanks,

Ramnath

Share this post


Link to post
Share on other sites



Hi,

Welcome to the forums. Regarding your post in another topic, there was no need to post in both places.

I noticed you opened the dll and didn't use it in your dllcall function!

So it should be something like:

$dllhandle = DllOpen (....)

$addresult = DllCall($dllhandle, ....)

Also Please remember to only bump your topic once in a 24-hour-period.

Cheers,

Brett

Share this post


Link to post
Share on other sites

Hi All,

I have created my own dll by using win32 dynamic linked lib and added one function with that(int __declspec(dllexport) callTest(int ,int )). I tried to call this from autoit by using function DllCall() but it always returns 0.

Im new to this area. Please help me.

Code:

$dllhandle = DllOpen(@ScriptDir & "\autoitdll.dll");

ConsoleWrite($dllhandle & @CRLF)

$AddResult = DllCall("autoitdll.dll","int:cdecl","callTest","int",5,"int",6)

Thanks,

Ramnath

Next line of that script is kind of crucial to even be able to tell if your question have sense. Post it.

♡♡♡

.

eMyvnE

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