UpdateProcThreadAttribute

Updates the specified attribute in a list of attributes for process and thread creation.

Syntax

BOOL UpdateProcThreadAttribute(
         LPPROC_THREAD_ATTRIBUTE_LIST lpAttributeList,
         DWORD dwFlags,
         DWORD_PTR Attribute,
         PVOID lpValue,
         SIZE_T cbSize,
         PVOID lpPreviousValue,
         PSIZE_T lpReturnSize
)  

Parameters

lpAttributeList
Type: LPPROC_THREAD_ATTRIBUTE_LIST 

[in, out] A pointer to an attribute list created by the InitializeProcThreadAttributeList function.

dwFlags
Type: DWORD 

[in] This parameter is reserved and must be zero.

Attribute
Type: DWORD_PTR 

[in] The attribute key to update in the attribute list. This parameter can be one of the following values.

lpValue
Type: PVOID 

[in, optional] A pointer to the attribute value. This value should persist until the attribute is destroyed using the DeleteProcThreadAttributeList function.

cbSize
Type: SIZE_T 

[in] The size of the attribute value specified by the lpValue parameter.

lpPreviousValue
Type: PVOID 

[out, optional] This parameter is reserved and must be NULL.

lpReturnSize
Type: PSIZE_T 

[in, optional] This parameter is reserved and must be NULL.

Return value

Type: BOOL 

If the function succeeds, the return value is nonzero.

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

Remarks

An attribute list is an opaque structure that consists of a series of key/value pairs, one for each attribute. A process can update only the attribute keys described in this topic.

The DWORD or DWORD64 pointed to by lpValue can be one or more of the following values:

Note

The following values are not supported until Windows 8 and Windows Server 2012.

Requirements

Header: Declared in processthreadsapi.h.

Library: Use kernelx.lib.