Platform SDK: DLLs, Processes, and Threads

DeleteCriticalSection

The DeleteCriticalSection function releases all resources used by an unowned critical section object.

VOID DeleteCriticalSection(
  LPCRITICAL_SECTION lpCriticalSection   // critical section
);

Parameters

lpCriticalSection
[in/out] Pointer to the critical section object.

Return Values

This function does not return a value.

Remarks

Deleting a critical section object releases all system resources used by the object. After a critical section object has been deleted, it cannot be specified in the EnterCriticalSection, TryEnterCriticalSection, or LeaveCriticalSection function.

If a critical section is deleted while it is still owned, the state of the threads waiting for ownership of the deleted critical section is undefined.

Requirements

  Windows NT/2000: Requires Windows NT 3.1 or later.
  Windows 95/98: Requires Windows 95 or later.
  Header: Declared in Winbase.h; include Windows.h.
  Library: Use Kernel32.lib.

See Also

Synchronization Overview, Synchronization Functions, EnterCriticalSection, InitializeCriticalSection, LeaveCriticalSection TryEnterCriticalSection