Skip to content
This repository was archived by the owner on Jul 26, 2023. It is now read-only.

Fix up some Windows Job type and file names #396

Merged
merged 2 commits into from
Jul 13, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 35 additions & 35 deletions src/Kernel32/PublicAPI.Shipped.txt
Original file line number Diff line number Diff line change
Expand Up @@ -396,39 +396,39 @@ PInvoke.Kernel32.JOBOBJECT_CPU_RATE_CONTROL_INFORMATION.JOBOBJECT_CPU_RATE_CONTR
PInvoke.Kernel32.JOBOBJECT_CPU_RATE_CONTROL_INFORMATION.MaxRate -> ushort
PInvoke.Kernel32.JOBOBJECT_CPU_RATE_CONTROL_INFORMATION.MinRate -> ushort
PInvoke.Kernel32.JOBOBJECT_CPU_RATE_CONTROL_INFORMATION.Weight -> uint
PInvoke.Kernel32.JOBOBJECT_INFO_CLASS
PInvoke.Kernel32.JOBOBJECT_INFO_CLASS.JobObjectAssociateCompletionPortInformation = 7 -> PInvoke.Kernel32.JOBOBJECT_INFO_CLASS
PInvoke.Kernel32.JOBOBJECT_INFO_CLASS.JobObjectBasicLimitInformation = 2 -> PInvoke.Kernel32.JOBOBJECT_INFO_CLASS
PInvoke.Kernel32.JOBOBJECT_INFO_CLASS.JobObjectBasicUIRestrictions = 4 -> PInvoke.Kernel32.JOBOBJECT_INFO_CLASS
PInvoke.Kernel32.JOBOBJECT_INFO_CLASS.JobObjectCpuRateControlInformation = 15 -> PInvoke.Kernel32.JOBOBJECT_INFO_CLASS
PInvoke.Kernel32.JOBOBJECT_INFO_CLASS.JobObjectEndOfJobTimeInformation = 6 -> PInvoke.Kernel32.JOBOBJECT_INFO_CLASS
PInvoke.Kernel32.JOBOBJECT_INFO_CLASS.JobObjectExtendedLimitInformation = 9 -> PInvoke.Kernel32.JOBOBJECT_INFO_CLASS
PInvoke.Kernel32.JOBOBJECT_INFO_CLASS.JobObjectGroupInformation = 11 -> PInvoke.Kernel32.JOBOBJECT_INFO_CLASS
PInvoke.Kernel32.JOBOBJECT_INFO_CLASS.JobObjectGroupInformationEx = 14 -> PInvoke.Kernel32.JOBOBJECT_INFO_CLASS
PInvoke.Kernel32.JOBOBJECT_INFO_CLASS.JobObjectLimitViolationInformation2 = 35 -> PInvoke.Kernel32.JOBOBJECT_INFO_CLASS
PInvoke.Kernel32.JOBOBJECT_INFO_CLASS.JobObjectNetRateControlInformation = 32 -> PInvoke.Kernel32.JOBOBJECT_INFO_CLASS
PInvoke.Kernel32.JOBOBJECT_INFO_CLASS.JobObjectNotificationLimitInformation = 12 -> PInvoke.Kernel32.JOBOBJECT_INFO_CLASS
PInvoke.Kernel32.JOBOBJECT_INFO_CLASS.JobObjectNotificationLimitInformation2 = 34 -> PInvoke.Kernel32.JOBOBJECT_INFO_CLASS
PInvoke.Kernel32.JOBOBJECT_INFO_CLASS.JobObjectSecurityLimitInformation = 5 -> PInvoke.Kernel32.JOBOBJECT_INFO_CLASS
PInvoke.Kernel32.JOB_OBJECT_BASIC_LIMIT_INFORMATION
PInvoke.Kernel32.JOB_OBJECT_BASIC_LIMIT_INFORMATION.ActiveProcessLimit -> uint
PInvoke.Kernel32.JOB_OBJECT_BASIC_LIMIT_INFORMATION.Affinity -> System.UIntPtr
PInvoke.Kernel32.JOB_OBJECT_BASIC_LIMIT_INFORMATION.JOB_OBJECT_BASIC_LIMIT_INFORMATION() -> void
PInvoke.Kernel32.JOB_OBJECT_BASIC_LIMIT_INFORMATION.LimitFlags -> PInvoke.Kernel32.JOB_OBJECT_LIMIT_FLAGS
PInvoke.Kernel32.JOB_OBJECT_BASIC_LIMIT_INFORMATION.MaxWorkingSetSize -> System.UIntPtr
PInvoke.Kernel32.JOB_OBJECT_BASIC_LIMIT_INFORMATION.MinWorkingSetSize -> System.UIntPtr
PInvoke.Kernel32.JOB_OBJECT_BASIC_LIMIT_INFORMATION.PerJobUserTimeLimit -> long
PInvoke.Kernel32.JOB_OBJECT_BASIC_LIMIT_INFORMATION.PerProcessUserTimeLimit -> long
PInvoke.Kernel32.JOB_OBJECT_BASIC_LIMIT_INFORMATION.PriorityClass -> uint
PInvoke.Kernel32.JOB_OBJECT_BASIC_LIMIT_INFORMATION.SchedulingClass -> uint
PInvoke.Kernel32.JOB_OBJECT_EXTENDED_LIMIT_INFORMATION
PInvoke.Kernel32.JOB_OBJECT_EXTENDED_LIMIT_INFORMATION.BasicLimitInformation -> PInvoke.Kernel32.JOB_OBJECT_BASIC_LIMIT_INFORMATION
PInvoke.Kernel32.JOB_OBJECT_EXTENDED_LIMIT_INFORMATION.IoInfo -> PInvoke.Kernel32.IO_COUNTERS
PInvoke.Kernel32.JOB_OBJECT_EXTENDED_LIMIT_INFORMATION.JOB_OBJECT_EXTENDED_LIMIT_INFORMATION() -> void
PInvoke.Kernel32.JOB_OBJECT_EXTENDED_LIMIT_INFORMATION.JobMemoryLimit -> System.UIntPtr
PInvoke.Kernel32.JOB_OBJECT_EXTENDED_LIMIT_INFORMATION.PeakJobMemoryUsed -> System.UIntPtr
PInvoke.Kernel32.JOB_OBJECT_EXTENDED_LIMIT_INFORMATION.PeakProcessMemoryUsed -> System.UIntPtr
PInvoke.Kernel32.JOB_OBJECT_EXTENDED_LIMIT_INFORMATION.ProcessMemoryLimit -> System.UIntPtr
PInvoke.Kernel32.JOBOBJECTINFOCLASS
PInvoke.Kernel32.JOBOBJECTINFOCLASS.JobObjectAssociateCompletionPortInformation = 7 -> PInvoke.Kernel32.JOBOBJECTINFOCLASS
PInvoke.Kernel32.JOBOBJECTINFOCLASS.JobObjectBasicLimitInformation = 2 -> PInvoke.Kernel32.JOBOBJECTINFOCLASS
PInvoke.Kernel32.JOBOBJECTINFOCLASS.JobObjectBasicUIRestrictions = 4 -> PInvoke.Kernel32.JOBOBJECTINFOCLASS
PInvoke.Kernel32.JOBOBJECTINFOCLASS.JobObjectCpuRateControlInformation = 15 -> PInvoke.Kernel32.JOBOBJECTINFOCLASS
PInvoke.Kernel32.JOBOBJECTINFOCLASS.JobObjectEndOfJobTimeInformation = 6 -> PInvoke.Kernel32.JOBOBJECTINFOCLASS
PInvoke.Kernel32.JOBOBJECTINFOCLASS.JobObjectExtendedLimitInformation = 9 -> PInvoke.Kernel32.JOBOBJECTINFOCLASS
PInvoke.Kernel32.JOBOBJECTINFOCLASS.JobObjectGroupInformation = 11 -> PInvoke.Kernel32.JOBOBJECTINFOCLASS
PInvoke.Kernel32.JOBOBJECTINFOCLASS.JobObjectGroupInformationEx = 14 -> PInvoke.Kernel32.JOBOBJECTINFOCLASS
PInvoke.Kernel32.JOBOBJECTINFOCLASS.JobObjectLimitViolationInformation2 = 35 -> PInvoke.Kernel32.JOBOBJECTINFOCLASS
PInvoke.Kernel32.JOBOBJECTINFOCLASS.JobObjectNetRateControlInformation = 32 -> PInvoke.Kernel32.JOBOBJECTINFOCLASS
PInvoke.Kernel32.JOBOBJECTINFOCLASS.JobObjectNotificationLimitInformation = 12 -> PInvoke.Kernel32.JOBOBJECTINFOCLASS
PInvoke.Kernel32.JOBOBJECTINFOCLASS.JobObjectNotificationLimitInformation2 = 34 -> PInvoke.Kernel32.JOBOBJECTINFOCLASS
PInvoke.Kernel32.JOBOBJECTINFOCLASS.JobObjectSecurityLimitInformation = 5 -> PInvoke.Kernel32.JOBOBJECTINFOCLASS
PInvoke.Kernel32.JOBOBJECT_BASIC_LIMIT_INFORMATION
PInvoke.Kernel32.JOBOBJECT_BASIC_LIMIT_INFORMATION.ActiveProcessLimit -> uint
PInvoke.Kernel32.JOBOBJECT_BASIC_LIMIT_INFORMATION.Affinity -> System.UIntPtr
PInvoke.Kernel32.JOBOBJECT_BASIC_LIMIT_INFORMATION.JOBOBJECT_BASIC_LIMIT_INFORMATION() -> void
PInvoke.Kernel32.JOBOBJECT_BASIC_LIMIT_INFORMATION.LimitFlags -> PInvoke.Kernel32.JOB_OBJECT_LIMIT_FLAGS
PInvoke.Kernel32.JOBOBJECT_BASIC_LIMIT_INFORMATION.MaxWorkingSetSize -> System.UIntPtr
PInvoke.Kernel32.JOBOBJECT_BASIC_LIMIT_INFORMATION.MinWorkingSetSize -> System.UIntPtr
PInvoke.Kernel32.JOBOBJECT_BASIC_LIMIT_INFORMATION.PerJobUserTimeLimit -> long
PInvoke.Kernel32.JOBOBJECT_BASIC_LIMIT_INFORMATION.PerProcessUserTimeLimit -> long
PInvoke.Kernel32.JOBOBJECT_BASIC_LIMIT_INFORMATION.PriorityClass -> uint
PInvoke.Kernel32.JOBOBJECT_BASIC_LIMIT_INFORMATION.SchedulingClass -> uint
PInvoke.Kernel32.JOBOBJECT_EXTENDED_LIMIT_INFORMATION
PInvoke.Kernel32.JOBOBJECT_EXTENDED_LIMIT_INFORMATION.BasicLimitInformation -> PInvoke.Kernel32.JOBOBJECT_BASIC_LIMIT_INFORMATION
PInvoke.Kernel32.JOBOBJECT_EXTENDED_LIMIT_INFORMATION.IoInfo -> PInvoke.Kernel32.IO_COUNTERS
PInvoke.Kernel32.JOBOBJECT_EXTENDED_LIMIT_INFORMATION.JOBOBJECT_EXTENDED_LIMIT_INFORMATION() -> void
PInvoke.Kernel32.JOBOBJECT_EXTENDED_LIMIT_INFORMATION.JobMemoryLimit -> System.UIntPtr
PInvoke.Kernel32.JOBOBJECT_EXTENDED_LIMIT_INFORMATION.PeakJobMemoryUsed -> System.UIntPtr
PInvoke.Kernel32.JOBOBJECT_EXTENDED_LIMIT_INFORMATION.PeakProcessMemoryUsed -> System.UIntPtr
PInvoke.Kernel32.JOBOBJECT_EXTENDED_LIMIT_INFORMATION.ProcessMemoryLimit -> System.UIntPtr
PInvoke.Kernel32.JOB_OBJECT_LIMIT_FLAGS
PInvoke.Kernel32.JOB_OBJECT_LIMIT_FLAGS.JOB_OBJECT_LIMIT_ACTIVE_PROCESS = 8 -> PInvoke.Kernel32.JOB_OBJECT_LIMIT_FLAGS
PInvoke.Kernel32.JOB_OBJECT_LIMIT_FLAGS.JOB_OBJECT_LIMIT_AFFINITY = 16 -> PInvoke.Kernel32.JOB_OBJECT_LIMIT_FLAGS
Expand Down Expand Up @@ -1247,7 +1247,7 @@ static PInvoke.Kernel32.STARTUPINFO.Create() -> PInvoke.Kernel32.STARTUPINFO
static PInvoke.Kernel32.STARTUPINFOEX.Create() -> PInvoke.Kernel32.STARTUPINFOEX
static PInvoke.Kernel32.ScrollConsoleScreenBuffer(System.IntPtr hConsoleOutput, PInvoke.SMALL_RECT lpScrollRectangle, PInvoke.SMALL_RECT? lpClipRectangle, PInvoke.COORD dwDestinationOrigin, PInvoke.Kernel32.CHAR_INFO lpFill) -> bool
static PInvoke.Kernel32.ScrollConsoleScreenBuffer(System.IntPtr hConsoleOutput, System.IntPtr lpScrollRectangle, System.IntPtr lpClipRectangle, PInvoke.COORD dwDestinationOrigin, System.IntPtr lpFill) -> bool
static PInvoke.Kernel32.SetInformationJobObject(PInvoke.Kernel32.SafeObjectHandle hJob, PInvoke.Kernel32.JOBOBJECT_INFO_CLASS jobObjectInfoClass, System.IntPtr lpJobObjectInfo, uint cbJobObjectInfoLength) -> bool
static PInvoke.Kernel32.SetInformationJobObject(PInvoke.Kernel32.SafeObjectHandle hJob, PInvoke.Kernel32.JOBOBJECTINFOCLASS jobObjectInfoClass, System.IntPtr lpJobObjectInfo, uint cbJobObjectInfoLength) -> bool
static PInvoke.Kernel32.SetNamedPipeHandleState(PInvoke.Kernel32.SafeObjectHandle hNamedPipe, PInvoke.Kernel32.PipeMode? lpMode, int? lpMaxCollectionCount, int? lpCollectDataTimeout) -> bool
static PInvoke.Kernel32.SetNamedPipeHandleState(PInvoke.Kernel32.SafeObjectHandle hNamedPipe, System.IntPtr lpMode, System.IntPtr lpMaxCollectionCount, System.IntPtr lpCollectDataTimeout) -> bool
static PInvoke.Kernel32.SetSystemTime(PInvoke.Kernel32.SYSTEMTIME lpSystemTime) -> bool
Expand Down Expand Up @@ -1401,7 +1401,7 @@ static extern PInvoke.Kernel32.SetConsoleOutputCP(uint wCodePageID) -> bool
static extern PInvoke.Kernel32.SetConsoleTextAttribute(System.IntPtr hConsoleOutput, PInvoke.Kernel32.CharacterAttributesFlags wAttributes) -> bool
static extern PInvoke.Kernel32.SetConsoleTitle(string lpConsoleTitle) -> bool
static extern PInvoke.Kernel32.SetDllDirectory(string lpPathName) -> bool
static extern PInvoke.Kernel32.SetInformationJobObject(PInvoke.Kernel32.SafeObjectHandle hJob, PInvoke.Kernel32.JOBOBJECT_INFO_CLASS jobObjectInfoClass, void* lpJobObjectInfo, uint cbJobObjectInfoLength) -> bool
static extern PInvoke.Kernel32.SetInformationJobObject(PInvoke.Kernel32.SafeObjectHandle hJob, PInvoke.Kernel32.JOBOBJECTINFOCLASS jobObjectInfoClass, void* lpJobObjectInfo, uint cbJobObjectInfoLength) -> bool
static extern PInvoke.Kernel32.SetNamedPipeHandleState(PInvoke.Kernel32.SafeObjectHandle hNamedPipe, PInvoke.Kernel32.PipeMode* lpMode, int* lpMaxCollectionCount, int* lpCollectDataTimeout) -> bool
static extern PInvoke.Kernel32.SetProcessShutdownParameters(int dwLevel, PInvoke.Kernel32.ProcessShutdownFlags dwFlags) -> bool
static extern PInvoke.Kernel32.SetStdHandle(PInvoke.Kernel32.StdHandle nStdHandle, System.IntPtr nHandle) -> bool
Expand Down
4 changes: 2 additions & 2 deletions src/Kernel32/PublicAPI.Unshipped.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
static extern PInvoke.Kernel32.SetLastError(uint dwErrCode) -> void
static extern PInvoke.Kernel32.GetProcessId(System.IntPtr Process) -> int
static extern PInvoke.Kernel32.GetProcessId(System.IntPtr Process) -> int
static extern PInvoke.Kernel32.SetLastError(uint dwErrCode) -> void
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) All contributors. All rights reserved.
// Copyright (c) All contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

namespace PInvoke
Expand All @@ -11,7 +11,9 @@ namespace PInvoke
public partial class Kernel32
{
/// <summary>
/// Contains I/O accounting information for a process or a job object. For a job object, the counters include all operations performed by all processes that have ever been associated with the job, in addition to all processes currently associated with the job.
/// Contains I/O accounting information for a process or a job object.
/// For a job object, the counters include all operations performed by all processes that have ever been associated with the job,
/// in addition to all processes currently associated with the job.
/// </summary>
[StructLayout(LayoutKind.Sequential)]
public struct IO_COUNTERS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ namespace PInvoke
using System.Runtime.InteropServices;

/// <content>
/// Contains the <see cref="JOB_OBJECT_BASIC_LIMIT_INFORMATION"/> nested type.
/// Contains the <see cref="JOBOBJECT_BASIC_LIMIT_INFORMATION"/> nested type.
/// </content>
public partial class Kernel32
{
/// <summary>
/// Contains basic limit information for a job object.
/// </summary>
[StructLayout(LayoutKind.Sequential)]
public struct JOB_OBJECT_BASIC_LIMIT_INFORMATION
public struct JOBOBJECT_BASIC_LIMIT_INFORMATION
{
/// <summary>
/// If LimitFlags specifies JOB_OBJECT_LIMIT_PROCESS_TIME, this member is the per-process user-mode execution time limit, in 100-nanosecond ticks. Otherwise, this member is ignored.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
// Copyright (c) All contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

namespace PInvoke
{
using System;
using System.Runtime.InteropServices;

/// <content>
/// Contains the <see cref="JOBOBJECT_EXTENDED_LIMIT_INFORMATION"/> nested type.
/// </content>
public partial class Kernel32
{
/// <summary>
/// Contains basic and extended limit information for a job object.
/// </summary>
/// <remarks>
/// <para>The system tracks the value of PeakProcessMemoryUsed and PeakJobMemoryUsed constantly. This allows you know the peak memory usage of each job. You can use this information to establish a memory limit using the JOB_OBJECT_LIMIT_PROCESS_MEMORY or JOB_OBJECT_LIMIT_JOB_MEMORY value.</para>
/// <para>Note that the job memory and process memory limits are very similar in operation, but they are independent. You could set a job-wide limit of 100 MB with a per-process limit of 10 MB. In this scenario, no single process could commit more than 10 MB, and the set of processes associated with a job could never exceed 100 MB.</para>
/// <para>To register for notifications that a job has exceeded its peak memory limit while allowing processes to continue to commit memory, use the SetInformationJobObject function with the JobObjectNotificationLimitInformation information class.</para>
/// </remarks>
[StructLayout(LayoutKind.Sequential)]
public struct JOBOBJECT_EXTENDED_LIMIT_INFORMATION
{
/// <summary>
/// A <see cref="JOBOBJECT_BASIC_LIMIT_INFORMATION"/> structure that contains basic limit information.
/// </summary>
public JOBOBJECT_BASIC_LIMIT_INFORMATION BasicLimitInformation;

/// <summary>
/// Reserved.
/// </summary>
public IO_COUNTERS IoInfo;

/// <summary>
/// If the <see cref="JOBOBJECT_BASIC_LIMIT_INFORMATION.LimitFlags"/> member of the <see cref="JOBOBJECT_BASIC_LIMIT_INFORMATION"/> structure specifies the
/// <see cref="JOB_OBJECT_LIMIT_FLAGS.JOB_OBJECT_LIMIT_PROCESS_MEMORY"/> value, this member specifies the limit for the virtual memory that can be committed by a process.
/// Otherwise, this member is ignored.
/// </summary>
public UIntPtr ProcessMemoryLimit;

/// <summary>
/// If the <see cref="JOBOBJECT_BASIC_LIMIT_INFORMATION.LimitFlags"/> member of the <see cref="JOBOBJECT_BASIC_LIMIT_INFORMATION"/> structure specifies the
/// <see cref="JOB_OBJECT_LIMIT_FLAGS.JOB_OBJECT_LIMIT_JOB_MEMORY"/> value,
/// this member specifies the limit for the virtual memory that can be committed for the job. Otherwise, this member is ignored.
/// </summary>
public UIntPtr JobMemoryLimit;

/// <summary>
/// The peak memory used by any process ever associated with the job.
/// </summary>
public UIntPtr PeakProcessMemoryUsed;

/// <summary>
/// The peak memory usage of all processes currently associated with the job.
/// </summary>
public UIntPtr PeakJobMemoryUsed;
}
}
}
51 changes: 0 additions & 51 deletions src/Kernel32/desktop/Kernel32+JobObjectExtendedLimitInformation.cs

This file was deleted.

8 changes: 4 additions & 4 deletions src/Kernel32/desktop/Kernel32+JobObjectInfoClass.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
namespace PInvoke
{
/// <content>
/// Contains the <see cref="JOBOBJECT_INFO_CLASS"/> nested type.
/// Contains the <see cref="JOBOBJECTINFOCLASS"/> nested type.
/// </content>
public partial class Kernel32
{
Expand All @@ -14,10 +14,10 @@ public partial class Kernel32
/// <remarks>
/// Taken from https://msdn.microsoft.com/en-us/library/windows/desktop/ms686216(v=vs.85).aspx
/// </remarks>
public enum JOBOBJECT_INFO_CLASS
public enum JOBOBJECTINFOCLASS
{
/// <summary>
/// The lpJobObjectInfo parameter is a pointer to a JOBOBJECT_BASIC_LIMIT_INFORMATION structure.
/// The lpJobObjectInfo parameter is a pointer to a <see cref="JOBOBJECT_BASIC_LIMIT_INFORMATION" /> structure.
/// </summary>
JobObjectBasicLimitInformation = 2,

Expand All @@ -42,7 +42,7 @@ public enum JOBOBJECT_INFO_CLASS
JobObjectAssociateCompletionPortInformation = 7,

/// <summary>
/// The lpJobObjectInfo parameter is a pointer to a JOBOBJECT_EXTENDED_LIMIT_INFORMATION structure.
/// The lpJobObjectInfo parameter is a pointer to a <see cref="JOBOBJECT_EXTENDED_LIMIT_INFORMATION" /> structure.
/// </summary>
JobObjectExtendedLimitInformation = 9,

Expand Down
Loading