blob: a0afed5d1af179e87a9564c89ecf8192a7e2d264 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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);
}
|