This documentation is archived and is not being maintained.

IRemotingTypeInfo Interface

Provides type information for an object.

Namespace: System.Runtime.Remoting
Assembly: mscorlib (in mscorlib.dll)

<ComVisibleAttribute(True)> _
Public Interface IRemotingTypeInfo
Dim instance As IRemotingTypeInfo

/** @attribute ComVisibleAttribute(true) */ 
public interface IRemotingTypeInfo
public interface IRemotingTypeInfo

Use this interface to provide custom type information that is carried along with the ObjRef objects.

Dim objRefSample As ObjRef = RemotingServices.GetObjRefForProxy(myRemoteObject)
Console.WriteLine("***ObjRef Details***")
Console.WriteLine("URI:" + ControlChars.Tab + "{0}", objRefSample.URI)
Dim channelData As Object() = objRefSample.ChannelInfo.ChannelData
Console.WriteLine("Channel Info:")
Dim o As Object
For Each o In  channelData
   Console.WriteLine(ControlChars.Tab + "{0}", o.ToString())
Next o
Dim envoyInfo As IEnvoyInfo = objRefSample.EnvoyInfo
If envoyInfo Is Nothing Then
   Console.WriteLine("This ObjRef does not have envoy information.")
   Dim envoySinks As IMessageSink = envoyInfo.EnvoySinks
   Console.WriteLine("Envoy Sink Class: {0}", envoySinks)
End If
Dim typeInfo As IRemotingTypeInfo = objRefSample.TypeInfo
Console.WriteLine("Remote type name: {0}", typeInfo.TypeName)
Console.WriteLine("Can my object cast to a Bitmap? {0}", typeInfo.CanCastTo(GetType(System.Drawing.Bitmap), objRefSample))
Console.WriteLine("Is this object from this AppDomain? {0}", objRefSample.IsFromThisAppDomain())
Console.WriteLine("Is this object from this process? {0}", objRefSample.IsFromThisProcess())

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0, 1.1, 1.0