Jump to content

How to return an array from a DLL?


AZJIO
 Share

Recommended Posts

I've wondered about this.

In order for a dll to fill an array passed by autoit, I fear you might need to know the variant type of an autoit array, and moreover that type might have to be supported as a passable value in DllCall.

I think Struct pointer might be the only way, and be sure also to pass it's size.

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Link to comment
Share on other sites

Perhaps, but knowing they are pointers is not enough, In C++ you need to know what type of data a pointer points to.

And we are full circle.

I'm sure you know about DllStructGetPointer and DllStructGetSize.

Edited by JohnOne

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Link to comment
Share on other sites

  • 2 weeks later...
  • 6 years later...

Hi Azjio,

I'm working on the same problem how to solve this problem. Principally the problem is the same whether to pass an array with reals or integers or other types. Actually I think about a 'work around' by RAM-Disks. But maybe one of the next Autoit-versions provide a solution, maybe also even with n-dimensional arrays and structs. But there is also another question. If memory was allocated by a function located in a Dll and there was a way to move the result to Autoit, is there a possibility to free this memory from the side of Autoit?
Actually I am pretty new in this forum, but I'm extremly interested to work through the possibilities and to overcome some problems. Do you know who would be the right member in the group of developers of Autoit to address questions and ideas?

All the best, kind regards!

 

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