RtlDeleteCriticalSection - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
#ifndef _NTRTL_H

/**
 * The RtlDeleteCriticalSection routine releases all resources used by a critical section object that is no longer needed.
 *
 * \param CriticalSection A pointer to the critical section object to delete.
 * \return NTSTATUS Successful or errant status.
 * \remarks Deletes the synchronization resources, not the caller storage. The caller must ensure no owner, waiter or later user remains; deletion is not a cancellation or a substitute for balanced leaves.
 */
NTSYSAPI
NTSTATUS
NTAPI
RtlDeleteCriticalSection(
    _Inout_ PRTL_CRITICAL_SECTION CriticalSection
    );

#endif

View code on GitHub

NtDoc

Releases all resources used by an unowned critical section object.

Related Win32 API

DeleteCriticalSection maps directly to this function.

See also