122 IN DWORD cbJobObjectInformationLength,
133 JobInfo = &LocalInfo;
138 JobInfo = &LocalInfo;
142 ExpectedSize = cbJobObjectInformationLength;
143 JobInfo = lpJobObjectInformation;
146 if (cbJobObjectInformationLength != ExpectedSize)
153 JobObjectInformationClass,
159 if (JobInfo != &LocalInfo)
return TRUE;
199 RtlCopyMemory(lpJobObjectInformation, &LocalInfo, ExpectedSize);
215 IN DWORD cbJobObjectInformationLength)
227 JobInfo = &LocalInfo;
232 JobInfo = &LocalInfo;
236 ExpectedSize = cbJobObjectInformationLength;
237 JobInfo = lpJobObjectInformation;
240 if (cbJobObjectInformationLength != ExpectedSize)
246 if (JobInfo == &LocalInfo)
248 RtlCopyMemory(&LocalInfo, lpJobObjectInformation, ExpectedSize);
300 JobObjectInformationClass,
#define ConvertWin32AnsiObjectApiToUnicodeApi(obj, name,...)
#define ConvertOpenWin32AnsiObjectApiToUnicodeApi(obj, acc, inh, name)
#define CreateNtObjectFromWin32Api(obj, ntobj, access, sec, name,...)
#define OpenNtObjectFromWin32Api(ntobj, acc, inh, name)
#define NT_SUCCESS(StatCode)
BOOL WINAPI QueryInformationJobObject(IN HANDLE hJob, IN JOBOBJECTINFOCLASS JobObjectInformationClass, IN LPVOID lpJobObjectInformation, IN DWORD cbJobObjectInformationLength, OUT LPDWORD lpReturnLength)
HANDLE WINAPI OpenJobObjectW(IN DWORD dwDesiredAccess, IN BOOL bInheritHandle, IN LPCWSTR lpName)
BOOL WINAPI AssignProcessToJobObject(IN HANDLE hJob, IN HANDLE hProcess)
BOOL WINAPI CreateJobSet(IN ULONG NumJob, IN PJOB_SET_ARRAY UserJobSet, IN ULONG Flags)
BOOL WINAPI IsProcessInJob(IN HANDLE ProcessHandle, IN HANDLE JobHandle, OUT PBOOL Result)
HANDLE WINAPI OpenJobObjectA(IN DWORD dwDesiredAccess, IN BOOL bInheritHandle, IN LPCSTR lpName)
HANDLE WINAPI CreateJobObjectA(IN LPSECURITY_ATTRIBUTES lpJobAttributes, IN LPCSTR lpName)
BOOL WINAPI SetInformationJobObject(IN HANDLE hJob, IN JOBOBJECTINFOCLASS JobObjectInformationClass, IN LPVOID lpJobObjectInformation, IN DWORD cbJobObjectInformationLength)
BOOL WINAPI TerminateJobObject(IN HANDLE hJob, IN UINT uExitCode)
HANDLE WINAPI CreateJobObjectW(IN LPSECURITY_ATTRIBUTES lpJobAttributes, IN LPCWSTR lpName)
#define PROCESS_PRIORITY_CLASS_IDLE
#define JOB_OBJECT_ALL_ACCESS
#define JOB_OBJECT_LIMIT_WORKINGSET
#define PROCESS_PRIORITY_CLASS_NORMAL
#define PROCESS_PRIORITY_CLASS_HIGH
#define PROCESS_PRIORITY_CLASS_ABOVE_NORMAL
enum _JOBOBJECTINFOCLASS JOBOBJECTINFOCLASS
#define JOB_OBJECT_LIMIT_PRIORITY_CLASS
@ JobObjectBasicLimitInformation
@ JobObjectExtendedLimitInformation
struct _JOBOBJECT_EXTENDED_LIMIT_INFORMATION JOBOBJECT_EXTENDED_LIMIT_INFORMATION
#define PROCESS_PRIORITY_CLASS_BELOW_NORMAL
#define PROCESS_PRIORITY_CLASS_REALTIME
struct _JOBOBJECT_BASIC_LIMIT_INFORMATION JOBOBJECT_BASIC_LIMIT_INFORMATION
_In_ BOOL _In_ HANDLE hProcess
#define SE_INC_BASE_PRIORITY_PRIVILEGE
static BOOL bInheritHandle
_In_ HANDLE ProcessHandle
NTSYSAPI NTSTATUS NTAPI RtlAcquirePrivilege(_In_ PULONG Privilege, _In_ ULONG NumPriv, _In_ ULONG Flags, _Out_ PVOID *ReturnedState)
NTSYSAPI VOID NTAPI RtlReleasePrivilege(_In_ PVOID ReturnedState)
NTSTATUS NTAPI NtIsProcessInJob(IN HANDLE ProcessHandle, IN HANDLE JobHandle OPTIONAL)
NTSTATUS NTAPI NtQueryInformationJobObject(HANDLE JobHandle, JOBOBJECTINFOCLASS JobInformationClass, PVOID JobInformation, ULONG JobInformationLength, PULONG ReturnLength)
NTSTATUS NTAPI NtTerminateJobObject(HANDLE JobHandle, NTSTATUS ExitStatus)
NTSTATUS NTAPI NtSetInformationJobObject(HANDLE JobHandle, JOBOBJECTINFOCLASS JobInformationClass, PVOID JobInformation, ULONG JobInformationLength)
NTSTATUS NTAPI NtAssignProcessToJobObject(HANDLE JobHandle, HANDLE ProcessHandle)
NTSTATUS NTAPI NtCreateJobSet(IN ULONG NumJob, IN PJOB_SET_ARRAY UserJobSet, IN ULONG Flags)
#define STATUS_PROCESS_IN_JOB
DWORD BaseSetLastNTError(IN NTSTATUS Status)
#define RtlCopyMemory(Destination, Source, Length)
#define STATUS_INFO_LENGTH_MISMATCH
BOOL Privilege(LPTSTR pszPrivilege, BOOL bEnable)
#define NORMAL_PRIORITY_CLASS
#define REALTIME_PRIORITY_CLASS
#define BELOW_NORMAL_PRIORITY_CLASS
#define HIGH_PRIORITY_CLASS
#define IDLE_PRIORITY_CLASS
#define ABOVE_NORMAL_PRIORITY_CLASS
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO
_Must_inspect_result_ _In_ ULONG Flags