OpenThreadWaitChainSession function

Creates a new WCT session.

Syntax

HWCT OpenThreadWaitChainSession(
  DWORD              Flags,
  PWAITCHAINCALLBACK callback
);

Parameters

Flags

The session type. This parameter can be one of the following values.

Value Meaning
0
A synchronous session.
WCT_ASYNC_OPEN_FLAG
An asynchronous session.

callback

If the session is asynchronous, this parameter can be a pointer to a WaitChainCallback callback function.

Return Value

If the function succeeds, the return value is a handle to the newly created session.

If the function fails, the return value is NULL. To get extended error information, call GetLastError.

Remarks

When you have finished using the session, call the CloseThreadWaitChainSession function.

Examples

For an example, see Using WCT.

Requirements

   
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header wct.h
Library Advapi32.lib
DLL Advapi32.dll

See Also

CloseThreadWaitChainSession

GetThreadWaitChain

Wait Chain Traversal

WaitChainCallback