CreateObjRef Method
Collapse the table of content
Expand the table of content

MarshalByRefObject::CreateObjRef Method (Type^)

 

Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.

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

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

Parameters

requestedType
Type: System::Type^

The Type of the object that the new ObjRef will reference.

Return Value

Type: System.Runtime.Remoting::ObjRef^

Information required to generate a proxy.

Exception Condition
RemotingException

This instance is not a valid remoting object.

SecurityException

The immediate caller does not have infrastructure permission.

TheCreateObjRef method is called by remote object creation methods such as AppDomain::CreateInstance and AppDomain::CreateInstanceAndUnwrap. In most cases, there is no need to override this method.

SecurityCriticalAttribute

requires full trust for the immediate caller. This member cannot be used by partially trusted or transparent code.

.NET Framework
Available since 1.1
Return to top
Show:
© 2016 Microsoft