术语 | queryinformationjobobject |
释义 | QueryInformationJobObject 语法: C++ BOOL WINAPI QueryInformationJobObject( __in_opt HANDLE hJob, __in JOBOBJECTINFOCLASS JobObjectInfoClass, __out LPVOID lpJobObjectInfo, __in DWORD cbJobObjectInfoLength, __out_opt LPDWORD lpReturnLength ); QueryInformationJobObject功能 检索限制和工作对象的工作状态信息。 参数 hJob [中,可选] 一个句柄,资料被查询工作。在CreateJobObject或OpenJobObject函数返回此句柄。句柄必须有JOB_OBJECT_QUERY访问权限。有关更多信息,请参见作业对象的安全和访问权限。 如果该值为NULL并且调用进程是与工作,与工作相关的调用进程使用。 JobObjectInfoClass [in] 为限制信息类值得商榷的。此参数可以是下列值之一。 ValueMeaning JobObjectBasicAccountingInformation 1The lpJobObjectInfo参数是一个一JOBOBJECT_BASIC_ACCOUNTING_INFORMATION结构的指针。 JobObjectBasicAndIoAccountingInformation 8The lpJobObjectInfo参数是一个一JOBOBJECT_BASIC_AND_IO_ACCOUNTING_INFORMATION结构的指针。 JobObjectBasicLimitInformation 2The lpJobObjectInfo参数是一个一JOBOBJECT_BASIC_LIMIT_INFORMATION结构的指针。 JobObjectBasicProcessIdList 3The lpJobObjectInfo参数是一个一JOBOBJECT_BASIC_PROCESS_ID_LIST结构的指针。 JobObjectBasicUIRestrictions 4The lpJobObjectInfo参数是一个一JOBOBJECT_BASIC_UI_RESTRICTIONS结构的指针。 JobObjectExtendedLimitInformation 9The lpJobObjectInfo参数是一个一JOBOBJECT_EXTENDED_LIMIT_INFORMATION结构的指针。 JobObjectGroupInformation 至11 lpJobObjectInfo参数是一个缓冲区,它接收到的处理器而当前分配工作组的列表指针。该lpReturnLength参数设置为组的数据的大小。除以sizeof(USHORT)这个值来确定的组数。 Windows Server 2008中,Windows Vista中的Windows Server 2003,和Windows XP/2000:这个标志是不支持。 JobObjectSecurityLimitInformation 5This标志不支持。应用程序必须单独设置安全限制,为每个进程。 Windows Server 2003和Windows XP/2000操作系统:该lpJobObjectInfo参数是一个一JOBOBJECT_SECURITY_LIMIT_INFORMATION结构的指针。 lpJobObjectInfo [out] 该限制或工作状态信息。这些数据的格式取决于该JobObjectInfoClass参数的值。 cbJobObjectInfoLength [in] 该工作的信息被查询的数量,以字节为单位。 lpReturnLength [指出,可选] 一个变量,它接收书面的结构数据长度的指针指向的lpJobObjectInfo参数。如果您不希望收到这些信息,指定为NULL。 返回值 如果函数成功,返回值为非零。 如果函数失败,返回值是零。为了获得更多错误信息,调用GetLastError。 备注 您可以使用QueryInformationJobObject获得电流限制,修改它们,然后使用SetInformationJobObject函数来设置新的限制。 要编译的应用程序使用此功能,定义_WIN32_WINNT为0x0500或更高版本。有关详细信息,请参阅使用Windows头。 要求: 最低支持:client-Windows 2000专业版 最低支持server-Windows 2000服务器 HeaderWinbase.h(头文件:winuser.h) LibraryKernel32.lib DLLKernel32.dll 参见 招聘对象 JOBOBJECT_BASIC_ACCOUNTING_INFORMATION JOBOBJECT_BASIC_AND_IO_ACCOUNTING_INFORMATION JOBOBJECT_BASIC_LIMIT_INFORMATION JOBOBJECT_BASIC_PROCESS_ID_LIST JOBOBJECT_BASIC_UI_RESTRICTIONS JOBOBJECT_EXTENDED_LIMIT_INFORMATION JOBOBJECT_SECURITY_LIMIT_INFORMATION 进程和线程函数 SetInformationJobObject 如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com) 生成日期:2009年8月27日 ==英文原文==QueryInformationJobObject Function Retrieves limit and job state information from the job object. Syntax C++ BOOL WINAPI QueryInformationJobObject( __in_opt HANDLE hJob, __in JOBOBJECTINFOCLASS JobObjectInfoClass, __out LPVOID lpJobObjectInfo, __in DWORD cbJobObjectInfoLength, __out_opt LPDWORD lpReturnLength ); Parameters hJob [in, optional] A handle to the job whose information is being queried. The CreateJobObject or OpenJobObject function returns this handle. The handle must have the JOB_OBJECT_QUERY access right. For more information, see Job Object Security and Access Rights . If this value is NULL and the calling process is associated with a job, the job associated with the calling process is used. JobObjectInfoClass [in] The information class for the limits to be queried. This parameter can be one of the following values. ValueMeaning JobObjectBasicAccountingInformation 1The lpJobObjectInfo parameter is a pointer to a JOBOBJECT_BASIC_ACCOUNTING_INFORMATION structure. JobObjectBasicAndIoAccountingInformation 8The lpJobObjectInfo parameter is a pointer to a JOBOBJECT_BASIC_AND_IO_ACCOUNTING_INFORMATION structure. JobObjectBasicLimitInformation 2The lpJobObjectInfo parameter is a pointer to a JOBOBJECT_BASIC_LIMIT_INFORMATION structure. JobObjectBasicProcessIdList 3The lpJobObjectInfo parameter is a pointer to a JOBOBJECT_BASIC_PROCESS_ID_LIST structure. JobObjectBasicUIRestrictions 4The lpJobObjectInfo parameter is a pointer to a JOBOBJECT_BASIC_UI_RESTRICTIONS structure. JobObjectExtendedLimitInformation 9The lpJobObjectInfo parameter is a pointer to a JOBOBJECT_EXTENDED_LIMIT_INFORMATION structure. JobObjectGroupInformation 11The lpJobObjectInfo parameter is a pointer to a buffer that receives the list of processor groups to which the job is currently assigned. The lpReturnLength parameter is set to the size of the group data. Divide this value by sizeof(USHORT) to determine the number of groups. Windows Server 2008, Windows Vista, Windows Server 2003, and Windows XP/2000: This flag is not supported. JobObjectSecurityLimitInformation 5This flag is not supported. Applications must set security limitations individually for each process. Windows Server 2003 and Windows XP/2000: The lpJobObjectInfo parameter is a pointer to a JOBOBJECT_SECURITY_LIMIT_INFORMATION structure. lpJobObjectInfo [out] The limit or job state information. The format of this data depends on the value of the JobObjectInfoClass parameter. cbJobObjectInfoLength [in] The count of the job information being queried, in bytes. lpReturnLength [out, optional] A pointer to a variable that receives the length of data written to the structure pointed to by the lpJobObjectInfo parameter. If you do not want to receive this information, specify 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 You can use QueryInformationJobObject to obtain the current limits, modify them, then use the SetInformationJobObject function to set new limits. To compile an application that uses this function, define _WIN32_WINNT as 0x0500 or later. For more information, see Using the Windows Headers . Requirements Minimum supported clientWindows 2000 Professional Minimum supported serverWindows 2000 Server HeaderWinbase.h (include Windows.h) LibraryKernel32.lib DLLKernel32.dll See Also Job Objects JOBOBJECT_BASIC_ACCOUNTING_INFORMATION JOBOBJECT_BASIC_AND_IO_ACCOUNTING_INFORMATION JOBOBJECT_BASIC_LIMIT_INFORMATION JOBOBJECT_BASIC_PROCESS_ID_LIST JOBOBJECT_BASIC_UI_RESTRICTIONS JOBOBJECT_EXTENDED_LIMIT_INFORMATION JOBOBJECT_SECURITY_LIMIT_INFORMATION Process and Thread Functions SetInformationJobObject Send comments about this topic to Microsoft Build date: 8/27/2009 ==原始网址==http://msdn.microsoft.com/en-us/library/ms684925(VS.85).aspx\n |
随便看 |
|
windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。