Results 1 to 4 of 4

Thread: What is Windows Threads?

  1. #1

    Thread Starter
    Fanatic Member Geespot's Avatar
    Join Date
    Oct 2001
    Location
    Birmingham, UK
    Posts
    577

    What is Windows Threads?

    I have just read up and wrote a small app that displays all the windows classnames and hwnds that is running on the current Thread.

    Thing is the book doesnt actually say what is a Thread.

    Is a Thread like a certain amount of memory allocated for that specific app?, i just dont know.
    Its puzzling me because when i view all the windows information in the VB IDE, i get all of the VB IDE classnames and hwnds too, but with standalone ithey are not present.

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333
    A Thread is a specifically designated space within which an application runs.

  3. #3
    jim mcnamara
    Guest
    Threads have their own limited process space, but they also share process space with their parent process. Threads operate independantly on their own data.

    During runtime, every time you add a listbox to a form, there is a separate thread created to support it.

  4. #4
    Registered User Nucleus's Avatar
    Join Date
    Apr 2001
    Location
    So that's what you are up to ;)
    Posts
    2,530
    Non techy description:

    When you run an application, it runs in a compartmentalised part of memory called its process space. With NT this means that if one application fails, its process space is separate from other applications meaning it doesn't crash windows if it falls over.

    The application may run more than one thread to allow for asynchronous processing within the process space of your application. You can create a separate thread in VB by creating an active x exe, or by calling apis with the appropriate flags set (eg using the messagebox api to create an async message box).

    So you have one process for an application which has one or many threads as it executes.

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