网站首页  词典首页

请输入您要查询的函数:

 

术语 getprocessaffinitymask
释义 GetProcessAffinityMask
语法:
C++
BOOL WINAPI GetProcessAffinityMask(
__in HANDLE hProcess,
__out PDWORD_PTR lpProcessAffinityMask,
__out PDWORD_PTR lpSystemAffinityMask
);
GetProcessAffinityMask功能
检索过程指定的进程关联掩码和提高系统的系统相似性掩码。
参数
hProcess [in]
一个句柄,的相似性掩码是理想的过程。
这种处理必须有PROCESS_QUERY_INFORMATION或PROCESS_QUERY_LIMITED_INFORMATION访问权限。有关更多信息,请参见过程的安全性和访问权限。
Windows Server 2003和Windows XP/2000操作系统:在处理必须有PROCESS_QUERY_INFORMATION访问权。
lpProcessAffinityMask [out]
一个变量,它接收指定进程关联掩码指针。
lpSystemAffinityMask [out]
一个变量,它接收该系统关联掩码指针。
返回值
如果函数成功,返回值为非零和函数设置变量指向lpProcessAffinityMask和lpSystemAffinityMask到适当的亲和口罩。
在一个拥有6400多处理器的系统,如果调用进程中的线程组是单处理器,该函数设置变量指出,该小组由lpProcessAffinityMask和lpSystemAffinityMask的进程关联掩码和积极的逻辑处理器处理器面具。如果调用进程包含多个线程组,该函数返回零两个亲和力口罩。
如果函数失败,返回值为零,以及变量的值指向lpProcessAffinityMask和lpSystemAffinityMask是不确定的。为了获得更多错误信息,调用GetLastError。
备注
一个进程关联掩码是位向量中的每一位代表一个进程允许处理器上运行。一个系统关联掩码是位向量,其中每个位代表处理器纳入一个系统配置。
一个进程关联掩码是一个系统的关联掩码的子集。一个进程只允许配置的处理器到系统中运行。因此,该进程关联掩码不能指定处理器在系统相似性掩码指定该位处理器0 1 1位。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWinbase.h(头文件:winuser.h)
LibraryKernel32.lib
DLLKernel32.dll
参见
多处理器
进程和线程函数
过程
处理器组
SetProcessAffinityMask
SetThreadAffinityMask
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年8月27日
==英文原文==GetProcessAffinityMask Function
Retrieves the process affinity mask for the specified process and the system affinity mask for the system.
Syntax
C++
BOOL WINAPI GetProcessAffinityMask(
__in HANDLE hProcess,
__out PDWORD_PTR lpProcessAffinityMask,
__out PDWORD_PTR lpSystemAffinityMask
);
Parameters
hProcess [in]
A handle to the process whose affinity mask is desired.
This handle must have the PROCESS_QUERY_INFORMATION or PROCESS_QUERY_LIMITED_INFORMATION access right. For more information, see Process Security and Access Rights .
Windows Server 2003 and Windows XP/2000: The handle must have the PROCESS_QUERY_INFORMATION access right.
lpProcessAffinityMask [out]
A pointer to a variable that receives the affinity mask for the specified process.
lpSystemAffinityMask [out]
A pointer to a variable that receives the affinity mask for the system.
Return Value
If the function succeeds, the return value is nonzero and the function sets the variables pointed to by lpProcessAffinityMask and lpSystemAffinityMask to the appropriate affinity masks.
On a system with more than 64 processors, if the threads of the calling process are in a single processor group , the function sets the variables pointed to by lpProcessAffinityMask and lpSystemAffinityMask to the process affinity mask and the processor mask of active logical processors for that group. If the calling process contains threads in multiple groups, the function returns zero for both affinity masks.
If the function fails, the return value is zero, and the values of the variables pointed to by lpProcessAffinityMask and lpSystemAffinityMask are undefined. To get extended error information, call GetLastError .
Remarks
A process affinity mask is a bit vector in which each bit represents the processors that a process is allowed to run on. A system affinity mask is a bit vector in which each bit represents the processors that are configured into a system.
A process affinity mask is a subset of the system affinity mask. A process is only allowed to run on the processors configured into a system. Therefore, the process affinity mask cannot specify a 1 bit for a processor when the system affinity mask specifies a 0 bit for that processor.
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWinbase.h (include Windows.h)
LibraryKernel32.lib
DLLKernel32.dll
See Also
Multiple Processors
Process and Thread Functions
Processes
Processor Groups
SetProcessAffinityMask
SetThreadAffinityMask
Send comments about this topic to Microsoft
Build date: 8/27/2009
==原始网址==http://msdn.microsoft.com/en-us/library/ms683213(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:21:12