WeakGCHandle<T>.FromIntPtr(IntPtr) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
將從一個句柄建立的新物件回傳 WeakGCHandle<T> 給一個受管理物件。
public:
static System::Runtime::InteropServices::WeakGCHandle<T> FromIntPtr(IntPtr value);
public static System.Runtime.InteropServices.WeakGCHandle<T> FromIntPtr(IntPtr value);
static member FromIntPtr : nativeint -> System.Runtime.InteropServices.WeakGCHandle<'T (requires 'T : null)>
Public Shared Function FromIntPtr (value As IntPtr) As WeakGCHandle(Of T)
參數
- value
-
IntPtr
nativeint
一個 IntPtr 管理物件的 handle 來建立 WeakGCHandle<T> 物件。
傳回
一個對 WeakGCHandle<T> 應於值參數的新物件。
備註
此方法不會驗證所提供的 handle 值。 呼叫者必須確保該句柄的有效性。
IntPtr的WeakGCHandle<T>表示與 不可互換GCHandle。