Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / clr / src / BCL / System / Runtime / Remoting / EnterpriseServicesHelper.cs / 1305376 / 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 \\ //---------------------------------------------------------\\ //----------------------------------------------------------\\ [System.Security.SecurityCritical] // auto-generated_required [System.Runtime.InteropServices.ComVisible(true)] public sealed class EnterpriseServicesHelper { [System.Security.SecurityCritical] // auto-generated_required 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; } [System.Security.SecurityCritical] // auto-generated_required 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. // // ==--== /*============================================================ ** ** 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 \\ //---------------------------------------------------------\\ //----------------------------------------------------------\\ [System.Security.SecurityCritical] // auto-generated_required [System.Runtime.InteropServices.ComVisible(true)] public sealed class EnterpriseServicesHelper { [System.Security.SecurityCritical] // auto-generated_required 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; } [System.Security.SecurityCritical] // auto-generated_required 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ReadWriteObjectLock.cs
- MouseEvent.cs
- NativeMethods.cs
- PagedControl.cs
- HasCopySemanticsAttribute.cs
- EnumBuilder.cs
- WebPartConnectVerb.cs
- EmbeddedMailObject.cs
- BamlBinaryWriter.cs
- OleDbRowUpdatedEvent.cs
- RequiredFieldValidator.cs
- ErasingStroke.cs
- PathSegmentCollection.cs
- StreamProxy.cs
- AttributeCollection.cs
- CreateRefExpr.cs
- AutomationPeer.cs
- ObjectFullSpanRewriter.cs
- XmlSchemaGroupRef.cs
- GraphicsPathIterator.cs
- ThicknessKeyFrameCollection.cs
- HtmlAnchor.cs
- TaskExceptionHolder.cs
- DataColumnCollection.cs
- TrackingStringDictionary.cs
- StickyNoteAnnotations.cs
- WindowsAuthenticationModule.cs
- SelectionListComponentEditor.cs
- connectionpool.cs
- SmiMetaData.cs
- StylusButtonEventArgs.cs
- FixedSOMGroup.cs
- AllMembershipCondition.cs
- CompilationSection.cs
- CompiledXpathExpr.cs
- SqlDataSourceFilteringEventArgs.cs
- EdmToObjectNamespaceMap.cs
- MailSettingsSection.cs
- OleDbError.cs
- SafeLibraryHandle.cs
- IisNotInstalledException.cs
- PtsHost.cs
- PasswordTextNavigator.cs
- SiteMapProvider.cs
- Comparer.cs
- FigureHelper.cs
- FocusWithinProperty.cs
- DummyDataSource.cs
- NamedPermissionSet.cs
- RecipientInfo.cs
- ProfileGroupSettings.cs
- SoapEnumAttribute.cs
- OperatingSystemVersionCheck.cs
- HttpResponseHeader.cs
- OdbcUtils.cs
- LogArchiveSnapshot.cs
- FontEmbeddingManager.cs
- ReadOnlyPropertyMetadata.cs
- CompilerResults.cs
- Opcode.cs
- QueueProcessor.cs
- ConnectivityStatus.cs
- DataTableExtensions.cs
- CharacterMetricsDictionary.cs
- _KerberosClient.cs
- _HeaderInfoTable.cs
- Optimizer.cs
- MatrixKeyFrameCollection.cs
- DispatcherExceptionFilterEventArgs.cs
- TrailingSpaceComparer.cs
- ObjectConverter.cs
- XamlStream.cs
- FixedDSBuilder.cs
- _LocalDataStoreMgr.cs
- NullToBooleanConverter.cs
- XmlConverter.cs
- ISAPIWorkerRequest.cs
- TraceInternal.cs
- DoubleAnimation.cs
- TabItem.cs
- SystemWebSectionGroup.cs
- SystemIPGlobalProperties.cs
- LocalValueEnumerator.cs
- ColorBuilder.cs
- LogEntry.cs
- DataControlFieldCell.cs
- OperationDescription.cs
- RangeValidator.cs
- HttpPostLocalhostServerProtocol.cs
- FlowLayout.cs
- FlowSwitchDesigner.xaml.cs
- KeyPressEvent.cs
- OleStrCAMarshaler.cs
- IDispatchConstantAttribute.cs
- TextBoxLine.cs
- NotFiniteNumberException.cs
- XmlDesigner.cs
- LookupNode.cs
- ExtensibleClassFactory.cs
- DbXmlEnabledProviderManifest.cs