Jump to content
Sign in to follow this  
supergg02

Give the address of your function in DllCall

Recommended Posts

supergg02

In some DllCall, you need the "AddressOf your_autoit_Function_Name". this API parameter is lpFuncAddress .

Here is a little definition

lpFuncAddress= The address of a public function in your program, which must reside in a standard module and will be called from the DLL, to get the address just pass "AddressOf Function_Name" instead of lpFuncAddress.

would you please help me to give this lpFuncAddress in my DllCall

Here is my exemple:

Autoit code

Func My_autoit_func (...params= result sent by the dllcall...)

msgbox(1, "result sent by the dllcall" , parms)

EndFunc

Share this post


Link to post
Share on other sites
Valik

It's not possible yet. It's something I may try to work on in the upcoming weeks.

Share this post


Link to post
Share on other sites
seandisanti

It's not possible yet. It's something I may try to work on in the upcoming weeks.

i haven't tested this code at all, but it hit scripts and scraps a little while ago and noone called BS on it...

Share this post


Link to post
Share on other sites
Valik

i haven't tested this code at all, but it hit scripts and scraps a little while ago and noone called BS on it...

It's virtually worthless and doesn't do what the topic title claims. It uses EnumChildWindows to search for a child control in a window. Yes, it technically uses a callback function, however, the scripter has no control of the callback. Also, the way it's written is stupid. The functionality is so limited, it would of been easier to just write a Dll function which when called would do all the work done via DllCall(). It's just an elaborate charade.

What the OP of this thread is requesting and what I intend to implement is a system where we can provide an AutoIt user-defined function as the callback function where normally a C function is expected.

Share this post


Link to post
Share on other sites
seandisanti

It's virtually worthless and doesn't do what the topic title claims. It uses EnumChildWindows to search for a child control in a window. Yes, it technically uses a callback function, however, the scripter has no control of the callback. Also, the way it's written is stupid. The functionality is so limited, it would of been easier to just write a Dll function which when called would do all the work done via DllCall(). It's just an elaborate charade.

What the OP of this thread is requesting and what I intend to implement is a system where we can provide an AutoIt user-defined function as the callback function where normally a C function is expected.

cool. Yeah i was a little suspicious when that topic appeared, because he was claiming to be able to do what had been explained as 'impossible with current limitations", but not giving any code. i still haven't run into a need for that capability so i hadn't been able to test it. thanks for exposing it though!

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  

×