Jump to content

DLL Callback workaround?


Recommended Posts

Hello everyone.

There is a dll that I am using, which for a couple of functions requires me to set a callback function that it needs to send data to. As far as I know there is no native support for this in AutoIt as of yet, but I have an idea which maybe, maybe could work. How about passing it a pointer to a struct which has the types and elements that the function is supposed to have in it's header, and then check in a loop if the data in the struct has changed? If this approach works, I'd imagine that the struct data would change every time that the dll tries to call what it thinks is my function. Of course this is only a wild guess, if anyone has a better sollution I'd really appreciate some information.

Thanks in advance.

Regards

Philip Bennefall

Link to comment
Share on other sites

There are samples in the script forum using a wrapper dll to capture the callback and sending the data to your script with sendmessage (hmm, or postmessage) and a custom message ID (check GuiRegisterMsg). I think at least @Larry has a decent example and @ptrex? Not sure but there are several.

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