SetHandle Method
Collapse the table of content
Expand the table of content

CriticalHandle.SetHandle Method (IntPtr)

 

Sets the handle to the specified pre-existing handle.

Namespace:   System.Runtime.InteropServices
Assembly:  mscorlib (in mscorlib.dll)

protected void SetHandle(
	IntPtr handle
)

Parameters

handle
Type: System.IntPtr

The pre-existing handle to use.

Use the SetHandle method only if you need to support a pre-existing handle (for example, if the handle is returned in a structure) because the .NET Framework COM interop infrastructure does not support marshaling handles in a structure.

Universal Windows Platform
Available since 8
.NET Framework
Available since 2.0
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 8.0
Windows Phone
Available since 8.1
Return to top
Show:
© 2016 Microsoft