EnterpriseServicesHelper.SwitchWrappers(RealProxy, RealProxy) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
在相同类的不同实例中切换 COM 可调用包装 (CCW)。
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)
参数
- oldcp
- RealProxy
一个代理,其代表 CCW 所引用类的旧实例。
- newcp
- RealProxy
一个代理,其代表 CCW 所引用类的新实例。
- 属性
例外
直接调用方没有 UnmanagedCode 权限。
注解
注意
此方法可能会导致不需要的行为。 在调用它之前,用户必须确保这是线程安全的操作,并且不会通过 CCW 对 类的某个实例进行调用。