mscorlib(4.0.0.0) API with additions
System.Threading.Overlapped Class Reference

Provides a managed representation of a Win32 OVERLAPPED structure, including methods to transfer information from an T:System.Threading.Overlapped instance to a T:System.Threading.NativeOverlapped structure. More...

Inherited by System.Threading.ThreadPoolBoundHandleOverlapped.

Public Member Functions

 Overlapped ()
 Initializes a new, empty instance of the T:System.Threading.Overlapped class. More...
 
 Overlapped (int offsetLo, int offsetHi, IntPtr hEvent, IAsyncResult ar)
 Initializes a new instance of the T:System.Threading.Overlapped class with the specified file position, the handle to an event that is signaled when the I/O operation is complete, and an interface through which to return the results of the operation. More...
 
 Overlapped (int offsetLo, int offsetHi, int hEvent, IAsyncResult ar)
 Initializes a new instance of the T:System.Threading.Overlapped class with the specified file position, the 32-bit integer handle to an event that is signaled when the I/O operation is complete, and an interface through which to return the results of the operation. More...
 
unsafe NativeOverlappedPack (IOCompletionCallback iocb)
 Packs the current instance into a T:System.Threading.NativeOverlapped structure, specifying the delegate to be invoked when the asynchronous I/O operation is complete. More...
 
unsafe NativeOverlappedPack (IOCompletionCallback iocb, object userData)
 Packs the current instance into a T:System.Threading.NativeOverlapped structure, specifying a delegate that is invoked when the asynchronous I/O operation is complete and a managed object that serves as a buffer. More...
 
unsafe NativeOverlappedUnsafePack (IOCompletionCallback iocb)
 Packs the current instance into a T:System.Threading.NativeOverlapped structure specifying the delegate to invoke when the asynchronous I/O operation is complete. Does not propagate the calling stack. More...
 
unsafe NativeOverlappedUnsafePack (IOCompletionCallback iocb, object userData)
 Packs the current instance into a T:System.Threading.NativeOverlapped structure, specifying the delegate to invoke when the asynchronous I/O operation is complete and the managed object that serves as a buffer. Does not propagate the calling stack. More...
 

Static Public Member Functions

static unsafe Overlapped Unpack (NativeOverlapped *nativeOverlappedPtr)
 Unpacks the specified unmanaged T:System.Threading.NativeOverlapped structure into a managed T:System.Threading.Overlapped object. More...
 
static unsafe void Free (NativeOverlapped *nativeOverlappedPtr)
 Frees the unmanaged memory associated with a native overlapped structure allocated by the Overload:System.Threading.Overlapped.Pack method. More...
 

Properties

IAsyncResult AsyncResult [get, set]
 Gets or sets the object that provides status information on the I/O operation. More...
 
int OffsetLow [get, set]
 Gets or sets the low-order word of the file position at which to start the transfer. The file position is a byte offset from the start of the file. More...
 
int OffsetHigh [get, set]
 Gets or sets the high-order word of the file position at which to start the transfer. The file position is a byte offset from the start of the file. More...
 
int EventHandle [get, set]
 Gets or sets the 32-bit integer handle to a synchronization event that is signaled when the I/O operation is complete. More...
 
IntPtr EventHandleIntPtr [get, set]
 Gets or sets the handle to the synchronization event that is signaled when the I/O operation is complete. More...
 

Detailed Description

Provides a managed representation of a Win32 OVERLAPPED structure, including methods to transfer information from an T:System.Threading.Overlapped instance to a T:System.Threading.NativeOverlapped structure.

Definition at line 8 of file Overlapped.cs.

Constructor & Destructor Documentation

◆ Overlapped() [1/3]

System.Threading.Overlapped.Overlapped ( )

Initializes a new, empty instance of the T:System.Threading.Overlapped class.

Definition at line 98 of file Overlapped.cs.

◆ Overlapped() [2/3]

System.Threading.Overlapped.Overlapped ( int  offsetLo,
int  offsetHi,
IntPtr  hEvent,
IAsyncResult  ar 
)

Initializes a new instance of the T:System.Threading.Overlapped class with the specified file position, the handle to an event that is signaled when the I/O operation is complete, and an interface through which to return the results of the operation.

Parameters
offsetLoThe low word of the file position at which to start the transfer.
offsetHiThe high word of the file position at which to start the transfer.
hEventThe handle to an event that is signaled when the I/O operation is complete.
arAn object that implements the T:System.IAsyncResult interface and provides status information on the I/O operation.

Definition at line 109 of file Overlapped.cs.

◆ Overlapped() [3/3]

System.Threading.Overlapped.Overlapped ( int  offsetLo,
int  offsetHi,
int  hEvent,
IAsyncResult  ar 
)

Initializes a new instance of the T:System.Threading.Overlapped class with the specified file position, the 32-bit integer handle to an event that is signaled when the I/O operation is complete, and an interface through which to return the results of the operation.

Parameters
offsetLoThe low word of the file position at which to start the transfer.
offsetHiThe high word of the file position at which to start the transfer.
hEventThe handle to an event that is signaled when the I/O operation is complete.
arAn object that implements the T:System.IAsyncResult interface and provides status information on the I/O operation.

Definition at line 125 of file Overlapped.cs.

Member Function Documentation

◆ Free()

static unsafe void System.Threading.Overlapped.Free ( NativeOverlapped nativeOverlappedPtr)
static

Frees the unmanaged memory associated with a native overlapped structure allocated by the Overload:System.Threading.Overlapped.Pack method.

Parameters
nativeOverlappedPtrA pointer to the T:System.Threading.NativeOverlapped structure to be freed.
Exceptions
T:System.ArgumentNullExceptionnativeOverlappedPtr is null.

Definition at line 203 of file Overlapped.cs.

◆ Pack() [1/2]

unsafe NativeOverlapped* System.Threading.Overlapped.Pack ( IOCompletionCallback  iocb)

Packs the current instance into a T:System.Threading.NativeOverlapped structure, specifying the delegate to be invoked when the asynchronous I/O operation is complete.

Parameters
iocbAn T:System.Threading.IOCompletionCallback delegate that represents the callback method invoked when the asynchronous I/O operation completes.
Returns
An unmanaged pointer to a T:System.Threading.NativeOverlapped structure.
Exceptions
T:System.InvalidOperationExceptionThe current T:System.Threading.Overlapped has already been packed.

Definition at line 137 of file Overlapped.cs.

◆ Pack() [2/2]

unsafe NativeOverlapped* System.Threading.Overlapped.Pack ( IOCompletionCallback  iocb,
object  userData 
)

Packs the current instance into a T:System.Threading.NativeOverlapped structure, specifying a delegate that is invoked when the asynchronous I/O operation is complete and a managed object that serves as a buffer.

Parameters
iocbAn T:System.Threading.IOCompletionCallback delegate that represents the callback method invoked when the asynchronous I/O operation completes.
userDataAn object or array of objects representing the input or output buffer for the operation. Each object represents a buffer, for example an array of bytes.
Returns
An unmanaged pointer to a T:System.Threading.NativeOverlapped structure.
Exceptions
T:System.InvalidOperationExceptionThe current T:System.Threading.Overlapped has already been packed.

Definition at line 150 of file Overlapped.cs.

◆ Unpack()

static unsafe Overlapped System.Threading.Overlapped.Unpack ( NativeOverlapped nativeOverlappedPtr)
static

Unpacks the specified unmanaged T:System.Threading.NativeOverlapped structure into a managed T:System.Threading.Overlapped object.

Parameters
nativeOverlappedPtrAn unmanaged pointer to a T:System.Threading.NativeOverlapped structure.
Returns
An T:System.Threading.Overlapped object containing the information unpacked from the native structure.
Exceptions
T:System.ArgumentNullExceptionnativeOverlappedPtr is null.

Definition at line 188 of file Overlapped.cs.

◆ UnsafePack() [1/2]

unsafe NativeOverlapped* System.Threading.Overlapped.UnsafePack ( IOCompletionCallback  iocb)

Packs the current instance into a T:System.Threading.NativeOverlapped structure specifying the delegate to invoke when the asynchronous I/O operation is complete. Does not propagate the calling stack.

Parameters
iocbAn T:System.Threading.IOCompletionCallback delegate that represents the callback method invoked when the asynchronous I/O operation completes.
Returns
An unmanaged pointer to a T:System.Threading.NativeOverlapped structure.
Exceptions
T:System.InvalidOperationExceptionThe current T:System.Threading.Overlapped has already been packed.

Definition at line 162 of file Overlapped.cs.

◆ UnsafePack() [2/2]

unsafe NativeOverlapped* System.Threading.Overlapped.UnsafePack ( IOCompletionCallback  iocb,
object  userData 
)

Packs the current instance into a T:System.Threading.NativeOverlapped structure, specifying the delegate to invoke when the asynchronous I/O operation is complete and the managed object that serves as a buffer. Does not propagate the calling stack.

Parameters
iocbAn T:System.Threading.IOCompletionCallback delegate that represents the callback method invoked when the asynchronous I/O operation completes.
userDataAn object or array of objects representing the input or output buffer for the operation. Each object represents a buffer, for example an array of bytes.
Returns
An unmanaged pointer to a T:System.Threading.NativeOverlapped structure.
Exceptions
T:System.Security.SecurityExceptionThe caller does not have the required permission.
T:System.InvalidOperationExceptionThe current T:System.Threading.Overlapped is already packed.

Definition at line 176 of file Overlapped.cs.

Property Documentation

◆ AsyncResult

IAsyncResult System.Threading.Overlapped.AsyncResult
getset

Gets or sets the object that provides status information on the I/O operation.

Returns
An object that implements the T:System.IAsyncResult interface.

Definition at line 17 of file Overlapped.cs.

◆ EventHandle

int System.Threading.Overlapped.EventHandle
getset

Gets or sets the 32-bit integer handle to a synchronization event that is signaled when the I/O operation is complete.

Returns
An T:System.Int32 value representing the handle of the synchronization event.

Definition at line 60 of file Overlapped.cs.

◆ EventHandleIntPtr

IntPtr System.Threading.Overlapped.EventHandleIntPtr
getset

Gets or sets the handle to the synchronization event that is signaled when the I/O operation is complete.

Returns
An T:System.IntPtr representing the handle of the event.

Definition at line 75 of file Overlapped.cs.

◆ OffsetHigh

int System.Threading.Overlapped.OffsetHigh
getset

Gets or sets the high-order word of the file position at which to start the transfer. The file position is a byte offset from the start of the file.

Returns
An T:System.Int32 value representing the high word of the file position.

Definition at line 45 of file Overlapped.cs.

◆ OffsetLow

int System.Threading.Overlapped.OffsetLow
getset

Gets or sets the low-order word of the file position at which to start the transfer. The file position is a byte offset from the start of the file.

Returns
An T:System.Int32 value representing the low word of the file position.

Definition at line 31 of file Overlapped.cs.


The documentation for this class was generated from the following file: