AutoHotkey Community

It is currently May 27th, 2012, 12:40 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: December 18th, 2009, 12:55 pm 
Offline

Joined: January 5th, 2008, 12:11 am
Posts: 102
Is it possible? How?

WaitForMultipleObjects @ http://msdn.microsoft.com/en-us/library ... 85%29.aspx


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 18th, 2009, 5:16 pm 
Offline

Joined: April 15th, 2009, 12:05 am
Posts: 75
Location: Italy
try this (by heresy)
you'll find there links to Lexikos utility to translate API structures into AHK as well as the DllCall() snippet-er by heresy himself and the windows constant bible by SKAN... enjoy

_________________
Intel Centrino @ 2.8GHz
4 GB RAM
WIN XP SP3


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 18th, 2009, 5:21 pm 
Offline
User avatar

Joined: May 24th, 2009, 5:35 am
Posts: 2099
Location: Iowa, USA
I just recently learned this, so here you go:
A Byte is 8 bits; a handle (lpHandles) is a 32-bit integer - which is 4 Bytes; if you want an array with 3 handles, you first need to set the capacity:
Code:
VarSetCapacity( lpHandles, 3 * 4 ) ; set variable capacity to 12 Bytes
For this example, keep in mind that array indices start at 0. Now you have a variable that is 12 Bytes; since each handle is 4 bytes, you will put the handles in this variable at the locations 0,4,8 :
Code:
NumPut( handle0, lpHandles, 0 * 4 ) ; handle0 contains the first handle
NumPut( handle1, lpHandles, 1 * 4 ) ; handle1 contains the second handle
NumPut( handle2, lpHandles, 2 * 4 ) ; handle2 contains the third handle
Now, you should be able to pass the second parameter of the DllCall as:
Code:
 , "Uint", &lpHandles
There is an example of the DllCall in this thread. I have not tested this, so if anyone notices I've given wrong information, please correct me :) . Hope that helps.

_________________
Image
Recommended: AutoHotkey_L
Basic Webpage Controls


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 18th, 2009, 10:40 pm 
Offline

Joined: January 5th, 2008, 12:11 am
Posts: 102
So all simulating an array takes is simply putting elements' data to adjacent memory addresses and then using the "starting address" as a pointer? Nice!


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], Leef_me, Ohnitiel, XstatyK, Yahoo [Bot] and 15 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group