internal static bool IsObjectOutOfProcess(Object tp)
{
if (!IsTransparentProxy(tp))
return false;
RealProxy rp = GetRealProxy(tp);
Identity id = rp.IdentityObject;
if (id is ServerIdentity)
return false;
else
{
if (null != id)
{
ObjRef objRef = id.ObjectRef;
if (objRef != null && objRef.IsFromThisProcess())
{
return false;
}
else
{
return true;
}
}
// assume out of process
return true;
}
} // IsObjectOutOfProcess