Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / Hosting / ProcessHostFactoryHelper.cs / 1305376 / ProcessHostFactoryHelper.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.Web.Hosting {
using System;
using System.Collections;
using System.Configuration;
using System.Runtime.InteropServices;
using System.Security.Permissions;
using System.Web;
using System.Web.Configuration;
using System.Web.Util;
[ComImport, Guid("02fd465d-5c5d-4b7e-95b6-82faa031b74a"), InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIUnknown)]
public interface IProcessHostFactoryHelper {
#if FEATURE_PAL // FEATURE_PAL does not enable COM
[return: MarshalAs(UnmanagedType.Error)]
#else // FEATURE_PAL
[return: MarshalAs(UnmanagedType.Interface)]
#endif // FEATURE_PAL
Object GetProcessHost(IProcessHostSupportFunctions functions);
}
public sealed class ProcessHostFactoryHelper : MarshalByRefObject, IProcessHostFactoryHelper {
public ProcessHostFactoryHelper() {
}
[SecurityPermissionAttribute(SecurityAction.LinkDemand, Flags=SecurityPermissionFlag.Infrastructure)]
public override Object InitializeLifetimeService() {
return null; // never expire lease
}
public Object GetProcessHost(IProcessHostSupportFunctions functions) {
try {
return ProcessHost.GetProcessHost(functions);
}
catch(Exception e) {
Misc.ReportUnhandledException(e, new string[] {SR.GetString(SR.Cant_Create_Process_Host)});
throw;
}
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.Web.Hosting {
using System;
using System.Collections;
using System.Configuration;
using System.Runtime.InteropServices;
using System.Security.Permissions;
using System.Web;
using System.Web.Configuration;
using System.Web.Util;
[ComImport, Guid("02fd465d-5c5d-4b7e-95b6-82faa031b74a"), InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIUnknown)]
public interface IProcessHostFactoryHelper {
#if FEATURE_PAL // FEATURE_PAL does not enable COM
[return: MarshalAs(UnmanagedType.Error)]
#else // FEATURE_PAL
[return: MarshalAs(UnmanagedType.Interface)]
#endif // FEATURE_PAL
Object GetProcessHost(IProcessHostSupportFunctions functions);
}
public sealed class ProcessHostFactoryHelper : MarshalByRefObject, IProcessHostFactoryHelper {
public ProcessHostFactoryHelper() {
}
[SecurityPermissionAttribute(SecurityAction.LinkDemand, Flags=SecurityPermissionFlag.Infrastructure)]
public override Object InitializeLifetimeService() {
return null; // never expire lease
}
public Object GetProcessHost(IProcessHostSupportFunctions functions) {
try {
return ProcessHost.GetProcessHost(functions);
}
catch(Exception e) {
Misc.ReportUnhandledException(e, new string[] {SR.GetString(SR.Cant_Create_Process_Host)});
throw;
}
}
}
}
// 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
- TreePrinter.cs
- SrgsItemList.cs
- ValuePatternIdentifiers.cs
- TextRangeProviderWrapper.cs
- MediaEntryAttribute.cs
- NativeWindow.cs
- DetailsViewRowCollection.cs
- ColorConvertedBitmap.cs
- OracleParameter.cs
- StylusPlugin.cs
- ProcessRequestArgs.cs
- CompositeCollectionView.cs
- PluggableProtocol.cs
- HeaderedContentControl.cs
- Documentation.cs
- SchemaImporterExtensionElementCollection.cs
- ForceCopyBuildProvider.cs
- SchemaHelper.cs
- SystemColors.cs
- XmlArrayAttribute.cs
- GridViewUpdateEventArgs.cs
- StickyNoteHelper.cs
- GeneralTransform2DTo3DTo2D.cs
- EventProviderTraceListener.cs
- RecordManager.cs
- ItemChangedEventArgs.cs
- ClipboardData.cs
- Screen.cs
- OdbcParameterCollection.cs
- Win32.cs
- TemplatedEditableDesignerRegion.cs
- XmlExpressionDumper.cs
- BookmarkTable.cs
- XmlCharType.cs
- TextDecoration.cs
- FtpWebRequest.cs
- TimeSpanMinutesConverter.cs
- PermissionSet.cs
- XmlAttributes.cs
- x509utils.cs
- TeredoHelper.cs
- IsolatedStorageFileStream.cs
- Comparer.cs
- ScaleTransform3D.cs
- DataGridBoundColumn.cs
- FormView.cs
- Cursors.cs
- ItemMap.cs
- BevelBitmapEffect.cs
- ReadWriteObjectLock.cs
- DependencySource.cs
- XmlIlGenerator.cs
- PaginationProgressEventArgs.cs
- PersonalizationProviderCollection.cs
- AnimationTimeline.cs
- PropVariant.cs
- CompressEmulationStream.cs
- XmlSchemaType.cs
- WorkflowInstanceExtensionManager.cs
- ToolStripRenderEventArgs.cs
- AccessDataSourceWizardForm.cs
- BadImageFormatException.cs
- ConfigurationSectionGroup.cs
- LineServices.cs
- X509ChainPolicy.cs
- MSAAEventDispatcher.cs
- TextBox.cs
- NetDataContractSerializer.cs
- ReferentialConstraint.cs
- DataGridViewImageCell.cs
- AnimationStorage.cs
- TextRangeProviderWrapper.cs
- XmlText.cs
- Query.cs
- PropertySet.cs
- TCEAdapterGenerator.cs
- CategoryValueConverter.cs
- GlobalizationSection.cs
- LinqDataSource.cs
- XmlSequenceWriter.cs
- KerberosSecurityTokenAuthenticator.cs
- DoWorkEventArgs.cs
- Merger.cs
- CookielessHelper.cs
- Transform3DCollection.cs
- FileDialog_Vista_Interop.cs
- ObjectToModelValueConverter.cs
- ResizingMessageFilter.cs
- SiteMapNodeItemEventArgs.cs
- XD.cs
- XmlRawWriter.cs
- PagesChangedEventArgs.cs
- BorderGapMaskConverter.cs
- _ScatterGatherBuffers.cs
- CurrentChangingEventManager.cs
- XmlILAnnotation.cs
- GradientBrush.cs
- RepeatButton.cs
- CorePropertiesFilter.cs
- XmlCharCheckingWriter.cs