# Function Reference

# _WinAPI_IsProcessInJob

Determines whether the process is running in the specified job

#include <WinAPIProc.au3>
_WinAPI_IsProcessInJob ( $hProcess [, $hJob = 0] )

## Parameters

$hProcess | Handle to the process to be tested. The handle must have the $PROCESS_QUERY_INFORMATION or $PROCESS_QUERY_LIMITED_INFORMATION access right.
$hJob | [optional] Handle to the job. If this parameter is 0 (Default), the function tests if the process is running under any job.

## Return Value

True: | the process is running in the job.
False: | the process is not running in the job, call _WinAPI_GetLastError() to get extended error information.

## 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 _WinAPI_QueryInformationJobObject() function with 0 to obtain
information about the job object.

## See Also

Search IsProcessInJob in MSDN Library.