共用方式為


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

預先存在的句柄

適用於