Code:
/ 4.0 / 4.0 / untmp / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SatelliteContractVersionAttribute.cs
- Send.cs
- DropShadowEffect.cs
- Parser.cs
- Pts.cs
- StorageInfo.cs
- ThaiBuddhistCalendar.cs
- FactoryMaker.cs
- PointF.cs
- ResolvedKeyFrameEntry.cs
- ManualWorkflowSchedulerService.cs
- ReferenceEqualityComparer.cs
- MdiWindowListStrip.cs
- FixedElement.cs
- TreeNodeStyleCollection.cs
- ObservableDictionary.cs
- Manipulation.cs
- HandlerMappingMemo.cs
- Object.cs
- DbConnectionInternal.cs
- BindMarkupExtensionSerializer.cs
- MasterPageBuildProvider.cs
- HttpWriter.cs
- DocumentsTrace.cs
- MessageEventSubscriptionService.cs
- ListBoxAutomationPeer.cs
- SRGSCompiler.cs
- ResourceCategoryAttribute.cs
- LongMinMaxAggregationOperator.cs
- HashRepartitionStream.cs
- XmlDictionaryReader.cs
- Exception.cs
- DynamicResourceExtensionConverter.cs
- RootNamespaceAttribute.cs
- ModifiableIteratorCollection.cs
- webproxy.cs
- DataContractJsonSerializer.cs
- ContextMenu.cs
- hwndwrapper.cs
- CheckedListBox.cs
- VScrollBar.cs
- OutputCacheProfile.cs
- XPathBuilder.cs
- GeneralTransformGroup.cs
- ScriptingProfileServiceSection.cs
- Pair.cs
- ObjectSpanRewriter.cs
- ModelPerspective.cs
- DispatcherObject.cs
- PropertyCollection.cs
- XmlObjectSerializerWriteContextComplex.cs
- ObjectFactoryCodeDomTreeGenerator.cs
- XamlSerializationHelper.cs
- WebPartEditVerb.cs
- UnmanagedMarshal.cs
- UIElement3D.cs
- IsolatedStorageFilePermission.cs
- CacheOutputQuery.cs
- FillErrorEventArgs.cs
- RenderDataDrawingContext.cs
- _AcceptOverlappedAsyncResult.cs
- AlphabeticalEnumConverter.cs
- CustomErrorsSectionWrapper.cs
- WhitespaceRuleLookup.cs
- ToolStripSystemRenderer.cs
- TemplatedWizardStep.cs
- DetailsViewDeletedEventArgs.cs
- ConfigurationLocation.cs
- CssClassPropertyAttribute.cs
- ValueTable.cs
- CatalogZone.cs
- Graphics.cs
- HostExecutionContextManager.cs
- ListItemsCollectionEditor.cs
- ToolboxBitmapAttribute.cs
- DataGridViewColumnCollectionDialog.cs
- DataGridViewSortCompareEventArgs.cs
- IntSecurity.cs
- InvalidMessageContractException.cs
- BindingListCollectionView.cs
- Root.cs
- WebBrowsableAttribute.cs
- FormViewUpdatedEventArgs.cs
- FrameworkElement.cs
- XmlSchemaAttribute.cs
- GcSettings.cs
- SessionSwitchEventArgs.cs
- QueryOptionExpression.cs
- SelectionProviderWrapper.cs
- ChameleonKey.cs
- XmlSchemaException.cs
- Base64Decoder.cs
- NonVisualControlAttribute.cs
- ServiceOperationHelpers.cs
- TableRow.cs
- RegexParser.cs
- InvalidateEvent.cs
- SqlDesignerDataSourceView.cs
- SmiEventSink_DeferedProcessing.cs
- XmlSignatureProperties.cs