This repository was archived by the owner on Jan 23, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +20
-7
lines changed
src/System.Private.CoreLib
shared/Interop/Windows/Kernel32 Expand file tree Collapse file tree 4 files changed +20
-7
lines changed Original file line number Diff line number Diff line change 271
271
<Compile Include =" $(BclSourcesRoot)\System\ValueType.cs" />
272
272
<Compile Include =" $(BclSourcesRoot)\System\WeakReference.cs" />
273
273
<Compile Include =" $(BclSourcesRoot)\System\WeakReferenceOfT.cs" />
274
+ <Compile Include =" shared\Interop\Windows\Kernel32\Interop.HandleTypes.cs" />
274
275
<Compile Include =" shared\Interop\Windows\Kernel32\Interop.GetStdHandle.cs" />
275
276
<Compile Include =" shared\Interop\Windows\Kernel32\Interop.LocalAlloc.cs" />
276
277
<Compile Include =" shared\Interop\Windows\Kernel32\Interop.QueryUnbiasedInterruptTime.cs" />
Original file line number Diff line number Diff line change @@ -9,11 +9,7 @@ internal partial class Interop
9
9
{
10
10
internal partial class Kernel32
11
11
{
12
- internal const int STD_INPUT_HANDLE = - 10 ;
13
- internal const int STD_OUTPUT_HANDLE = - 11 ;
14
- internal const int STD_ERROR_HANDLE = - 12 ;
15
-
16
- [ DllImport ( Libraries . Kernel32 , SetLastError = true ) ]
17
- internal static extern IntPtr GetStdHandle ( int nStdHandle ) ;
12
+ [ DllImport ( Libraries . Kernel32 ) ]
13
+ internal static extern IntPtr GetStdHandle ( int nStdHandle ) ; // param is NOT a handle, but it returns one!
18
14
}
19
15
}
Original file line number Diff line number Diff line change
1
+ // Licensed to the .NET Foundation under one or more agreements.
2
+ // The .NET Foundation licenses this file to you under the MIT license.
3
+ // See the LICENSE file in the project root for more information.
4
+
5
+ internal partial class Interop
6
+ {
7
+ internal partial class Kernel32
8
+ {
9
+ internal partial class HandleTypes
10
+ {
11
+ internal const int STD_INPUT_HANDLE = - 10 ;
12
+ internal const int STD_OUTPUT_HANDLE = - 11 ;
13
+ internal const int STD_ERROR_HANDLE = - 12 ;
14
+ }
15
+ }
16
+ }
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ namespace Internal
16
16
public static class Console
17
17
{
18
18
private static readonly SafeFileHandle _outputHandle =
19
- new SafeFileHandle ( Interop . Kernel32 . GetStdHandle ( Interop . Kernel32 . STD_OUTPUT_HANDLE ) , ownsHandle : false ) ;
19
+ new SafeFileHandle ( Interop . Kernel32 . GetStdHandle ( Interop . Kernel32 . HandleTypes . STD_OUTPUT_HANDLE ) , ownsHandle : false ) ;
20
20
21
21
public static unsafe void Write ( string s )
22
22
{
You can’t perform that action at this time.
0 commit comments