System.Runtime.Remoting.Services.EnterpriseServicesHelper.WrapIUnknownWithComObject Method

Wraps the specified IUnknown COM interface with a [<topic://cpconruntimecallablewrapper>] (RCW).

Syntax

public static object WrapIUnknownWithComObject (IntPtr punk)

Parameters

punk
A pointer to the IUnknown COM interface to wrap.

Returns

The RCW where the specified IUnknown is wrapped.

Remarks

The EnterpriseServicesHelper.WrapIUnknownWithComObject(IntPtr) method is similar to the System.Runtime.InteropServices.Marshal.GetObjectForIUnknown(IntPtr) 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 System.Runtime.InteropServices.Marshal.GetObjectForIUnknown(IntPtr) method with the same IUnknown return the same RCW.

Requirements

Namespace: System.Runtime.Remoting.Services
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0