Kris123 Posted March 23, 2009 Posted March 23, 2009 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]) EndFuncBut is not working .Please help me. Thanks in advance.
Moderators SmOke_N Posted March 23, 2009 Moderators Posted March 23, 2009 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now