|
-
Oct 26th, 2001, 08:04 AM
#1
Thread Starter
Fanatic Member
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.
-
Oct 26th, 2001, 08:18 AM
#2
A Thread is a specifically designated space within which an application runs.
-
Oct 26th, 2001, 02:27 PM
#3
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.
-
Oct 27th, 2001, 05:42 PM
#4
Registered User
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|