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
- Root.cs
- RuntimeTrackingProfile.cs
- WindowProviderWrapper.cs
- DictionaryBase.cs
- SiteMapProvider.cs
- FontInfo.cs
- PeerNameResolver.cs
- TreeNodeClickEventArgs.cs
- ClusterUtils.cs
- JpegBitmapDecoder.cs
- AnonymousIdentificationSection.cs
- Char.cs
- Pair.cs
- PropertyItem.cs
- ForeignKeyFactory.cs
- SQLInt32.cs
- FontDialog.cs
- Regex.cs
- CacheRequest.cs
- DataTablePropertyDescriptor.cs
- FtpRequestCacheValidator.cs
- ValidatingReaderNodeData.cs
- MethodBuilderInstantiation.cs
- TextEditorParagraphs.cs
- KnownTypeHelper.cs
- AbstractSvcMapFileLoader.cs
- Vector3DValueSerializer.cs
- COAUTHINFO.cs
- XamlFrame.cs
- ExpanderAutomationPeer.cs
- StateBag.cs
- NullableLongSumAggregationOperator.cs
- CodeObjectCreateExpression.cs
- HtmlMobileTextWriter.cs
- SoapDocumentMethodAttribute.cs
- FixedSOMGroup.cs
- XPathDocument.cs
- TemplateControlCodeDomTreeGenerator.cs
- SynchronizationFilter.cs
- BitConverter.cs
- SearchExpression.cs
- HelpEvent.cs
- XslVisitor.cs
- MenuAdapter.cs
- Rectangle.cs
- BufferedReadStream.cs
- JsonWriterDelegator.cs
- KeyValuePairs.cs
- EntityDesignerUtils.cs
- OperationSelectorBehavior.cs
- Function.cs
- PriorityRange.cs
- SpeakInfo.cs
- Splitter.cs
- RadioButtonAutomationPeer.cs
- ProxyElement.cs
- CaseInsensitiveOrdinalStringComparer.cs
- ServerIdentity.cs
- XmlWrappingReader.cs
- EncoderFallback.cs
- ServiceDescriptionImporter.cs
- ObjectItemAssemblyLoader.cs
- RadioButtonPopupAdapter.cs
- LayoutInformation.cs
- FigureHelper.cs
- PreProcessor.cs
- ExpressionBuilder.cs
- FragmentQueryProcessor.cs
- EntityViewGenerator.cs
- ImplicitInputBrush.cs
- HierarchicalDataBoundControl.cs
- HttpCacheVaryByContentEncodings.cs
- TextTreeInsertUndoUnit.cs
- CodeDOMProvider.cs
- ProxyAttribute.cs
- Merger.cs
- basecomparevalidator.cs
- SslStream.cs
- SearchForVirtualItemEventArgs.cs
- FileStream.cs
- WebPartVerbCollection.cs
- SiteMapNode.cs
- Descriptor.cs
- TransformConverter.cs
- RandomNumberGenerator.cs
- KnownBoxes.cs
- ResourceAttributes.cs
- PreloadedPackages.cs
- GridViewColumnCollectionChangedEventArgs.cs
- SqlDependency.cs
- EdmError.cs
- Schema.cs
- GetTokenRequest.cs
- DataObjectEventArgs.cs
- XMLDiffLoader.cs
- InvokeWebService.cs
- SqlUtil.cs
- TreeNode.cs
- UpdateCommandGenerator.cs
- SchemaImporter.cs