Sign in to follow this  
Followers 0
Kris123

Multithreading in AutoIT

2 posts in this topic

Hi all,

I want to introduce multithreading concept in my code to reduce no of exes.

So i have created a function, where it was an exe before and using DllCallbackRegister and DllCallbackGetPtr.

and i am calling the Thread_Create as

$hThread = _Thread_Create(0 ,0, DllCallbackGetPtr($hadmin_ipsca), 0, 0)

Func _Thread_Create($lpThreadAttributes, $dwStackSize, $lpStartAddress, $lpParameter, $dwCreationFlags)
    Local $result = DllCall("kernel32.dll","ptr","CreateThread", "ptr", $lpThreadAttributes, "dword", $dwStackSize, "ptr", $lpStartAddress, "ptr", $lpParameter, "dword", $dwCreationFlags, "dword*", 0)
    Return SetError($result[0]=0,$result[6],$result[0])
EndFunc

But is not working .

Please help me. Thanks in advance.

Share this post


Link to post
Share on other sites



Hi all,

I want to introduce multithreading concept in my code to reduce no of exes.

So i have created a function, where it was an exe before and using DllCallbackRegister and DllCallbackGetPtr.

and i am calling the Thread_Create as

$hThread = _Thread_Create(0 ,0, DllCallbackGetPtr($hadmin_ipsca), 0, 0)

Func _Thread_Create($lpThreadAttributes, $dwStackSize, $lpStartAddress, $lpParameter, $dwCreationFlags)
    Local $result = DllCall("kernel32.dll","ptr","CreateThread", "ptr", $lpThreadAttributes, "dword", $dwStackSize, "ptr", $lpStartAddress, "ptr", $lpParameter, "dword", $dwCreationFlags, "dword*", 0)
    Return SetError($result[0]=0,$result[6],$result[0])
EndFunc

But is not working .

Please help me. Thanks in advance.

1. You posted in the GUI forum.

2. Learn to use the search feature: http://www.autoitscript.com/forum/index.ph...%2BCreateThread

3. Moving to support


Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

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