diff options
Diffstat (limited to 'src/mscorlib/corefx/Interop/Windows/mincore/Interop.ThreadPoolIO.cs')
-rw-r--r-- | src/mscorlib/corefx/Interop/Windows/mincore/Interop.ThreadPoolIO.cs | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/mscorlib/corefx/Interop/Windows/mincore/Interop.ThreadPoolIO.cs b/src/mscorlib/corefx/Interop/Windows/mincore/Interop.ThreadPoolIO.cs new file mode 100644 index 0000000000..a0afed5d1a --- /dev/null +++ b/src/mscorlib/corefx/Interop/Windows/mincore/Interop.ThreadPoolIO.cs @@ -0,0 +1,27 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; + +internal static partial class Interop +{ + internal static partial class mincore + { + [DllImport(Libraries.ThreadPool, SetLastError = true)] + internal static unsafe extern SafeThreadPoolIOHandle CreateThreadpoolIo(SafeHandle fl, [MarshalAs(UnmanagedType.FunctionPtr)] NativeIoCompletionCallback pfnio, IntPtr context, IntPtr pcbe); + + [DllImport(Libraries.ThreadPool)] + internal static unsafe extern void CloseThreadpoolIo(IntPtr pio); + + [DllImport(Libraries.ThreadPool)] + internal static unsafe extern void StartThreadpoolIo(SafeThreadPoolIOHandle pio); + + [DllImport(Libraries.ThreadPool)] + internal static unsafe extern void CancelThreadpoolIo(SafeThreadPoolIOHandle pio); + } + + internal delegate void NativeIoCompletionCallback(IntPtr instance, IntPtr context, IntPtr overlapped, uint ioResult, UIntPtr numberOfBytesTransferred, IntPtr io); +} |