EN
Данное содержимое не доступно на вашем языке, используйте версию на английском языке.

IsProcessInJob function

Determines whether the process is running in the specified job.

Syntax


BOOL WINAPI IsProcessInJob(
  _In_      HANDLE ProcessHandle,
  _In_opt_  HANDLE JobHandle,
  _Out_     PBOOL Result
);

Parameters

ProcessHandle [in]

A handle to the process to be tested. The 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:  The handle must have the PROCESS_QUERY_INFORMATION access right.

JobHandle [in, optional]

A handle to the job. If this parameter is NULL, the function tests if the process is running under any job.

If this parameter is not NULL, the handle must have the JOB_OBJECT_QUERY access right. For more information, see Job Object Security and Access Rights.

Result [out]

A pointer to a value that receives TRUE if the process is running in the job, and FALSE otherwise.

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 application cannot obtain a handle to the job object in which it is running unless it has the name of the job object. However, an application can call the QueryInformationJobObject function with NULL to obtain information about the job object.

To compile an application that uses this function, define _WIN32_WINNT as 0x0501 or later. For more information, see Using the Windows Headers.

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

WinBase.h on Windows XP, Windows Server 2003, Windows Vista, Windows 7, Windows Server 2008, and Windows Server 2008 R2 (include Windows.h);
Jobapi.h on Windows 8 and Windows Server 2012

Library

Kernel32.lib

DLL

Kernel32.dll

See also

AssignProcessToJobObject
Job Objects
Process and Thread Functions
QueryInformationJobObject

 

 

Добавления сообщества

ДОБАВИТЬ
Показ:
© 2014 Microsoft