HandleRef(Object, IntPtr) 建構函式

定義

使用要包裝的物件和 Unmanaged 程式碼所使用的資源控制代碼,初始化 HandleRef 類別的新執行個體。Initializes a new instance of the HandleRef class with the object to wrap and a handle to the resource used by unmanaged code.

public:
 HandleRef(System::Object ^ wrapper, IntPtr handle);
public HandleRef (object wrapper, IntPtr handle);
new System.Runtime.InteropServices.HandleRef : obj * nativeint -> System.Runtime.InteropServices.HandleRef
Public Sub New (wrapper As Object, handle As IntPtr)

參數

wrapper
Object

Managed 物件,不應該在平台叫用呼叫傳回前最終處理它。A managed object that should not be finalized until the platform invoke call returns.

handle
IntPtr

指示資源控制代碼的 IntPtrAn IntPtr that indicates a handle to a resource.

適用於