RealProxy::CreateObjRef Method (Type^)

 

Creates an ObjRef for the specified object type, and registers it with the remoting infrastructure as a client-activated object.

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

public:
[SecurityCriticalAttribute]
virtual ObjRef^ CreateObjRef(
	Type^ requestedType
)

Parameters

requestedType
Type: System::Type^

The object type that an ObjRef is created for.

Return Value

Type: System.Runtime.Remoting::ObjRef^

A new instance of ObjRef that is created for the specified type.

virtual ObjRef^ CreateObjRef( Type^ ServerType ) override
{
   Console::WriteLine( "CreateObjRef Method Called ..." );
   CustomObjRef ^ myObjRef = gcnew CustomObjRef( myMarshalByRefObject,ServerType );
   myObjRef->URI = myUri;
   return myObjRef;
}

.NET Framework
Available since 1.1
Return to top
Show: