Results 1 to 5 of 5

Thread: Can you pass a pointer to something on to another thread?

  1. #1

    Can you pass a pointer to something on to another thread?

    I have a main exe that is creating a thread. I want to pass that thread a pointer to something, with the aim of the thread populating the object in the main exe. Is this possible? I mean, is a pointer valid within all memory space, or is the pointer specific to the memory space the exe uses?
    http://www.c5software.co.uk (site is being developed at the moment)

  2. #2

    Can you pass a pointer to something on to another thread?

    Do we have to test this?

  3. #3

    Can you pass a pointer to something on to another thread?

    Quote Originally Posted by Goliatus
    Do we have this?

    :?:
    http://www.c5software.co.uk (site is being developed at the moment)

  4. #4

    Re: Can you pass a pointer to something on to another thread

    Quote Originally Posted by Gadget
    I have a main exe that is creating a thread. I want to pass that thread a pointer to something, with the aim of the thread populating the object in the main exe. Is this possible? I mean, is a pointer valid within all memory space, or is the pointer specific to the memory space the exe uses?
    Threads shares data memory. You can access your data structure with whatever thread you like, but you must sincronize the access to shared resources, using semaphore, mutex, critical section, event and other sincronization object.
    You should read some tutorial or theory on thread and concurrency before implementing your code.
    If you save your data in a proprietary format, the owner of the format owns your data.
    <br /><A href="http://msx80.blogspot.com">http://msx80.blogspot.com</A>

  5. #5

    Can you pass a pointer to something on to another thread?

    Thanks for that, reading up what I need to know now.
    http://www.c5software.co.uk (site is being developed at the moment)

Bookmarks

Posting Permissions

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