Overlapped 构造函数

定义

初始化 Overlapped 类的新实例。

重载

Overlapped()

初始化 Overlapped 类的新的空实例。

Overlapped(Int32, Int32, Int32, IAsyncResult)
已过时。
已过时。
已过时。
已过时。

用指定的文件位置、当 I/O 操作完成时终止的事件的 32 位整型句柄、以及一个用来返回操作结果的接口初始化 Overlapped 类的新实例。

Overlapped(Int32, Int32, IntPtr, IAsyncResult)

用指定的文件位置、当 I/O 操作完成时终止的事件的句柄、以及一个用来返回操作结果的接口初始化 Overlapped 类的新实例。

Overlapped()

初始化 Overlapped 类的新的空实例。

public:
 Overlapped();
public Overlapped ();
Public Sub New ()

适用于

Overlapped(Int32, Int32, Int32, IAsyncResult)

注意

This constructor is not 64-bit compatible. Use the constructor that takes an IntPtr for the event handle. https://go.microsoft.com/fwlink/?linkid=14202

注意

This constructor is not 64-bit compatible and has been deprecated. Use the constructor that accepts an IntPtr for the event handle instead.

注意

This constructor is not 64-bit compatible. Use the constructor that takes an IntPtr for the event handle. http://go.microsoft.com/fwlink/?linkid=14202

注意

Not 64bit compatible. Please use the constructor that takes IntPtr for the event handle

用指定的文件位置、当 I/O 操作完成时终止的事件的 32 位整型句柄、以及一个用来返回操作结果的接口初始化 Overlapped 类的新实例。

public:
 Overlapped(int offsetLo, int offsetHi, int hEvent, IAsyncResult ^ ar);
[System.Obsolete("This constructor is not 64-bit compatible.  Use the constructor that takes an IntPtr for the event handle.  https://go.microsoft.com/fwlink/?linkid=14202")]
public Overlapped (int offsetLo, int offsetHi, int hEvent, IAsyncResult? ar);
[System.Obsolete("This constructor is not 64-bit compatible and has been deprecated. Use the constructor that accepts an IntPtr for the event handle instead.")]
public Overlapped (int offsetLo, int offsetHi, int hEvent, IAsyncResult? ar);
[System.Obsolete("This constructor is not 64-bit compatible.  Use the constructor that takes an IntPtr for the event handle.  http://go.microsoft.com/fwlink/?linkid=14202")]
public Overlapped (int offsetLo, int offsetHi, int hEvent, IAsyncResult ar);
public Overlapped (int offsetLo, int offsetHi, int hEvent, IAsyncResult ar);
[System.Obsolete("This constructor is not 64-bit compatible.  Use the constructor that takes an IntPtr for the event handle.  https://go.microsoft.com/fwlink/?linkid=14202")]
public Overlapped (int offsetLo, int offsetHi, int hEvent, IAsyncResult ar);
[System.Obsolete("Not 64bit compatible.  Please use the constructor that takes IntPtr for the event handle")]
public Overlapped (int offsetLo, int offsetHi, int hEvent, IAsyncResult ar);
[<System.Obsolete("This constructor is not 64-bit compatible.  Use the constructor that takes an IntPtr for the event handle.  https://go.microsoft.com/fwlink/?linkid=14202")>]
new System.Threading.Overlapped : int * int * int * IAsyncResult -> System.Threading.Overlapped
[<System.Obsolete("This constructor is not 64-bit compatible and has been deprecated. Use the constructor that accepts an IntPtr for the event handle instead.")>]
new System.Threading.Overlapped : int * int * int * IAsyncResult -> System.Threading.Overlapped
[<System.Obsolete("This constructor is not 64-bit compatible.  Use the constructor that takes an IntPtr for the event handle.  http://go.microsoft.com/fwlink/?linkid=14202")>]
new System.Threading.Overlapped : int * int * int * IAsyncResult -> System.Threading.Overlapped
new System.Threading.Overlapped : int * int * int * IAsyncResult -> System.Threading.Overlapped
[<System.Obsolete("Not 64bit compatible.  Please use the constructor that takes IntPtr for the event handle")>]
new System.Threading.Overlapped : int * int * int * IAsyncResult -> System.Threading.Overlapped
Public Sub New (offsetLo As Integer, offsetHi As Integer, hEvent As Integer, ar As IAsyncResult)

参数

offsetLo
Int32

启动传输的文件位置的低位字。

offsetHi
Int32

启动传输的文件位置的高位字。

hEvent
Int32

当 I/O 操作完成时终止的事件的句柄。

ar
IAsyncResult

一个实现 IAsyncResult 接口并提供 I/O 操作的状态信息的对象。

属性

注解

使用该 WaitHandle.Handle 属性获取从 WaitHandle 类派生的任何托管同步事件的句柄。

实现提供有关 IAsyncResult I/O 操作的状态信息。 将其传递给参数中的 ar 构造函数,并在稍后使用 AsyncResult 属性检索该构造函数。 如果为PackUnsafePack方法指定了回调方法,则回调可以通过解压缩NativeOverlapped接收的结构来检索IAsyncResult回调。

适用于

Overlapped(Int32, Int32, IntPtr, IAsyncResult)

用指定的文件位置、当 I/O 操作完成时终止的事件的句柄、以及一个用来返回操作结果的接口初始化 Overlapped 类的新实例。

public:
 Overlapped(int offsetLo, int offsetHi, IntPtr hEvent, IAsyncResult ^ ar);
public Overlapped (int offsetLo, int offsetHi, IntPtr hEvent, IAsyncResult? ar);
public Overlapped (int offsetLo, int offsetHi, IntPtr hEvent, IAsyncResult ar);
new System.Threading.Overlapped : int * int * nativeint * IAsyncResult -> System.Threading.Overlapped
Public Sub New (offsetLo As Integer, offsetHi As Integer, hEvent As IntPtr, ar As IAsyncResult)

参数

offsetLo
Int32

启动传输的文件位置的低位字。

offsetHi
Int32

启动传输的文件位置的高位字。

hEvent
IntPtr

nativeint

当 I/O 操作完成时终止的事件的句柄。

ar
IAsyncResult

一个实现 IAsyncResult 接口并提供 I/O 操作的状态信息的对象。

注解

若要获取派生自 WaitHandle 类的托管同步对象的句柄,请使用 WaitHandle.SafeWaitHandle 属性获取对象 SafeWaitHandle ,然后调用 DangerousGetHandle 该方法。

实现提供有关 IAsyncResult I/O 操作的状态信息。 将其传递给参数中的 ar 构造函数,并在稍后使用 AsyncResult 属性检索该构造函数。 如果为PackUnsafePack方法指定了回调方法,则回调可以通过解压缩NativeOverlapped接收的结构来检索IAsyncResult回调。

适用于