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
- XmlRootAttribute.cs
- Types.cs
- SchemaSetCompiler.cs
- XmlCompatibilityReader.cs
- EntityTemplateUserControl.cs
- XPathScanner.cs
- CallbackValidator.cs
- Page.cs
- XmlSchemaComplexContent.cs
- StreamInfo.cs
- GiveFeedbackEventArgs.cs
- MLangCodePageEncoding.cs
- ClientConfigurationSystem.cs
- ConfigUtil.cs
- SspiWrapper.cs
- EndEvent.cs
- SingleKeyFrameCollection.cs
- _ConnectionGroup.cs
- BulletedList.cs
- GestureRecognizer.cs
- SearchForVirtualItemEventArgs.cs
- RuleConditionDialog.cs
- ParseChildrenAsPropertiesAttribute.cs
- LinqMaximalSubtreeNominator.cs
- HasCopySemanticsAttribute.cs
- ProfessionalColors.cs
- XmlHierarchyData.cs
- RequestQueue.cs
- CodeCatchClauseCollection.cs
- shaperfactory.cs
- HttpHandlerActionCollection.cs
- UIElementParagraph.cs
- RuntimeWrappedException.cs
- XmlTextReaderImpl.cs
- MenuBindingsEditorForm.cs
- String.cs
- PrintPageEvent.cs
- RelationalExpressions.cs
- JoinCqlBlock.cs
- CollectionBase.cs
- ToolStripRendererSwitcher.cs
- RegexGroupCollection.cs
- IpcClientManager.cs
- XmlSerializerNamespaces.cs
- CodeTypeDeclaration.cs
- TextFormatter.cs
- Stacktrace.cs
- NumberFunctions.cs
- Exception.cs
- AutomationIdentifierGuids.cs
- UIElementCollection.cs
- ArithmeticException.cs
- RandomNumberGenerator.cs
- ModelItemKeyValuePair.cs
- PrimitiveType.cs
- WebPartDescriptionCollection.cs
- IgnoreSection.cs
- ToolStripOverflow.cs
- _FixedSizeReader.cs
- StrokeIntersection.cs
- SetterBaseCollection.cs
- SafeNativeMethods.cs
- InstanceView.cs
- ControlType.cs
- EntityViewContainer.cs
- MultipleViewPattern.cs
- ErrorLog.cs
- EntityDataSourceColumn.cs
- ComponentCodeDomSerializer.cs
- StreamWriter.cs
- DataShape.cs
- HelpProvider.cs
- XPathItem.cs
- SynchronizedDispatch.cs
- IndependentAnimationStorage.cs
- TextTreeUndoUnit.cs
- FileFormatException.cs
- UpDownEvent.cs
- ConfigXmlSignificantWhitespace.cs
- PolicyLevel.cs
- DesignSurfaceServiceContainer.cs
- Dictionary.cs
- CaseInsensitiveComparer.cs
- CodeTypeDelegate.cs
- ExpressionBindingsDialog.cs
- XmlUTF8TextWriter.cs
- Internal.cs
- ResXResourceReader.cs
- RightsManagementEncryptionTransform.cs
- AssemblyAssociatedContentFileAttribute.cs
- MailAddressParser.cs
- IisTraceListener.cs
- EntityDataSourceWrapperCollection.cs
- SkipStoryboardToFill.cs
- WindowsFormsHelpers.cs
- Hex.cs
- DeferredReference.cs
- XPathNodeIterator.cs
- XmlUtil.cs
- TokenBasedSetEnumerator.cs