Click to Rate and Give Feedback
MSDN
MSDN Library
Visual Studio 2005
Visual Studio
Visual C++
Reference
Libraries Reference
ATL
Classes

  Switch on low bandwidth view
This page is specific to
Microsoft Visual Studio 2005/.NET Framework 2.0

Other versions are also available for the following:
ATL Library Reference 
CComSingleThreadModel Class 

This class provides methods for incrementing and decrementing the value of a variable.

class CComSingleThreadModel

CComSingleThreadModel provides methods for incrementing and decrementing the value of a variable. Unlike CComMultiThreadModel and CComMultiThreadModelNoCS, these methods are not thread-safe.

Typically, you use CComSingleThreadModel through one of two typedef names, either CComObjectThreadModel or CComGlobalsThreadModel. The class referenced by each typedef depends on the threading model used, as shown in the following table:

typedef Single threading model Apartment threading model Free threading model

CComObjectThreadModel

S

S

M

CComGlobalsThreadModel

S

M

M

S=CComSingleThreadModel; M=CComMultiThreadModel

CComSingleThreadModel itself defines three typedef names. ThreadModelNoCS references CComSingleThreadModel. AutoCriticalSection and CriticalSection reference class CComFakeCriticalSection, which provides empty methods associated with obtaining and releasing ownership of a critical section.

Header: atlbase.h

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker