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 呼叫該類別的某個實例。