Jump to content

DLLCall and Windows API questions


Sokko
 Share

Recommended Posts

I'm not very learned in the ways of DLL calling, so I have a few questions for the experts here.

1) If a DLL function accepts a pointer as a parameter that, after the function returns, will point to some return value, how do you handle that? Structs?

2) What happens if you need a pointer inside a struct? MSDN always says you need a "pointer to a string" or a "pointer to an array" instead of an actual string or array. Does AutoIt handle this automatically?

3) How do you get a string into a struct, anyway? What about Unicode strings? (for example the "PCWSTR" type, which apparently is a pointer to a Unicode string)

4) What should you do if a piece of a struct is a "union{...}" of two different types, and the function expects it to be one type or the other based on some other parameter? Do you just use the single type that matches the way you're using it?

5) If you don't want or know how to use a callback function, what types/values should be used in a struct for a "pointer to a callback function" and a "pointer to application-defined reference data"?

Answers and/or explanations for any of these questions are much appreciated. Thanks!

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