InitialiseCriticalSection

Initialises a new critical section object.

void InitialiseCriticalSection (LPCRITICAL_SECTION lock);

void InitializeCriticalSection (LPCRITICAL_SECTION lock);

Required Header
<process.h>

Return Value

None.

Parameters

lock

  Pointer to a critical section object

Remarks

The InitialiseCriticalSection function initialises the critical section object pointed to by lock so it may be used to create a section of code which is guaranteed to only be executed by one thread at one time.

Process and Threads

See Also    EnterCriticalSection, LeaveCriticalSection