Jump to content
Sign in to follow this  
lokster

Question about DllStructSetData and "int[]"

Recommended Posts

lokster

I have a function that is similar to this:

Func _update($buffer)
    Dim $bits = DllStructCreate("int["&UBound($buffer)&"];")
    For $i = 0 To UBound($buffer)-1
        DllStructSetData($bits,1,$buffer[$i],$i+1)
    Next
EndFunc

The $buffer is array of integers. Is there a faster way to fill the $bits structure, instead of using the for..next loop?

:Edit

Sorry, this topic was for the "General Help and Support" forum... my mistake.

But I still need help. Anyone?

Edited by lokster

Share this post


Link to post
Share on other sites
Richard Robertson

I think you are just screwed here because of the way the structs are set up. I may be wrong, but I believe that is the only way you can do this.

Share this post


Link to post
Share on other sites
lokster

I think I am realy screwed... Too bad. I was working on something like framebuffer graphics functions- take an array[WIDTH*HEIGHT] of integers and draw it on the screen with only one function call. Each element of the array represents the color of one pixel. Something like PTC library in FreeBasic.

But it looks like, this is too big task for AutoIt... :rolleyes:

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  

×