网站首页  词典首页

请输入您要查询的函数:

 

术语 updateprocthreadattribute
释义 UpdateProcThreadAttribute
语法:
C++
BOOL WINAPI UpdateProcThreadAttribute(
__inout LPPROC_THREAD_ATTRIBUTE_LIST lpAttributeList,
__in DWORD dwFlags,
__in DWORD_PTR Attribute,
__in PVOID lpValue,
__in SIZE_T cbSize,
__out_opt PVOID lpPreviousValue,
__in_opt PSIZE_T lpReturnSize
);
UpdateProcThreadAttribute功能
在对进程和线程创建属性列表更新指定的属性。
参数
lpAttributeList [ in , out ]
对一个属性清单,InitializeProcThreadAttributeList函数创建的指针。
dwFlags [in]
这个参数是保留,必须为零。
属性 [in]
关键属性更新的属性列表。此参数可以是下列值之一。
ValueMeaning
PROC_THREAD_ATTRIBUTE_GROUP_AFFINITYThe lpValue参数是一个一GROUP_AFFINITY结构,它指定新的线程处理器组关联的指针。
Windows Server 2008和Windows Vista的:此值不支持,直到Windows 7和Windows Server 2008 R2的。
PROC_THREAD_ATTRIBUTE_HANDLE_LISTThe lpValue参数是一个指针的列表句柄获得儿童process.These继承的处理必须被视为可继承创建把手和伪不得包括例如由GetCurrentProcess或GetCurrentThread函数返回的句柄。
PROC_THREAD_ATTRIBUTE_IDEAL_PROCESSORThe lpValue参数是一个一PROCESSOR_NUMBER结构,指定了理想的新线程处理器的指针。
PROC_THREAD_ATTRIBUTE_MITIGATION_POLICYThe lpValue参数是一个DWORD,指定利用缓解子进程的政策指针。指定的政策覆盖应用程序和系统确定的方针政策,不能在子进程开始运行改变。
Windows Server 2008和Windows Vista的:此值不支持,直到Windows 7和Windows Server 2008 R2的。
该DWORD指向lpValue可以是一个或多个以下值:
PROCESS_CREATION_MITIGATION_POLICY_DEP_ENABLE状态(0x01)
启用子进程数据执行保护(DEP)。有关更多信息,请参阅数据执行保护。
PROCESS_CREATION_MITIGATION_POLICY_DEP_ATL_THUNK_ENABLE(0x02)
启用DEP的ATL的子进程thunk的仿真。 DEP的ATL的thunk的仿真导致系统拦截NX的故障源于活动模板库(ATL)thunk的层。此值可以指定只有PROCESS_CREATION_MITIGATION_POLICY_DEP_ENABLE。
PROCESS_CREATION_MITIGATION_POLICY_SEHOP_ENABLE(0x04)
使结构化异常处理子进程覆盖保护(SEHOP)。 SEHOP块攻击,使用结构化异常处理(SEH的)覆盖技术。
PROC_THREAD_ATTRIBUTE_PARENT_PROCESSThe lpValue参数是一个指向一个进程句柄使用而不是作为父进程或线程调用进程正在建立。
从指定的进程继承属性包括处理,设备地图,处理器关系,优先级,配额,进程令牌和工作对象。 (请注意,如调试端口的某些属性将来自创建进程,而不是由这个处理指定的进程。)
PROC_THREAD_ATTRIBUTE_PREFERRED_NODEThe lpValue参数是一个对新的线程优先节点的节点数目的指针。
PROC_THREAD_ATTRIBUTE_UMS_THREADThe lpValue参数是一个一UMS_CREATE_THREAD_ATTRIBUTES结构,指定用户模式调度程序(UMS)的线程上下文和公用事业管理系统完成列表与线程关联的指针。该系统后创建线程,系统队列到指定的完成列表。该系统线程运行,只有在应用程序的UMS调度检索从UMS调度线程完成列表,选择它运行。有关更多信息,请参阅用户模式调度。
Windows Server 2008和Windows Vista的:此值不支持,直到Windows 7和Windows Server 2008 R2的。
lpValue [in]
一个属性值的指针。此值应持续到该属性被破坏使用DeleteProcThreadAttributeList功能。
cbSize [in]
至于由lpValue参数指定的属性值的大小。
lpPreviousValue [指出,可选]
这个参数是保留,必须为NULL。
lpReturnSize [中,可选]
这个参数是保留,必须为NULL。
返回值
如果函数成功,返回值为非零。
如果函数失败,返回值是零。为了获得更多错误信息,调用GetLastError。
备注
属性列表是一个不透明的结构,一键/值对,每个属性一个系列组成。一个进程可以只更新属性的主题中进行的关键。
要求:
client最低支持Vista
server最低支持 Windows Server 2008
HeaderWinbase.h(头文件:winuser.h)
LibraryKernel32.lib
DLLKernel32.dll
参见
DeleteProcThreadAttributeList
InitializeProcThreadAttributeList
进程和线程函数
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年8月27日
==英文原文==UpdateProcThreadAttribute Function
Updates the specified attribute in a list of attributes for process and thread creation.
Syntax
C++
BOOL WINAPI UpdateProcThreadAttribute(
__inout LPPROC_THREAD_ATTRIBUTE_LIST lpAttributeList,
__in DWORD dwFlags,
__in DWORD_PTR Attribute,
__in PVOID lpValue,
__in SIZE_T cbSize,
__out_opt PVOID lpPreviousValue,
__in_opt PSIZE_T lpReturnSize
);
Parameters
lpAttributeList [in, out]
A pointer to an attribute list created by the InitializeProcThreadAttributeList function.
dwFlags [in]
This parameter is reserved and must be zero.
Attribute [in]
The attribute key to update in the attribute list. This parameter can be one of the following values.
ValueMeaning
PROC_THREAD_ATTRIBUTE_GROUP_AFFINITYThe lpValue parameter is a pointer to a GROUP_AFFINITY structure that specifies the processor group affinity for the new thread.
Windows Server 2008 and Windows Vista: This value is not supported until Windows 7 and Windows Server 2008 R2.
PROC_THREAD_ATTRIBUTE_HANDLE_LISTThe lpValue parameter is a pointer to a list of handles to be inherited by the child process.These handles must be created as inheritable handles and must not include pseudo handles such as those returned by the GetCurrentProcess or GetCurrentThread function.
PROC_THREAD_ATTRIBUTE_IDEAL_PROCESSORThe lpValue parameter is a pointer to a PROCESSOR_NUMBER structure that specifies the ideal processor for the new thread.
PROC_THREAD_ATTRIBUTE_MITIGATION_POLICYThe lpValue parameter is a pointer to a DWORD that specifies the exploit mitigation policy for the child process. The specified policy overrides the policies set for the application and the system and cannot be changed after the child process starts running.
Windows Server 2008 and Windows Vista: This value is not supported until Windows 7 and Windows Server 2008 R2.
The DWORD pointed to by lpValue can be one or more of the following values:
PROCESS_CREATION_MITIGATION_POLICY_DEP_ENABLE (0x01)
Enables data execution prevention (DEP) for the child process. For more information, see Data Execution Prevention .
PROCESS_CREATION_MITIGATION_POLICY_DEP_ATL_THUNK_ENABLE (0x02)
Enables DEP-ATL thunk emulation for the child process. DEP-ATL thunk emulation causes the system to intercept NX faults that originate from the Active Template Library (ATL) thunk layer. This value can be specified only with PROCESS_CREATION_MITIGATION_POLICY_DEP_ENABLE.
PROCESS_CREATION_MITIGATION_POLICY_SEHOP_ENABLE (0x04)
Enables structured exception handler overwrite protection (SEHOP) for the child process. SEHOP blocks exploits that use the structured exception handler (SEH) overwrite technique.
PROC_THREAD_ATTRIBUTE_PARENT_PROCESSThe lpValue parameter is a pointer to a handle to a process to use instead of the calling process as the parent for the process or thread being created.
Attributes inherited from the specified process include handles, the device map, processor affinity, priority, quotas, the process token, and job object. (Note that some attributes such as the debug port will come from the creating process, not the process specified by this handle.)
PROC_THREAD_ATTRIBUTE_PREFERRED_NODEThe lpValue parameter is a pointer to the node number of the preferred node for the new thread.
PROC_THREAD_ATTRIBUTE_UMS_THREADThe lpValue parameter is a pointer to a UMS_CREATE_THREAD_ATTRIBUTES structure that specifies a user-mode scheduling (UMS) thread context and a UMS completion list to associate with the thread. After the UMS thread is created, the system queues it to the specified completion list. The UMS thread runs only when an application's UMS scheduler retrieves the UMS thread from the completion list and selects it to run. For more information, see User-Mode Scheduling .
Windows Server 2008 and Windows Vista: This value is not supported until Windows 7 and Windows Server 2008 R2.

lpValue [in]
A pointer to the attribute value. This value should persist until the attribute is destroyed using the DeleteProcThreadAttributeList function.
cbSize [in]
The size of the attribute value specified by the lpValue parameter.
lpPreviousValue [out, optional]
This parameter is reserved and must be NULL.
lpReturnSize [in, optional]
This parameter is reserved and must be NULL.
Return Value
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.
Requirements
Minimum supported clientWindows Vista
Minimum supported serverWindows Server 2008
HeaderWinbase.h (include Windows.h)
LibraryKernel32.lib
DLLKernel32.dll
See Also
DeleteProcThreadAttributeList
InitializeProcThreadAttributeList
Process and Thread Functions
Send comments about this topic to Microsoft
Build date: 8/27/2009
==原始网址==http://msdn.microsoft.com/en-us/library/ms686880(VS.85).aspx\n
随便看

 

windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。

 

Copyright © 2004-2023 Winrtm.com All Rights Reserved
京ICP备2021023879号-40 更新时间:2024/10/6 13:24:30