Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Core / Microsoft / Win32 / SafeHandles / SafePipeHandle.cs / 1305376 / SafePipeHandle.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== /*============================================================ ** ** Class: SafePipeHandle ** ============================================================*/ namespace Microsoft.Win32.SafeHandles { using System; using System.IO; using System.Runtime.Versioning; using System.Security.Permissions; using Microsoft.Win32.SafeHandles; //// #pragma warning disable 618 // Have not migrated to v4 transparency yet [System.Security.SecurityCritical(System.Security.SecurityCriticalScope.Everything)] #pragma warning restore 618 [SecurityPermission(SecurityAction.LinkDemand, UnmanagedCode = true)] [System.Security.Permissions.HostProtection(MayLeakOnAbort = true)] public sealed class SafePipeHandle : SafeHandleZeroOrMinusOneIsInvalid { private SafePipeHandle() : base(true) { } public SafePipeHandle(IntPtr preexistingHandle, bool ownsHandle) : base(ownsHandle) { SetHandle(preexistingHandle); } [ResourceExposure(ResourceScope.Machine)] [ResourceConsumption(ResourceScope.Machine)] protected override bool ReleaseHandle() { return UnsafeNativeMethods.CloseHandle(handle); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== /*============================================================ ** ** Class: SafePipeHandle ** ============================================================*/ namespace Microsoft.Win32.SafeHandles { using System; using System.IO; using System.Runtime.Versioning; using System.Security.Permissions; using Microsoft.Win32.SafeHandles; //// // #pragma warning disable 618 // Have not migrated to v4 transparency yet [System.Security.SecurityCritical(System.Security.SecurityCriticalScope.Everything)] #pragma warning restore 618 [SecurityPermission(SecurityAction.LinkDemand, UnmanagedCode = true)] [System.Security.Permissions.HostProtection(MayLeakOnAbort = true)] public sealed class SafePipeHandle : SafeHandleZeroOrMinusOneIsInvalid { private SafePipeHandle() : base(true) { } public SafePipeHandle(IntPtr preexistingHandle, bool ownsHandle) : base(ownsHandle) { SetHandle(preexistingHandle); } [ResourceExposure(ResourceScope.Machine)] [ResourceConsumption(ResourceScope.Machine)] protected override bool ReleaseHandle() { return UnsafeNativeMethods.CloseHandle(handle); } } } // 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
- FlagsAttribute.cs
- EndpointDiscoveryMetadata11.cs
- Random.cs
- X509ChainElement.cs
- ValidationHelpers.cs
- TreeBuilderBamlTranslator.cs
- SafeViewOfFileHandle.cs
- HtmlMeta.cs
- UInt16Storage.cs
- DSASignatureDeformatter.cs
- SectionRecord.cs
- DocumentGrid.cs
- __Filters.cs
- XmlCountingReader.cs
- XmlSchemaNotation.cs
- DataGridTableCollection.cs
- TreeBuilderBamlTranslator.cs
- CodeSnippetTypeMember.cs
- XPathMultyIterator.cs
- remotingproxy.cs
- RelationshipConstraintValidator.cs
- DecoderFallback.cs
- TargetControlTypeCache.cs
- QuaternionAnimation.cs
- HiddenField.cs
- DockAndAnchorLayout.cs
- TablePattern.cs
- AsymmetricCryptoHandle.cs
- VarRefManager.cs
- PassportAuthenticationModule.cs
- ConfigurationManagerInternalFactory.cs
- MethodBody.cs
- _PooledStream.cs
- DbQueryCommandTree.cs
- FilteredAttributeCollection.cs
- AssertSection.cs
- ReceiveCompletedEventArgs.cs
- StreamUpgradeAcceptor.cs
- ConstantProjectedSlot.cs
- CollectionType.cs
- TextEditorCharacters.cs
- XmlCharCheckingReader.cs
- ConstNode.cs
- EntityViewGenerator.cs
- ShutDownListener.cs
- HttpHandler.cs
- CroppedBitmap.cs
- CodeEntryPointMethod.cs
- HashAlgorithm.cs
- SessionEndingEventArgs.cs
- Object.cs
- CheckBoxBaseAdapter.cs
- OwnerDrawPropertyBag.cs
- NameValueFileSectionHandler.cs
- Bold.cs
- PageStatePersister.cs
- CompositeScriptReference.cs
- GetWorkflowTree.cs
- WCFModelStrings.Designer.cs
- ReferencedAssembly.cs
- AutoCompleteStringCollection.cs
- DockAndAnchorLayout.cs
- DrawingBrush.cs
- CategoryGridEntry.cs
- RichTextBox.cs
- AppSettings.cs
- _TLSstream.cs
- XmlDeclaration.cs
- ProfileParameter.cs
- RadioButtonStandardAdapter.cs
- XmlSchemaParticle.cs
- AffineTransform3D.cs
- StatusBarItem.cs
- PublisherMembershipCondition.cs
- StreamSecurityUpgradeAcceptorBase.cs
- CopyCodeAction.cs
- BitmapMetadataBlob.cs
- SystemIcmpV4Statistics.cs
- XmlC14NWriter.cs
- WebRequestModulesSection.cs
- MetaData.cs
- Border.cs
- RelationshipEntry.cs
- RuntimeResourceSet.cs
- XPathMultyIterator.cs
- MenuDesigner.cs
- NameNode.cs
- SessionViewState.cs
- FileDialog.cs
- ClientConfigurationSystem.cs
- ScrollChrome.cs
- SqlConnectionPoolGroupProviderInfo.cs
- DbCommandTree.cs
- IntegerValidator.cs
- PrintPreviewDialog.cs
- OleStrCAMarshaler.cs
- OleDbConnectionFactory.cs
- ImmutablePropertyDescriptorGridEntry.cs
- HelpEvent.cs
- Privilege.cs