description | title | ms.date | f1_keywords | helpviewer_keywords | ms.assetid | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Learn more about: CComApartment Class |
CComApartment Class |
11/04/2016 |
|
|
dbc177d7-7ee4-45f2-b563-d578a467ca93 |
This class provides support for managing an apartment in a thread-pooled EXE module.
Important
This class and its members cannot be used in applications that execute in the Windows Runtime.
class CComApartment
Name | Description |
---|---|
CComApartment::CComApartment | The constructor. |
Name | Description |
---|---|
CComApartment::Apartment | Marks the thread's starting address. |
CComApartment::GetLockCount | Returns the thread's current lock count. |
CComApartment::Lock | Increments the thread's lock count. |
CComApartment::Unlock | Decrements the thread's lock count. |
Name | Description |
---|---|
CComApartment::m_dwThreadID | Contains the thread's identifier. |
CComApartment::m_hThread | Contains the thread's handle. |
CComApartment::m_nLockCnt | Contains the thread's current lock count. |
CComApartment
is used by CComAutoThreadModule to manage an apartment in a thread-pooled EXE module. CComApartment
provides methods for incrementing and decrementing the lock count on a thread.
Header: atlbase.h
Marks the thread's starting address.
DWORD Apartment();
Always 0.
Automatically set during CComAutoThreadModule::Init.
The constructor.
CComApartment();
Initializes the CComApartment
data members m_nLockCnt and m_hThread.
Returns the thread's current lock count.
LONG GetLockCount();
The lock count on the thread.
Increments the thread's lock count.
LONG Lock();
A value that may be useful for diagnostics or testing.
Called by CComAutoThreadModule::Lock.
The lock count on the thread is used for statistical purposes.
Contains the thread's identifier.
DWORD m_dwThreadID;
Contains the thread's handle.
HANDLE m_hThread;
Contains the thread's current lock count.
LONG m_nLockCnt;
Decrements the thread's lock count.
LONG Unlock();
A value that may be useful for diagnostics or testing.
Called by CComAutoThreadModule::Unlock.
The lock count on the thread is used for statistical purposes.