What type of multi-threading does VB6 implement?

Answer Posted / manish

If you've so much as cracked a book on COM, you've undoubtedly come across the term apartment, which describes the constructs in which COM objects are created. If you're unfamiliar with this concept, the often-used analogy of an apartment building may help to clarify.
If you think of the building as an application's process, each apartment is a distinct area in which a COM object can be created. As with the more tangible kind of apartment, a COM apartment is a fairly self-contained unit that shares some similarities with other apartments in the same building/process. But just as there may be lofts, studios, and 2- or 3-bedroom apartments in the same building, there can also be different types of COM apartments within a process. Apartments may also be vacant or have any number of people/objects living in them.
It may be helpful to remember a few key points about COM apartments:
An apartment is not a thread. The one-to-one relationship between threads and single-threaded apartments may lead you to believe that the two terms are interchangeable—they are not.
An object is not an apartment. Objects are created in apartments.
A particular instance of an object can belong to only one apartment.
An apartment's concurrency model, whether it is single-threaded or multi-threaded, cannot be changed after it is created.
A process can have zero or more single-threaded apartments—one for each thread that calls CoInitialize.
A process has one multi-threaded apartment or none at all—all threads that call CoInitializeEx with COINIT_MULTITHREADED share the same apartment.

From microsoft

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the use of Active Control Property?

1463


How can you Navigate from the DHTML application to another DHTML application? .

1359


VB ActiveX: Create a "drivelist"(D1) box, a "folderlistbox"(FLD1) that changes whenever D1 is changed , and a "FilelistBox"(FIL1) that is populated with the file lists under the selected directory in (D1).The file selected is stored in a variable "filename" along with the path. Question: How to use this activeX control in VC++ to get the selected filename?

1521


How would you convert a form into document?

1634


How do you avoid the "Invalid use of null" error when reading null values from a database?

1112






Which method is used to write context Into file?

1569


What is hyperlink?

1621


What is shortcut menu and explain "The ole control's shortcut menu".

553


What is ado in vb.net?

505


I get a "file not found" error on the IIF function when I distribute by program. Why?

1042


How do I force a file dialogue box to reread the currect disk?

948


DHTML Is used for what?

1409


How many File System Controls are there Explain?

1528


How do I get the number of free bytes on a disk?

1200


What is datagrid in vb net?

502