| description | Learn more about: CriticalSectionTraits Structure | |||
|---|---|---|---|---|
| title | CriticalSectionTraits Structure | |||
| ms.date | 09/26/2018 | |||
| ms.topic | reference | |||
| f1_keywords |
|
|||
| helpviewer_keywords |
|
|||
| ms.assetid | c515a1b5-4eb0-40bc-9035-c4d9352c9de7 |
Specializes a CriticalSection object to support either an invalid critical section or a function to release a critical section.
struct CriticalSectionTraits;
| Name | Description |
|---|---|
Type |
A typedef that defines a pointer to a critical section. Type is defined as typedef CRITICAL_SECTION* Type;. |
| Name | Description |
|---|---|
| CriticalSectionTraits::GetInvalidValue | Specializes a CriticalSection template so that the template is always invalid. |
| CriticalSectionTraits::Unlock | Specializes a CriticalSection template so that it supports releasing ownership of the specified critical section object. |
CriticalSectionTraits
Header: corewrappers.h
Namespace: Microsoft::WRL::Wrappers::HandleTraits
Specializes a CriticalSection template so that the template is always invalid.
inline static Type GetInvalidValue();Always returns a pointer to an invalid critical section.
The Type modifier is defined as typedef CRITICAL_SECTION* Type;.
Specializes a CriticalSection template so that it supports releasing ownership of the specified critical section object.
inline static void Unlock(
_In_ Type cs
);cs
A pointer to a critical section object.
The Type modifier is defined as typedef CRITICAL_SECTION* Type;.
For more information, see LeaveCriticalSection function in the Synchronization Functions section of the Windows API documentation.