Udostępnij za pośrednictwem


ComUtilities.IsSameComObject(Object, Object) Method

Definition

Verify that object represent the same instance of an object. This essentially compares the IUnkown pointers of the 2 objects. This is needed in scenario where aggregation is involved.

public:
 static bool IsSameComObject(System::Object ^ object1, System::Object ^ object2);
public:
 static bool IsSameComObject(Platform::Object ^ object1, Platform::Object ^ object2);
 static bool IsSameComObject(winrt::Windows::Foundation::IInspectable const & object1, winrt::Windows::Foundation::IInspectable const & object2);
public static bool IsSameComObject (object object1, object object2);
static member IsSameComObject : obj * obj -> bool
Public Shared Function IsSameComObject (object1 As Object, object2 As Object) As Boolean

Parameters

object1
Object

Can be an object, interface or IntPtr

object2
Object

Can be an object, interface or IntPtr

Returns

True if the 2 items represent the same thing

Applies to