18.104.22.168.2 IManagedObject::GetObjectIdentity (Opnum 4)
The IManagedObject::GetObjectIdentity method is used by a CLR instance to determine whether a COM object entering the system is really a managed object that originated in this CLR instance and within the current process division.
HRESULT GetObjectIdentity( [out] BSTR* pBSTRGUID, [out] int* AppDomainID, [out] CCW_PTR pCCW );
AppDomainID: Optional parameter that contains implementation-specific, opaque, process-unique identifiers. If present, the AppDomainID parameter MUST denote the process subdivision in which this object resides.
pCCW: Optional field. Implementation-specific, opaque value that helps identify the managed object. If present, this field MUST map back to the implementation's internal representation of a managed object.
Return Values: The method MUST return a positive value or 0 to indicate successful completion or a negative value to indicate failure.
Exceptions Thrown: No exceptions are thrown from this method beyond those thrown by the underlying RPC protocol.