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
- CustomValidator.cs
- SafeViewOfFileHandle.cs
- MSAAWinEventWrap.cs
- WebPartUserCapability.cs
- DateTimePickerDesigner.cs
- FormClosingEvent.cs
- ValueChangedEventManager.cs
- Metadata.cs
- EventLogQuery.cs
- MailHeaderInfo.cs
- HttpTransportBindingElement.cs
- BorderSidesEditor.cs
- CodePrimitiveExpression.cs
- BamlTreeUpdater.cs
- AVElementHelper.cs
- AsyncResult.cs
- SocketAddress.cs
- XPathNavigatorKeyComparer.cs
- GenericTypeParameterBuilder.cs
- EntityReference.cs
- SystemIPAddressInformation.cs
- CharAnimationBase.cs
- SystemFonts.cs
- NameObjectCollectionBase.cs
- CachedFontFamily.cs
- MessageDesigner.cs
- SiteMapNodeCollection.cs
- InvokeProviderWrapper.cs
- InstanceLockLostException.cs
- SchemaObjectWriter.cs
- Sql8ConformanceChecker.cs
- Documentation.cs
- LogicalExpressionTypeConverter.cs
- HtmlInputReset.cs
- CompressStream.cs
- DesignerTransaction.cs
- RemoteDebugger.cs
- DomainConstraint.cs
- HwndSourceParameters.cs
- UrlMapping.cs
- RolePrincipal.cs
- DataGridViewCellFormattingEventArgs.cs
- LinearQuaternionKeyFrame.cs
- ConnectionStringsSection.cs
- SelectionItemProviderWrapper.cs
- WebPartMovingEventArgs.cs
- SessionPageStatePersister.cs
- WebReferencesBuildProvider.cs
- ReflectPropertyDescriptor.cs
- MultiViewDesigner.cs
- mongolianshape.cs
- ErrorWebPart.cs
- SmiSettersStream.cs
- MenuItemBinding.cs
- EndPoint.cs
- UIElement3DAutomationPeer.cs
- SqlClientWrapperSmiStream.cs
- IISMapPath.cs
- AnonymousIdentificationModule.cs
- ResolvePPIDRequest.cs
- X509CertificateCollection.cs
- FormViewInsertEventArgs.cs
- PagerStyle.cs
- EntityDescriptor.cs
- RuntimeVariablesExpression.cs
- AssociationType.cs
- RangeBase.cs
- Grid.cs
- GraphicsContext.cs
- RegexRunnerFactory.cs
- ScopelessEnumAttribute.cs
- TextDocumentView.cs
- AttributeEmitter.cs
- SafeRegistryKey.cs
- DoubleStorage.cs
- CheckBoxList.cs
- WebPartConnectionsEventArgs.cs
- CreateUserWizardStep.cs
- Match.cs
- XamlSerializationHelper.cs
- WeakKeyDictionary.cs
- SystemSounds.cs
- HashMembershipCondition.cs
- TabControlCancelEvent.cs
- GridViewRowEventArgs.cs
- Int32KeyFrameCollection.cs
- TextEditorSelection.cs
- ComponentSerializationService.cs
- InfoCardArgumentException.cs
- DataControlFieldCell.cs
- ToolStripSeparator.cs
- SymLanguageType.cs
- TrustSection.cs
- MarkupObject.cs
- XPathMessageFilterElementComparer.cs
- DesignerActionPropertyItem.cs
- ComponentEditorForm.cs
- BindingListCollectionView.cs
- SrgsElementFactoryCompiler.cs
- ContextDataSource.cs