System.Threading.Overlapped Class

Assembly: Mscorlib.dll
Namespace: System.Threading
This type supports the Shared Source CLI infrastructure and is not intended to be used directly from your code.
Summary
Used to pack and unpack the managed overlapped class to and from the native overlapped class.
C# Syntax:
public class Overlapped
See also:
System.Threading Namespace

System.Threading.Overlapped Member List:

Public Constructors
ctor #1 Overloaded:
.ctor()

Default constructor. This constructor is called by derived class constructors to initialize state in this type.
Initializes a new, empty instance of the Overlapped class.
ctor #2 Overloaded:
.ctor(int offsetLo, int offsetHi, int hEvent, IAsyncResult ar)

Initializes a new instance of the Overlapped class from the constructor parameters.
Public Properties
AsyncResult Read-write

Gets or sets the results of an asynchronous operation on an asynchronous delegate.
EventHandle Read-write

Gets or sets the handle to an event.
OffsetHigh Read-write

Gets or sets the high word of the byte offset at which to start the transfer.
OffsetLow Read-write

Gets or sets the file position at which to start the transfer.
Public Methods
Equals
(inherited from System.Object)
See base class member description: System.Object.Equals

Derived from System.Object, the primary base class for all objects.
Free Frees the unmanaged memory associated with a native overlapped structure, allocated by System.Threading.Overlapped.Pack (not supported on the shared source CLI) .
GetHashCode
(inherited from System.Object)
See base class member description: System.Object.GetHashCode

Derived from System.Object, the primary base class for all objects.
GetType
(inherited from System.Object)
See base class member description: System.Object.GetType

Derived from System.Object, the primary base class for all objects.
ToString
(inherited from System.Object)
See base class member description: System.Object.ToString

Derived from System.Object, the primary base class for all objects.
Unpack Unpacks an unmanaged NativeOverlapped value type into a managed overlapped class.
Protected Methods
Finalize
(inherited from System.Object)
See base class member description: System.Object.Finalize

Derived from System.Object, the primary base class for all objects.
MemberwiseClone
(inherited from System.Object)
See base class member description: System.Object.MemberwiseClone

Derived from System.Object, the primary base class for all objects.

Hierarchy:


System.Threading.Overlapped Member Details

Overloaded ctor #1
Summary
Initializes a new, empty instance of the Overlapped class.

Default constructor. This constructor is called by derived class constructors to initialize state in this type.
C# Syntax:
public Overlapped();

Return to top


Overloaded ctor #2
Summary
Initializes a new instance of the Overlapped class from the constructor parameters.
C# Syntax:
public Overlapped(
   int offsetLo,
   int offsetHi,
   int hEvent,
   IAsyncResult ar
);
Parameters:

offsetLo

The file position at which to start the transfer.

offsetHi

The high word of the byte offset at which to start the transfer.

hEvent

The handle to an event.

ar

The results of an asynchronous operation on an asynchronous delegate.

Return to top


Property: AsyncResult (read-write)
Summary
Gets or sets the results of an asynchronous operation on an asynchronous delegate.
C# Syntax:
public IAsyncResult AsyncResult {get; set;}

Return to top


Property: EventHandle (read-write)
Summary
Gets or sets the handle to an event.
C# Syntax:
public int EventHandle {get; set;}

Return to top


Property: OffsetHigh (read-write)
Summary
Gets or sets the high word of the byte offset at which to start the transfer.
C# Syntax:
public int OffsetHigh {get; set;}

Return to top


Property: OffsetLow (read-write)
Summary
Gets or sets the file position at which to start the transfer.
C# Syntax:
public int OffsetLow {get; set;}

Return to top


Method: Equals(
   object obj
)
Inherited
See base class member description: System.Object.Equals
C# Syntax:
public virtual bool Equals(
   object obj
);

For more information on members inherited from System.Object click on the link above.

Return to top


Method: Finalize()
Inherited
See base class member description: System.Object.Finalize
C# Syntax:
~Overlapped();

For more information on members inherited from System.Object click on the link above.

Return to top


Method: Free(
   NativeOverlapped* nativeOverlappedPtr
)
Summary
Frees the unmanaged memory associated with a native overlapped structure, allocated by System.Threading.Overlapped.Pack (not supported on the shared source CLI) .
This member is not CLS Compliant

C# Syntax:
[CLSCompliant(false)]
unsafe public static void Free(
   NativeOverlapped* nativeOverlappedPtr
);
Parameters:

nativeOverlappedPtr

Remarks
You must call Free only once on every NativeOverlapped* you receive from System.Threading.Overlapped.Pack (not supported on the shared source CLI) . If you don't call Free, you will leak memory. If call Free more than once, memory will be corrupted.

Return to top


Method: GetHashCode()
Inherited
See base class member description: System.Object.GetHashCode
C# Syntax:
public virtual int GetHashCode();

For more information on members inherited from System.Object click on the link above.

Return to top


Method: GetType()
Inherited
See base class member description: System.Object.GetType
C# Syntax:
public Type GetType();

For more information on members inherited from System.Object click on the link above.

Return to top


Method: MemberwiseClone()
Inherited
See base class member description: System.Object.MemberwiseClone
C# Syntax:
protected object MemberwiseClone();

For more information on members inherited from System.Object click on the link above.

Return to top


Method: ToString()
Inherited
See base class member description: System.Object.ToString
C# Syntax:
public virtual string ToString();

For more information on members inherited from System.Object click on the link above.

Return to top


Method: Unpack(
   NativeOverlapped* nativeOverlappedPtr
)
Summary
Unpacks an unmanaged NativeOverlapped value type into a managed overlapped class.
This member is not CLS Compliant

C# Syntax:
[CLSCompliant(false)]
unsafe public static Overlapped Unpack(
   NativeOverlapped* nativeOverlappedPtr
);
Parameters:

nativeOverlappedPtr

Return Value:
The NativeOverlapped value type is not freed from physical memory until you call Overlapped.Free.

Return to top


Top of page

Copyright (c) 2002 Microsoft Corporation. All rights reserved.