diff --git a/src/Microsoft.PowerShell.Commands.Management/commands/management/Service.cs b/src/Microsoft.PowerShell.Commands.Management/commands/management/Service.cs index 9f27b746a2f..71044487800 100644 --- a/src/Microsoft.PowerShell.Commands.Management/commands/management/Service.cs +++ b/src/Microsoft.PowerShell.Commands.Management/commands/management/Service.cs @@ -2764,7 +2764,7 @@ byte[] lpSecurityDescriptor /// If the object existed before the function call, the function /// returns a handle to the existing job object. /// - [DllImport(PinvokeDllNames.CreateJobObjectDllName, CharSet = CharSet.Unicode)] + [DllImport("Kernel32.dll", CharSet = CharSet.Unicode)] internal static extern IntPtr CreateJobObject(IntPtr lpJobAttributes, string lpName); /// @@ -2779,7 +2779,7 @@ byte[] lpSecurityDescriptor /// If the function succeeds, the return value is nonzero. /// If the function fails, the return value is zero. /// - [DllImport(PinvokeDllNames.AssignProcessToJobObjectDllName, CharSet = CharSet.Unicode)] + [DllImport("Kernel32.dll", CharSet = CharSet.Unicode)] [return: MarshalAs(UnmanagedType.Bool)] internal static extern bool AssignProcessToJobObject(SafeHandle hJob, IntPtr hProcess); @@ -2805,7 +2805,7 @@ byte[] lpSecurityDescriptor /// If the function succeeds, the return value is nonzero. /// If the function fails, the return value is zero. /// - [DllImport(PinvokeDllNames.QueryInformationJobObjectDllName, EntryPoint = "QueryInformationJobObject", SetLastError = true, CharSet = CharSet.Unicode)] + [DllImport("Kernel32.dll", EntryPoint = "QueryInformationJobObject", SetLastError = true, CharSet = CharSet.Unicode)] public static extern bool QueryInformationJobObject(SafeHandle hJob, int JobObjectInfoClass, ref JOBOBJECT_BASIC_PROCESS_ID_LIST lpJobObjectInfo, int cbJobObjectLength, IntPtr lpReturnLength);