Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / untmp / whidbey / QFE / 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); // 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); } }; } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DesignTimeResourceProviderFactoryAttribute.cs
- HwndKeyboardInputProvider.cs
- Asn1IntegerConverter.cs
- DataBindingExpressionBuilder.cs
- EntityDataSourceWrapper.cs
- WebHttpBindingCollectionElement.cs
- QueryStringParameter.cs
- DrawingBrush.cs
- ADConnectionHelper.cs
- DataExpression.cs
- HtmlDocument.cs
- SafeUserTokenHandle.cs
- LineBreak.cs
- ColorConverter.cs
- LongPath.cs
- RawStylusInput.cs
- RegexParser.cs
- CloseCryptoHandleRequest.cs
- EditorPartCollection.cs
- basenumberconverter.cs
- RequestValidator.cs
- InputGestureCollection.cs
- TypeHelper.cs
- CorePropertiesFilter.cs
- activationcontext.cs
- PrefixHandle.cs
- KeyTimeConverter.cs
- DataRelationPropertyDescriptor.cs
- DataGridViewRowHeightInfoNeededEventArgs.cs
- StorageEndPropertyMapping.cs
- DropTarget.cs
- Automation.cs
- FormatStringEditor.cs
- XmlQueryTypeFactory.cs
- BypassElement.cs
- IODescriptionAttribute.cs
- HttpCookie.cs
- EditorPartCollection.cs
- Panel.cs
- QueryAccessibilityHelpEvent.cs
- NativeRightsManagementAPIsStructures.cs
- HealthMonitoringSection.cs
- ListDesigner.cs
- ThrowHelper.cs
- IntegerValidatorAttribute.cs
- ModelVisual3D.cs
- Ppl.cs
- Int32RectValueSerializer.cs
- DataGridColumn.cs
- Base64Encoder.cs
- EdmProviderManifest.cs
- ChangesetResponse.cs
- DataControlLinkButton.cs
- DataGridTablesFactory.cs
- URLString.cs
- DocumentGridPage.cs
- PassportPrincipal.cs
- DbMetaDataColumnNames.cs
- RuntimeDelegateArgument.cs
- EntityParameterCollection.cs
- GridSplitterAutomationPeer.cs
- SamlAssertion.cs
- ConfigErrorGlyph.cs
- ImageKeyConverter.cs
- RotateTransform3D.cs
- WorkflowInlining.cs
- ProjectionPlanCompiler.cs
- QuaternionRotation3D.cs
- XPathAxisIterator.cs
- Set.cs
- arclist.cs
- MimeReturn.cs
- NetSectionGroup.cs
- SharedRuntimeState.cs
- ContainerSelectorBehavior.cs
- ToolStripMenuItemDesigner.cs
- MethodToken.cs
- XmlTextReaderImplHelpers.cs
- ArcSegment.cs
- StubHelpers.cs
- XmlElement.cs
- KeyFrames.cs
- XmlKeywords.cs
- DateTimeFormat.cs
- DataComponentMethodGenerator.cs
- BlobPersonalizationState.cs
- ControlBuilder.cs
- PackageFilter.cs
- DoubleConverter.cs
- DataGridViewTextBoxCell.cs
- GenerateScriptTypeAttribute.cs
- RijndaelManagedTransform.cs
- ToolStripCustomTypeDescriptor.cs
- PageCatalogPartDesigner.cs
- RoutedEventHandlerInfo.cs
- RadioButtonStandardAdapter.cs
- ParseNumbers.cs
- XmlQueryOutput.cs
- OleDbConnectionPoolGroupProviderInfo.cs
- RefreshResponseInfo.cs