maul-esel / ahkbook

a free online book about AutoHotkey!
http://maul-esel.github.com/ahkbook/index.html
Other
39 stars 22 forks source link

Add section to DllCall post #17

Closed Uberi closed 12 years ago

Uberi commented 12 years ago

When DLLs export variables directly, there's what seems to be an obscure way to read and modify these values: GetProcAddress(). Lexikos' answer gave me this technique, and I think it would be best to share this knowledge in a more widespread way.

Uberi commented 12 years ago

How is this? Is it readable enough, or should I separate the ternary operations into separate lines?

maul-esel commented 12 years ago

No, it's fine. One more thing might be: 64bit, especially the LoadLibrary / GetProcAddress return types (needs to be UInt for AHK classic and Ptr for AHK_L; not sure about UPtr).

Uberi commented 12 years ago

I separated the type selection out since it did make it a bit easier to read.

maul-esel commented 12 years ago

Besides the above comment, are you ready for merge?

Uberi commented 12 years ago

Nice catch. Yes, I'm ready for merge.

maul-esel commented 12 years ago

Thanks for your work!