RealProxy Constructor (Type^, IntPtr, Object^)
.NET Framework (current version)
Initializes a new instance of the RealProxy class.
Assembly: mscorlib (in mscorlib.dll)
protected:
[SecurityCriticalAttribute]
RealProxy(
Type^ classToProxy,
IntPtr stub,
Object^ stubData
)
Parameters
- classToProxy
-
Type:
System::Type^
The Type of the remote object for which to create a proxy.
- stub
-
Type:
System::IntPtr
A stub to associate with the new proxy instance.
- stubData
-
Type:
System::Object^
The stub data to set for the specified stub and the new proxy instance.
| Exception | Condition |
|---|---|
| ArgumentException | classToProxy is not an interface, and is not derived from MarshalByRefObject. |
The stub data is used by custom proxy users to decide what to do with an incoming method call. For example, the stub data might be information about the server's context that you can use to determine whether to execute the call locally, or send it through the remoting infrastructure.
SecurityPermission
For calling unmanaged code. Associated enumeration: SecurityPermissionFlag::UnmanagedCode.
.NET Framework
Available since 1.1
Available since 1.1
Show: