Επεξεργασία

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


Marshal.GetIDispatchForObjectInContext(Object) Method

Definition

Returns an IDispatch interface pointer from a managed object, if the caller is in the same context as that object.

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

Parameters

o
Object

The object whose IDispatch interface is requested.

Returns

IntPtr

nativeint

The IDispatch interface pointer for the specified object, or null if the caller is not in the same context as the specified object.

Attributes

Exceptions

o does not support the requested interface.

Remarks

This method is the same as GetIDispatchForObject except that it returns null if the caller is not in the same context as the object.

Applies to

See also