Marshal.InitHandle(SafeHandle, IntPtr) 方法

定义

将新创建的 SafeHandle 的基础句柄初始化为提供的值。

public:
 static void InitHandle(System::Runtime::InteropServices::SafeHandle ^ safeHandle, IntPtr handle);
public static void InitHandle (System.Runtime.InteropServices.SafeHandle safeHandle, IntPtr handle);
static member InitHandle : System.Runtime.InteropServices.SafeHandle * nativeint -> unit
Public Shared Sub InitHandle (safeHandle As SafeHandle, handle As IntPtr)

参数

safeHandle
SafeHandle

SafeHandle 要更新的实例

handle
IntPtr

nativeint

预先存在的句柄

适用于