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
- GeneralTransform3DGroup.cs
- ContentElementCollection.cs
- EntityDesignerBuildProvider.cs
- ClrProviderManifest.cs
- ProcessModelInfo.cs
- ResourceDefaultValueAttribute.cs
- CodeAttributeArgumentCollection.cs
- VBIdentifierNameEditor.cs
- XAMLParseException.cs
- Point3DCollection.cs
- ListenDesigner.cs
- contentDescriptor.cs
- HtmlWindow.cs
- ConfigXmlElement.cs
- VectorValueSerializer.cs
- Visual.cs
- QueryContinueDragEvent.cs
- ResponseStream.cs
- BamlLocalizer.cs
- ConvertersCollection.cs
- WindowsPrincipal.cs
- ListViewDeleteEventArgs.cs
- DCSafeHandle.cs
- DataGridViewCellLinkedList.cs
- DispatcherOperation.cs
- PropertyPath.cs
- xmlsaver.cs
- KeyValueSerializer.cs
- GeometryGroup.cs
- HttpListenerElement.cs
- AssociatedControlConverter.cs
- DWriteFactory.cs
- EntityWrapper.cs
- RelatedPropertyManager.cs
- WebBrowsableAttribute.cs
- EdgeModeValidation.cs
- DataGrid.cs
- ReflectTypeDescriptionProvider.cs
- XmlDocument.cs
- HealthMonitoringSectionHelper.cs
- InkCanvasSelection.cs
- XmlSecureResolver.cs
- SafeTimerHandle.cs
- PropertyItem.cs
- SoapCodeExporter.cs
- ParenthesizePropertyNameAttribute.cs
- InvalidPrinterException.cs
- WindowsNonControl.cs
- DateTimeEditor.cs
- EntityClassGenerator.cs
- ImageFormatConverter.cs
- SessionIDManager.cs
- ControlOperationBehavior.cs
- TableRow.cs
- StringFreezingAttribute.cs
- ByeOperation11AsyncResult.cs
- GiveFeedbackEvent.cs
- SortFieldComparer.cs
- WizardStepBase.cs
- TimeZoneInfo.cs
- ProxyFragment.cs
- BamlLocalizationDictionary.cs
- Int64.cs
- CookielessHelper.cs
- ListViewInsertEventArgs.cs
- CodeAttributeDeclarationCollection.cs
- SqlClientMetaDataCollectionNames.cs
- TemplatingOptionsDialog.cs
- WindowsSolidBrush.cs
- GlyphRunDrawing.cs
- CompiledQueryCacheEntry.cs
- XmlReaderDelegator.cs
- HtmlUtf8RawTextWriter.cs
- EmptyEnumerator.cs
- DataColumnPropertyDescriptor.cs
- TextBox.cs
- XamlReaderHelper.cs
- GeneralTransformGroup.cs
- _ConnectOverlappedAsyncResult.cs
- SafeSecurityHandles.cs
- FixedNode.cs
- PathTooLongException.cs
- FormViewPagerRow.cs
- _FtpDataStream.cs
- FileLogRecordEnumerator.cs
- DataGridViewRowHeightInfoPushedEventArgs.cs
- XPathSingletonIterator.cs
- MaskDesignerDialog.cs
- InitializingNewItemEventArgs.cs
- Helpers.cs
- PropertyMap.cs
- SimplePropertyEntry.cs
- EventMappingSettingsCollection.cs
- ViewManager.cs
- AlignmentXValidation.cs
- FormsAuthenticationTicket.cs
- ExtentKey.cs
- HtmlUtf8RawTextWriter.cs
- StreamMarshaler.cs
- SiteMapHierarchicalDataSourceView.cs