术语 | setinformationjobobject |
释义 | SetInformationJobObject 语法: C++ BOOL WINAPI SetInformationJobObject( __in HANDLE hJob, __in JOBOBJECTINFOCLASS JobObjectInfoClass, __in LPVOID lpJobObjectInfo, __in DWORD cbJobObjectInfoLength ); SetInformationJobObject功能 找工作的对象设置了限制。 参数 hJob [in] 一个句柄,的限制被设置工作。在CreateJobObject或OpenJobObject函数返回此句柄。句柄必须有JOB_OBJECT_SET_ATTRIBUTES访问权限。有关更多信息,请参见作业对象的安全和访问权限。 JobObjectInfoClass [in] 对限制类的信息设置。此参数可以是下列值之一。 ValueMeaning JobObjectAssociateCompletionPortInformation 7The lpJobObjectInfo参数是一个一JOBOBJECT_ASSOCIATE_COMPLETION_PORT结构的指针。 JobObjectBasicLimitInformation 2The lpJobObjectInfo参数是一个一JOBOBJECT_BASIC_LIMIT_INFORMATION结构的指针。 JobObjectBasicUIRestrictions 4The lpJobObjectInfo参数是一个一JOBOBJECT_BASIC_UI_RESTRICTIONS结构的指针。 JobObjectEndOfJobTimeInformation 6The lpJobObjectInfo参数是一个一JOBOBJECT_END_OF_JOB_TIME_INFORMATION结构的指针。 JobObjectExtendedLimitInformation 9The lpJobObjectInfo参数是一个一JOBOBJECT_EXTENDED_LIMIT_INFORMATION结构的指针。 JobObjectSecurityLimitInformation 5This标志不支持。应用程序必须单独设置安全限制,为每个进程。 视窗服务器2003和Windows XP/2000:该lpJobObjectInfo参数是一个一JOBOBJECT_SECURITY_LIMIT_INFORMATION结构的指针。该hJob处理必须有JOB_OBJECT_SET_SECURITY_ATTRIBUTES访问与之相关的权利。 JobObjectGroupInformation 至11 lpJobObjectInfo参数是一个USHORT值,指定的处理器组的列表分配工作的指针。该cbJobObjectInfoLength参数设置为组的数据的大小。除以sizeof(USHORT)这个值来确定的组数。 Windows Server 2008中,Windows Vista中的Windows Server 2003,和Windows XP/2000:这个标志是不支持。 lpJobObjectInfo [in] 在限制或工作状态的设置工作。这一数据格式取决于JobObjectInfoClass价值。 cbJobObjectInfoLength [in] 该工作的信息被设置大小,以字节为单位。 返回值 如果函数成功,返回值为非零。 如果函数失败,返回值是零。为了获得更多错误信息,调用GetLastError。 备注 您可以使用SetInformationJobObject函数设置在一个呼叫数限制。如果您想建立一个时间限制或改变一个子集的限制,调用QueryInformationJobObject函数获取当前的限制,这些限制修改,然后调用SetInformationJobObject。 您必须单独设置安全限制与工作对象关联的每一个过程,而不是设置为他们的工作对象本身。有关信息,请过程的安全性和访问权限。 Windows Server 2003和Windows XP/2000操作系统:您可以使用SetInformationJobObject函数来设置作业对象的安全限制。 要编译的应用程序使用此功能,定义_WIN32_WINNT为0x0500或更高版本。有关详细信息,请参阅使用Windows头。 要求: 最低支持:client-Windows 2000专业版 最低支持server-Windows 2000服务器 HeaderWinbase.h(头文件:winuser.h) LibraryKernel32.lib DLLKernel32.dll 参见 招聘对象 JOBOBJECT_ASSOCIATE_COMPLETION_PORT JOBOBJECT_BASIC_LIMIT_INFORMATION JOBOBJECT_BASIC_UI_RESTRICTIONS JOBOBJECT_END_OF_JOB_TIME_INFORMATION JOBOBJECT_EXTENDED_LIMIT_INFORMATION JOBOBJECT_SECURITY_LIMIT_INFORMATION 进程和线程函数 过程的安全性和访问权限 QueryInformationJobObject 如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com) 生成日期:2009年8月27日 ==英文原文==SetInformationJobObject Function Sets limits for a job object. Syntax C++ BOOL WINAPI SetInformationJobObject( __in HANDLE hJob, __in JOBOBJECTINFOCLASS JobObjectInfoClass, __in LPVOID lpJobObjectInfo, __in DWORD cbJobObjectInfoLength ); Parameters hJob [in] A handle to the job whose limits are being set. The CreateJobObject or OpenJobObject function returns this handle. The handle must have the JOB_OBJECT_SET_ATTRIBUTES access right. For more information, see Job Object Security and Access Rights . JobObjectInfoClass [in] The information class for the limits to be set. This parameter can be one of the following values. ValueMeaning JobObjectAssociateCompletionPortInformation 7The lpJobObjectInfo parameter is a pointer to a JOBOBJECT_ASSOCIATE_COMPLETION_PORT structure. JobObjectBasicLimitInformation 2The lpJobObjectInfo parameter is a pointer to a JOBOBJECT_BASIC_LIMIT_INFORMATION structure. JobObjectBasicUIRestrictions 4The lpJobObjectInfo parameter is a pointer to a JOBOBJECT_BASIC_UI_RESTRICTIONS structure. JobObjectEndOfJobTimeInformation 6The lpJobObjectInfo parameter is a pointer to a JOBOBJECT_END_OF_JOB_TIME_INFORMATION structure. JobObjectExtendedLimitInformation 9The lpJobObjectInfo parameter is a pointer to a JOBOBJECT_EXTENDED_LIMIT_INFORMATION structure. 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. The hJob handle must have the JOB_OBJECT_SET_SECURITY_ATTRIBUTES access right associated with it. JobObjectGroupInformation 11The lpJobObjectInfo parameter is a pointer to a USHORT value that specifies the list of processor groups to assign the job to. The cbJobObjectInfoLength 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. lpJobObjectInfo [in] The limits or job state to be set for the job. The format of this data depends on the value of JobObjectInfoClass. cbJobObjectInfoLength [in] The size of the job information being set, in bytes. 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 the SetInformationJobObject function to set several limits in a single call. If you want to establish the limits one at a time or change a subset of the limits, call the QueryInformationJobObject function to obtain the current limits, modify these limits, and then call SetInformationJobObject. You must set security limitations individually for each process associated with a job object, rather than setting them for the job object itself. For information, see Process Security and Access Rights . Windows Server 2003 and Windows XP/2000: You can use the SetInformationJobObject function to set security limitations for the job object. 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_ASSOCIATE_COMPLETION_PORT JOBOBJECT_BASIC_LIMIT_INFORMATION JOBOBJECT_BASIC_UI_RESTRICTIONS JOBOBJECT_END_OF_JOB_TIME_INFORMATION JOBOBJECT_EXTENDED_LIMIT_INFORMATION JOBOBJECT_SECURITY_LIMIT_INFORMATION Process and Thread Functions Process Security and Access Rights QueryInformationJobObject Send comments about this topic to Microsoft Build date: 8/27/2009 ==原始网址==http://msdn.microsoft.com/en-us/library/ms686216(VS.85).aspx\n |
随便看 |
|
windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。