Expand Minimize

SetUmsThreadInformation function

Sets application-specific context information for the specified user-mode scheduling (UMS) worker thread.

Syntax


BOOL WINAPI SetUmsThreadInformation(
  _In_  PUMS_CONTEXT UmsThread,
  _In_  UMS_THREAD_INFO_CLASS UmsThreadInfoClass,
  _In_  PVOID UmsThreadInformation,
  _In_  ULONG UmsThreadInformationLength
);

Parameters

UmsThread [in]

A pointer to a UMS thread context.

UmsThreadInfoClass [in]

A UMS_THREAD_INFO_CLASS value that specifies the kind of information to set. This parameter must be UmsThreadUserContext.

UmsThreadInformation [in]

A pointer to a buffer that contains the information to set.

UmsThreadInformationLength [in]

The size of the UmsThreadInformation buffer, in bytes.

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 codeDescription
ERROR_INFO_LENGTH_MISMATCH

The buffer size does not match the required size for the specified information class.

ERROR_INVALID_INFO_CLASS

The UmsThreadInfoClass parameter specifies an information class that is not supported.

 

Remarks

The SetUmsThreadInformation function can be used to set an application-defined context for the specified UMS worker thread. The context information can consist of anything the application might find useful to track, such as per-scheduler or per-worker thread state. The underlying structures for UMS worker threads are managed by the system and should not be modified directly.

The QueryUmsThreadInformation function can be used to retrieve other exposed information about the specified thread, such as its thread execution block (TEB) and whether the thread is suspended or terminated. 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]

Header

WinBase.h (include Windows.h)

Library

Kernel32.lib

DLL

Kernel32.dll

See also

QueryUmsThreadInformation

 

 

Community Additions

ADD
Show:
© 2014 Microsoft