CriticalHandle.SetHandle Method (IntPtr)


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Sets the handle to the specified pre-existing handle.

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

protected void SetHandle(
	IntPtr 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
Available since 2.0
Windows Phone Silverlight
Available since 8.0
Windows Phone
Available since 8.1
Return to top