Skip to content

Commit 5e23208

Browse files
iSazonovTravisEz13
authored andcommitted
Replace api-ms-win-core-job-12-1-0.dll with Kernell32.dll (PowerShell#10417)
1 parent 1a08d6f commit 5e23208

File tree

1 file changed

+3
-3
lines changed
  • src/Microsoft.PowerShell.Commands.Management/commands/management

1 file changed

+3
-3
lines changed

src/Microsoft.PowerShell.Commands.Management/commands/management/Service.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2761,7 +2761,7 @@ byte[] lpSecurityDescriptor
27612761
/// If the object existed before the function call, the function
27622762
/// returns a handle to the existing job object.
27632763
/// </returns>
2764-
[DllImport(PinvokeDllNames.CreateJobObjectDllName, CharSet = CharSet.Unicode)]
2764+
[DllImport("Kernel32.dll", CharSet = CharSet.Unicode)]
27652765
internal static extern IntPtr CreateJobObject(IntPtr lpJobAttributes, string lpName);
27662766

27672767
/// <summary>
@@ -2776,7 +2776,7 @@ byte[] lpSecurityDescriptor
27762776
/// <returns>If the function succeeds, the return value is nonzero.
27772777
/// If the function fails, the return value is zero.
27782778
/// </returns>
2779-
[DllImport(PinvokeDllNames.AssignProcessToJobObjectDllName, CharSet = CharSet.Unicode)]
2779+
[DllImport("Kernel32.dll", CharSet = CharSet.Unicode)]
27802780
[return: MarshalAs(UnmanagedType.Bool)]
27812781
internal static extern bool AssignProcessToJobObject(SafeHandle hJob, IntPtr hProcess);
27822782

@@ -2802,7 +2802,7 @@ byte[] lpSecurityDescriptor
28022802
/// <returns>If the function succeeds, the return value is nonzero.
28032803
/// If the function fails, the return value is zero.
28042804
/// </returns>
2805-
[DllImport(PinvokeDllNames.QueryInformationJobObjectDllName, EntryPoint = "QueryInformationJobObject", SetLastError = true, CharSet = CharSet.Unicode)]
2805+
[DllImport("Kernel32.dll", EntryPoint = "QueryInformationJobObject", SetLastError = true, CharSet = CharSet.Unicode)]
28062806
public static extern bool QueryInformationJobObject(SafeHandle hJob, int JobObjectInfoClass,
28072807
ref JOBOBJECT_BASIC_PROCESS_ID_LIST lpJobObjectInfo,
28082808
int cbJobObjectLength, IntPtr lpReturnLength);

0 commit comments

Comments
 (0)