Results 1 to 4 of 4

Thread: Pointer to an Array of Objects

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jul 2000
    Location
    Ireland, Dublin
    Posts
    76

    Talking Pointer to an Array of Objects

    Hi,

    I need to know how to create a Pointer to an array of object handles...
    I need this to use the WaitForMultipleObjects API function.

    Does anyone have a sample of code to show how to use it

    Regards

    IJ...
    ---------------------------------
    TopMan
    ---------------------------------

  2. #2
    PowerPoster abdul's Avatar
    Join Date
    Dec 2000
    Location
    Ontario,Canada
    Posts
    2,827
    Won't something this work?
    PHP Code:
    int *mypointer myarray
    Baaaaaaaaah

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jul 2000
    Location
    Ireland, Dublin
    Posts
    76
    How do I add Handles to that array.

    I am Creating Threads and I get a Handle to them, now what I need is to have them in an array.

    I also need to know how to get the amount of HANDLES in the array. Would sizeof do the trick...??

    Regards

    IJ...
    ---------------------------------
    TopMan
    ---------------------------------

  4. #4
    PowerPoster abdul's Avatar
    Join Date
    Dec 2000
    Location
    Ontario,Canada
    Posts
    2,827
    How are you declaring the array? You want to declare an array of pointers of a pointer to an array? I think WaitForMultipleObjects returns a handle that you can simply pass to *mypointer (not mypointer). If you want to point to next item in the array (if you're using a pointer to an array), you can increase the pointer like this:
    PHP Code:
    mypointer++; 
    Baaaaaaaaah

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width