Overlapped.Pack Method (IOCompletionCallback)
Packs the current instance into a NativeOverlapped structure, specifying the delegate to be invoked when the asynchronous I/O operation is complete.
This API is not CLS-compliant.
Assembly: mscorlib (in mscorlib.dll)
[SecurityCriticalAttribute] [ObsoleteAttribute("This method is not safe. Use Pack (iocb, userData) instead. http://go.microsoft.com/fwlink/?linkid=14202")] [CLSCompliantAttribute(false)] public unsafe NativeOverlapped* Pack( IOCompletionCallback iocb )
The caller is responsible for pinning the buffer. If the application domain is unloaded, however, the handle to the pinned buffer is destroyed and the buffer is released, leaving the I/O operation to write to the freed address. For this reason, it is better to use the Pack(IOCompletionCallback, Object) method overload, in which the runtime pins the buffer.
Requires full trust for the immediate caller. This member cannot be used by partially trusted or transparent code.
Available since 1.1