SafeHandle::SetHandle Method (IntPtr)
.NET Framework (current version)
Sets the handle to the specified pre-existing handle.
Assembly: mscorlib (in mscorlib.dll)
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 output handles in a structure.
SecurityPermission
for permission to call unmanaged code. Security action: LinkDemand. Associated enumeration: SecurityPermissionFlag::UnmanagedCode
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 7.0
Windows Phone
Available since 8.1
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 7.0
Windows Phone
Available since 8.1
Show: