Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

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:
© 2017 Microsoft