jethrow
Joined: 24 May 2009 Posts: 1907 Location: Iowa, USA
|
Posted: Fri Dec 18, 2009 4:21 pm Post subject: |
|
|
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. _________________
- in case I forgot to smile
Basic Webpage Controls
COM Object Reference |
|