Compartir a través de


ComUtilities.IsSameComObject Method

Verifies that the specified objects represent the same instance of an object. This method essentially compares the IUnknown pointers of the two objects, which is needed in scenarios where aggregation is involved.

Namespace:  Microsoft.VisualStudio.Shell
Assembly:  Microsoft.VisualStudio.Shell.12.0 (in Microsoft.VisualStudio.Shell.12.0.dll)

Syntax

'Declaration
Public Shared Function IsSameComObject ( _
    object1 As Object, _
    object2 As Object _
) As Boolean
public static bool IsSameComObject(
    Object object1,
    Object object2
)
public:
static bool IsSameComObject(
    Object^ object1, 
    Object^ object2
)
static member IsSameComObject : 
        object1:Object * 
        object2:Object -> bool
public static function IsSameComObject(
    object1 : Object, 
    object2 : Object
) : boolean

Parameters

  • object1
    Type: Object

    The first item to compare. This parameter can be an object, interface or IntPtr.

  • object2
    Type: Object

    The second item to compare. This parameter can be an object, interface or IntPtr.

Return Value

Type: Boolean
true if the two items represent the same thing, false otherwise.

.NET Framework Security

See Also

Reference

ComUtilities Class

Microsoft.VisualStudio.Shell Namespace