Jump to content

Recommended Posts

Posted

Are you tired of this?

$ret = DllCall("somedll.dll", "whatever", "function")
$ret2 = DllCall("anotherdll.dll", "whatever", $ret[0])
Return $ret2[4]
Do you wish you could do this?
Return DllCall("anotherdll.dll", "whatever", DllCall("somedll.dll", "whatever", "function")[0])[4]
Now you can do fancy DLL stuff all on one line with this function!
Func e($aArray, $iElement = 0)
    Return $aArray[$iElement]
EndFunc
I keep the name short to minimize the amount of typing you have to do. The function I have created can turn the above code into this:
Return e(DllCall("anotherdll.dll", "whatever", e(DllCall("somedll.dll", "whatever", "function"))), 4)
The purpose of this function is to minimize the amount of code you have to type if you need quick access to any element in a one-dimensional array. I hope you like it!

Comments or questions are greatly appreciated! B)

Posted

Now you can do fancy DLL stuff all on one line with this function!

Func e($aArray, $iElement = 0)
    Return $aArray[$iElement]
EndFunc
That's awfully ingenious B)

But I still get to type in the awful .DLL call :o

I am endeavoring, ma'am, to construct a mnemonic circuit using stone knives and bearskins.SpockMy UDFs:Deleted - they were old and I'm lazy ... :)My utilities:Comment stripperPolicy lister 1.07AutoIT Speed Tester (new!)

Posted

(would be cool if autoit actually made it build-in the way you did it in the 2nd box)

Yeah, that would be much nicer. Sadly it would just seem too weird for me. B)

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...