Επεξεργασία

Κοινή χρήση μέσω


EnterpriseServicesHelper.WrapIUnknownWithComObject(IntPtr) Method

Definition

Wraps the specified IUnknown COM interface with a Runtime Callable Wrapper (RCW).

public:
 static System::Object ^ WrapIUnknownWithComObject(IntPtr punk);
public static object WrapIUnknownWithComObject (IntPtr punk);
[System.Security.SecurityCritical]
public static object WrapIUnknownWithComObject (IntPtr punk);
static member WrapIUnknownWithComObject : nativeint -> obj
[<System.Security.SecurityCritical>]
static member WrapIUnknownWithComObject : nativeint -> obj
Public Shared Function WrapIUnknownWithComObject (punk As IntPtr) As Object

Parameters

punk
IntPtr

nativeint

A pointer to the IUnknown COM interface to wrap.

Returns

The RCW where the specified IUnknown is wrapped.

Attributes

Exceptions

The immediate caller does not have UnmanagedCode permission.

Remarks

The WrapIUnknownWithComObject method is similar to the Marshal.GetObjectForIUnknown method, but does not attempt to maintain the identity of the unmanaged object. For example, two calls with the same IUnknown to the current method return two different RCWs, but two calls to the GetObjectForIUnknown method with the same IUnknown return the same RCW.

Applies to