QueryUmsThreadInformation function

Retrieves information about the specified user-mode scheduling (UMS) worker thread.

Syntax

BOOL QueryUmsThreadInformation(
  PUMS_CONTEXT          UmsThread,
  UMS_THREAD_INFO_CLASS UmsThreadInfoClass,
  PVOID                 UmsThreadInformation,
  ULONG                 UmsThreadInformationLength,
  PULONG                ReturnLength
);

Parameters

UmsThread

A pointer to a UMS thread context.

UmsThreadInfoClass

A UMS_THREAD_INFO_CLASS value that specifies the kind of information to retrieve.

UmsThreadInformation

A pointer to a buffer to receive the specified information. The required size of this buffer depends on the specified information class.

If the information class is UmsThreadContext or UmsThreadTeb, the buffer must be sizeof(PVOID).

If the information class is UmsThreadIsSuspended or UmsThreadIsTerminated, the buffer must be sizeof(BOOLEAN).

UmsThreadInformationLength

The size of the UmsThreadInformation buffer, in bytes.

ReturnLength

A pointer to a ULONG variable. On output, this parameter receives the number of bytes written to the UmsThreadInformation buffer.

Return Value

If the function succeeds, it returns a nonzero value.

If the function fails, the return value is zero. To get extended error information, call GetLastError. Possible error values include the following.

Return code Description
ERROR_INFO_LENGTH_MISMATCH
The buffer is too small for the requested information.
ERROR_INVALID_INFO_CLASS
The specified information class is not supported.

Remarks

The QueryUmsThreadInformation function retrieves information about the specified UMS worker thread such as its application-defined context, its thread execution block (TEB), and whether the thread is suspended or terminated.

The underlying structures for UMS worker threads are managed by the system. Information that is not exposed through QueryUmsThreadInformation should be considered reserved.

Requirements

   
Minimum supported client Windows 7 (64-bit only) [desktop apps only]
Minimum supported server Windows Server 2008 R2 [desktop apps only]
Target Platform Windows
Header winbase.h (include Windows.h)
Library Kernel32.lib
DLL Kernel32.dll

See Also

SetUmsThreadInformation

UMS_THREAD_INFO_CLASS