QueryUmsThreadInformation function (winbase.h)
Retrieves information about the specified user-mode scheduling (UMS) worker thread.
Warning
As of Windows 11, user-mode scheduling is not supported. All calls fail with the error ERROR_NOT_SUPPORTED
.
Syntax
BOOL QueryUmsThreadInformation(
[in] PUMS_CONTEXT UmsThread,
[in] UMS_THREAD_INFO_CLASS UmsThreadInfoClass,
[out] PVOID UmsThreadInformation,
[in] ULONG UmsThreadInformationLength,
[out, optional] PULONG ReturnLength
);
Parameters
[in] UmsThread
A pointer to a UMS thread context.
[in] UmsThreadInfoClass
A UMS_THREAD_INFO_CLASS value that specifies the kind of information to retrieve.
[out] 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)
.
[in] UmsThreadInformationLength
The size of the UmsThreadInformation buffer, in bytes.
[out, optional] 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 |
---|---|
|
The buffer is too small for the requested information. |
|
The specified information class is not supported. |
|
UMS 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
Requirement | Value |
---|---|
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 |
API set | api-ms-win-core-ums-l1-1-0 (introduced in Windows 7) |