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
- CodeDOMUtility.cs
- RequestCachePolicy.cs
- VoiceSynthesis.cs
- StrongNamePublicKeyBlob.cs
- XmlSchemaObjectTable.cs
- OdbcUtils.cs
- MemoryPressure.cs
- PropertyDescriptorGridEntry.cs
- InstanceKeyNotReadyException.cs
- XamlStyleSerializer.cs
- Attributes.cs
- ExpanderAutomationPeer.cs
- HandlerWithFactory.cs
- documentsequencetextview.cs
- ConfigurationManagerHelperFactory.cs
- ModelUIElement3D.cs
- PtsHost.cs
- StateManagedCollection.cs
- PrimaryKeyTypeConverter.cs
- UnsafeNativeMethods.cs
- DataGridViewColumn.cs
- XmlQueryContext.cs
- PopupRootAutomationPeer.cs
- DataRelationCollection.cs
- HttpContextWrapper.cs
- UserMapPath.cs
- ContentTypeSettingDispatchMessageFormatter.cs
- SAPICategories.cs
- LinqDataSourceDisposeEventArgs.cs
- SizeConverter.cs
- Selection.cs
- DataGridTextColumn.cs
- DelayLoadType.cs
- ThemeableAttribute.cs
- FileDialog.cs
- InvalidPrinterException.cs
- DataFormats.cs
- StylusLogic.cs
- XsdDuration.cs
- MediaSystem.cs
- CacheSection.cs
- NativeMethods.cs
- designeractionbehavior.cs
- DragStartedEventArgs.cs
- XmlDataSourceNodeDescriptor.cs
- WindowsStreamSecurityBindingElement.cs
- TouchEventArgs.cs
- VectorAnimation.cs
- HttpHandler.cs
- _AuthenticationState.cs
- ConditionCollection.cs
- ProfileParameter.cs
- Speller.cs
- DateTimeFormatInfoScanner.cs
- StopStoryboard.cs
- ToolStripMenuItem.cs
- WebPartDisplayModeCancelEventArgs.cs
- TreeViewAutomationPeer.cs
- XmlSchema.cs
- DrawingVisual.cs
- DataTablePropertyDescriptor.cs
- RequestCachePolicy.cs
- Pair.cs
- NonSerializedAttribute.cs
- brushes.cs
- NullableBoolConverter.cs
- Item.cs
- Logging.cs
- MetabaseReader.cs
- InfoCardX509Validator.cs
- RequestTimeoutManager.cs
- ClientFormsIdentity.cs
- MappingSource.cs
- GrammarBuilderWildcard.cs
- ToolStripItemTextRenderEventArgs.cs
- BoundingRectTracker.cs
- RadioButton.cs
- WebPartTransformer.cs
- EmptyControlCollection.cs
- QueryAccessibilityHelpEvent.cs
- metadatamappinghashervisitor.hashsourcebuilder.cs
- EntityWithKeyStrategy.cs
- CookielessHelper.cs
- ShaderEffect.cs
- ZipArchive.cs
- ZipFileInfo.cs
- LayoutTableCell.cs
- UnsafeNativeMethods.cs
- TerminatorSinks.cs
- ProfileEventArgs.cs
- RegistryDataKey.cs
- TextTreeInsertElementUndoUnit.cs
- Pair.cs
- CommandLibraryHelper.cs
- SoapSchemaImporter.cs
- HostingPreferredMapPath.cs
- ValidatingPropertiesEventArgs.cs
- KerberosRequestorSecurityTokenAuthenticator.cs
- DecimalAverageAggregationOperator.cs
- _UriTypeConverter.cs