Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / clr / src / BCL / System / Runtime / Remoting / EnterpriseServicesHelper.cs / 1305376 / EnterpriseServicesHelper.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== /*============================================================ ** ** File: ComponentServices.cs ** ** ** Purpose: Defines the general purpose ComponentServices ** ** ===========================================================*/ namespace System.Runtime.Remoting.Services { using System; using System.Reflection; using System.Runtime.Remoting.Activation; using System.Runtime.Remoting.Proxies; using System.Runtime.Remoting.Messaging; using System.Text; using System.Runtime.Serialization; using System.Runtime.CompilerServices; using System.Security.Permissions; using System.Runtime.InteropServices; //---------------------------------------------------------\\ //---------------------------------------------------------\\ // internal sealed class ComponentServices \\ //---------------------------------------------------------\\ //----------------------------------------------------------\\ [System.Security.SecurityCritical] // auto-generated_required [System.Runtime.InteropServices.ComVisible(true)] public sealed class EnterpriseServicesHelper { [System.Security.SecurityCritical] // auto-generated_required public static Object WrapIUnknownWithComObject(IntPtr punk) { return Marshal.InternalWrapIUnknownWithComObject(punk); } [System.Runtime.InteropServices.ComVisible(true)] public static IConstructionReturnMessage CreateConstructionReturnMessage(IConstructionCallMessage ctorMsg, MarshalByRefObject retObj) { IConstructionReturnMessage ctorRetMsg = null; // Create the return message ctorRetMsg = new ConstructorReturnMessage(retObj, null, 0, null, ctorMsg); // NOTE: WE ALLOW ONLY DEFAULT CTORs on SERVICEDCOMPONENTS return ctorRetMsg; } [System.Security.SecurityCritical] // auto-generated_required public static void SwitchWrappers(RealProxy oldcp, RealProxy newcp) { Object oldtp = oldcp.GetTransparentProxy(); Object newtp = newcp.GetTransparentProxy(); IntPtr oldcontextId = RemotingServices.GetServerContextForProxy(oldtp); IntPtr newcontextId = RemotingServices.GetServerContextForProxy(newtp); // switch the CCW from oldtp to new tp Marshal.InternalSwitchCCW(oldtp, newtp); } }; } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== /*============================================================ ** ** File: ComponentServices.cs ** ** ** Purpose: Defines the general purpose ComponentServices ** ** ===========================================================*/ namespace System.Runtime.Remoting.Services { using System; using System.Reflection; using System.Runtime.Remoting.Activation; using System.Runtime.Remoting.Proxies; using System.Runtime.Remoting.Messaging; using System.Text; using System.Runtime.Serialization; using System.Runtime.CompilerServices; using System.Security.Permissions; using System.Runtime.InteropServices; //---------------------------------------------------------\\ //---------------------------------------------------------\\ // internal sealed class ComponentServices \\ //---------------------------------------------------------\\ //----------------------------------------------------------\\ [System.Security.SecurityCritical] // auto-generated_required [System.Runtime.InteropServices.ComVisible(true)] public sealed class EnterpriseServicesHelper { [System.Security.SecurityCritical] // auto-generated_required public static Object WrapIUnknownWithComObject(IntPtr punk) { return Marshal.InternalWrapIUnknownWithComObject(punk); } [System.Runtime.InteropServices.ComVisible(true)] public static IConstructionReturnMessage CreateConstructionReturnMessage(IConstructionCallMessage ctorMsg, MarshalByRefObject retObj) { IConstructionReturnMessage ctorRetMsg = null; // Create the return message ctorRetMsg = new ConstructorReturnMessage(retObj, null, 0, null, ctorMsg); // NOTE: WE ALLOW ONLY DEFAULT CTORs on SERVICEDCOMPONENTS return ctorRetMsg; } [System.Security.SecurityCritical] // auto-generated_required public static void SwitchWrappers(RealProxy oldcp, RealProxy newcp) { Object oldtp = oldcp.GetTransparentProxy(); Object newtp = newcp.GetTransparentProxy(); IntPtr oldcontextId = RemotingServices.GetServerContextForProxy(oldtp); IntPtr newcontextId = RemotingServices.GetServerContextForProxy(newtp); // switch the CCW from oldtp to new tp Marshal.InternalSwitchCCW(oldtp, newtp); } }; } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- GetResponse.cs
- HuffModule.cs
- WindowsScrollBarBits.cs
- AlphaSortedEnumConverter.cs
- DispatchOperationRuntime.cs
- GcHandle.cs
- LocatorPart.cs
- HashMembershipCondition.cs
- X509Certificate.cs
- SafeLocalAllocation.cs
- HMAC.cs
- MonthChangedEventArgs.cs
- ZoomPercentageConverter.cs
- Rss20ItemFormatter.cs
- Int16Converter.cs
- SecurityTokenException.cs
- Vector.cs
- SafePEFileHandle.cs
- serverconfig.cs
- SmiConnection.cs
- NativeMethods.cs
- SmiEventSink_DeferedProcessing.cs
- DataFieldConverter.cs
- CacheModeConverter.cs
- ClassDataContract.cs
- Clock.cs
- EdgeModeValidation.cs
- SHA512.cs
- PerspectiveCamera.cs
- CodeDomExtensionMethods.cs
- CorrelationQueryBehavior.cs
- Image.cs
- SqlClientMetaDataCollectionNames.cs
- XsltContext.cs
- DashStyle.cs
- UntrustedRecipientException.cs
- RolePrincipal.cs
- SHA384Managed.cs
- EventLogPermission.cs
- DependencyPropertyHelper.cs
- SmtpTransport.cs
- PointAnimationBase.cs
- LocalizationComments.cs
- UIntPtr.cs
- DbResourceAllocator.cs
- Instrumentation.cs
- EventMappingSettings.cs
- DataList.cs
- DataGridItemCollection.cs
- ClientTargetCollection.cs
- WebConfigurationManager.cs
- TaskCanceledException.cs
- TripleDES.cs
- DBDataPermissionAttribute.cs
- TypeResolver.cs
- XmlAttributeAttribute.cs
- TypeDelegator.cs
- objectquery_tresulttype.cs
- ReceiveContext.cs
- HandleCollector.cs
- XmlWriter.cs
- dataprotectionpermission.cs
- NameTable.cs
- DataGridViewButtonCell.cs
- FormViewPagerRow.cs
- WebBrowserEvent.cs
- GeometryHitTestParameters.cs
- XmlILConstructAnalyzer.cs
- BaseHashHelper.cs
- Rotation3D.cs
- ItemList.cs
- DbTransaction.cs
- SplitContainerDesigner.cs
- Brush.cs
- LostFocusEventManager.cs
- OracleDateTime.cs
- Nodes.cs
- IsolationInterop.cs
- DataGridTablesFactory.cs
- StylusCaptureWithinProperty.cs
- DispatcherFrame.cs
- DateTimeStorage.cs
- ChangeConflicts.cs
- ToolStripManager.cs
- TypedElement.cs
- ExpressionBuilderCollection.cs
- CardSpacePolicyElement.cs
- XmlSchemaDocumentation.cs
- MsmqAppDomainProtocolHandler.cs
- EventLogger.cs
- PaintEvent.cs
- RayMeshGeometry3DHitTestResult.cs
- CopyAction.cs
- MethodRental.cs
- WriteableBitmap.cs
- Expression.cs
- QuaternionAnimationBase.cs
- Soap.cs
- ImageCodecInfo.cs
- PlanCompilerUtil.cs