Редагувати

Поділитися через


EnterpriseServicesHelper.SwitchWrappers(RealProxy, RealProxy) Method

Definition

Switches a COM Callable Wrapper (CCW) from one instance of a class to another instance of the same class.

public:
 static void SwitchWrappers(System::Runtime::Remoting::Proxies::RealProxy ^ oldcp, System::Runtime::Remoting::Proxies::RealProxy ^ newcp);
public static void SwitchWrappers (System.Runtime.Remoting.Proxies.RealProxy oldcp, System.Runtime.Remoting.Proxies.RealProxy newcp);
[System.Security.SecurityCritical]
public static void SwitchWrappers (System.Runtime.Remoting.Proxies.RealProxy oldcp, System.Runtime.Remoting.Proxies.RealProxy newcp);
static member SwitchWrappers : System.Runtime.Remoting.Proxies.RealProxy * System.Runtime.Remoting.Proxies.RealProxy -> unit
[<System.Security.SecurityCritical>]
static member SwitchWrappers : System.Runtime.Remoting.Proxies.RealProxy * System.Runtime.Remoting.Proxies.RealProxy -> unit
Public Shared Sub SwitchWrappers (oldcp As RealProxy, newcp As RealProxy)

Parameters

oldcp
RealProxy

A proxy that represents the old instance of a class that is referenced by a CCW.

newcp
RealProxy

A proxy that represents the new instance of a class that is referenced by a CCW.

Attributes

Exceptions

The immediate caller does not have UnmanagedCode permission.

Remarks

Caution

This method can cause unwanted behavior. Before calling it, the user must ensure that this is a thread-safe operation, and that a call is not being made through the CCW to one of the instances of the class.

Applies to