CreateUmsThreadContext function
Creates a user-mode scheduling (UMS) thread context to represent a UMS worker thread.
Syntax
BOOL WINAPI CreateUmsThreadContext( _Out_ PUMS_CONTEXT *lpUmsThread );
Parameters
- lpUmsThread [out]
-
A PUMS_CONTEXT variable. On output, this parameter receives a pointer to a UMS thread context.
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 |
|---|---|
|
Not enough memory is available to create the UMS thread context. |
Remarks
A UMS thread context represents the state of a UMS worker thread. Thread contexts are used to specify UMS worker threads in function calls.
A UMS worker thread is created by calling the CreateRemoteThreadEx function after using InitializeProcThreadAttributeList and UpdateProcThreadAttribute to prepare a list of UMS attributes for the thread.
The underlying structures for a UMS thread context are managed by the system and should not be modified directly. To get and set information about a UMS worker thread, use the QueryUmsThreadInformation and SetUmsThreadInformation functions.
After a UMS worker thread terminates, its thread context should be released by calling DeleteUmsThreadContext.
Requirements
|
Minimum supported client |
Windows 7 (64-bit only) [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows Server 2008 R2 [desktop apps only] |
|
Header |
|
|
Library |
|
|
DLL |
|
See also
- CreateRemoteThreadEx
- DeleteUmsThreadContext
- InitializeProcThreadAttributeList
- QueryUmsThreadInformation
- SetUmsThreadInformation
- UpdateProcThreadAttribute