Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / clr / src / BCL / System / Runtime / Remoting / EnterpriseServicesHelper.cs / 1 / 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 \\ //---------------------------------------------------------\\ //----------------------------------------------------------\\ [SecurityPermissionAttribute(SecurityAction.LinkDemand, Flags=SecurityPermissionFlag.Infrastructure)] [System.Runtime.InteropServices.ComVisible(true)] public sealed class EnterpriseServicesHelper { [SecurityPermissionAttribute(SecurityAction.LinkDemand, Flags=SecurityPermissionFlag.UnmanagedCode)] 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; } [SecurityPermissionAttribute(SecurityAction.LinkDemand, Flags=SecurityPermissionFlag.UnmanagedCode)] 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); } }; }
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DefaultValueAttribute.cs
- IArgumentProvider.cs
- ColumnBinding.cs
- MessageSecurityOverHttp.cs
- SimpleBitVector32.cs
- XmlDataSourceNodeDescriptor.cs
- DeviceSpecificChoiceCollection.cs
- WebPartChrome.cs
- CodeArrayCreateExpression.cs
- PersonalizationStateInfo.cs
- DeflateStream.cs
- GradientStop.cs
- SafeSecurityHandles.cs
- EtwTrace.cs
- DataControlFieldTypeEditor.cs
- ViewStateException.cs
- x509store.cs
- QuestionEventArgs.cs
- ResourceDescriptionAttribute.cs
- WebHttpSecurityModeHelper.cs
- sortedlist.cs
- FactoryGenerator.cs
- TransformationRules.cs
- SharedPerformanceCounter.cs
- ClientClassGenerator.cs
- DocumentPageViewAutomationPeer.cs
- FontStyle.cs
- ObjectContextServiceProvider.cs
- UrlAuthorizationModule.cs
- ToolStripContentPanel.cs
- TreeNodeSelectionProcessor.cs
- Bits.cs
- EdmPropertyAttribute.cs
- FreezableCollection.cs
- BoundingRectTracker.cs
- DataGridViewRowPostPaintEventArgs.cs
- DataGridViewAdvancedBorderStyle.cs
- ModulesEntry.cs
- SecurityRequiresReviewAttribute.cs
- ContainerControlDesigner.cs
- IPPacketInformation.cs
- Buffer.cs
- _DomainName.cs
- PackageRelationshipCollection.cs
- ArcSegment.cs
- DownloadProgressEventArgs.cs
- WebPartEditorApplyVerb.cs
- SerializationInfoEnumerator.cs
- ClassHandlersStore.cs
- HtmlInputRadioButton.cs
- TraceHandlerErrorFormatter.cs
- ThemeableAttribute.cs
- ExpressionBuilderCollection.cs
- PointAnimationUsingKeyFrames.cs
- FixedFlowMap.cs
- ClientSettingsStore.cs
- InternalRelationshipCollection.cs
- SettingsPropertyIsReadOnlyException.cs
- InfoCardAsymmetricCrypto.cs
- SystemTcpStatistics.cs
- DataGridViewColumnDesignTimeVisibleAttribute.cs
- WebPartZoneBase.cs
- DispatcherHookEventArgs.cs
- WebUtil.cs
- ZipIOCentralDirectoryFileHeader.cs
- TextViewBase.cs
- PaginationProgressEventArgs.cs
- EventLogPermissionAttribute.cs
- ToolStripDesignerAvailabilityAttribute.cs
- ColorKeyFrameCollection.cs
- TreeWalkHelper.cs
- BaseHashHelper.cs
- LazyLoadBehavior.cs
- WebBrowserBase.cs
- ProfileSection.cs
- ProxyGenerator.cs
- Missing.cs
- StateManagedCollection.cs
- PropertyStore.cs
- SkewTransform.cs
- Model3DGroup.cs
- IODescriptionAttribute.cs
- ProfileInfo.cs
- WebPartDisplayModeCollection.cs
- DelegateSerializationHolder.cs
- ForEachAction.cs
- ProjectionCamera.cs
- EnumMemberAttribute.cs
- TreeNodeStyleCollection.cs
- _NegoState.cs
- xmlsaver.cs
- SamlSerializer.cs
- AssemblyInfo.cs
- Lazy.cs
- CustomErrorsSection.cs
- ThreadAttributes.cs
- DataGridHelper.cs
- DebugInfoExpression.cs
- DataGridViewCellStyleConverter.cs
- CodeBlockBuilder.cs