Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / untmp / whidbey / QFE / ndp / clr / src / BCL / Microsoft / Win32 / SafeHandles / SafeFileMappingHandle.cs / 1 / SafeFileMappingHandle.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== /*============================================================ ** ** Class: SafeViewOfFileHandle ** ** ** A wrapper for file handles ** ** ===========================================================*/ using System; using System.Security; using System.Security.Permissions; using System.Runtime.InteropServices; using System.Runtime.CompilerServices; using System.Runtime.ConstrainedExecution; using System.Runtime.Versioning; namespace Microsoft.Win32.SafeHandles { internal sealed class SafeFileMappingHandle : SafeHandleZeroOrMinusOneIsInvalid { [SecurityPermission(SecurityAction.LinkDemand, UnmanagedCode=true)] internal SafeFileMappingHandle() : base(true) {} // 0 is an Invalid Handle [SecurityPermission(SecurityAction.LinkDemand, UnmanagedCode=true)] internal SafeFileMappingHandle(IntPtr handle, bool ownsHandle) : base (ownsHandle) { SetHandle(handle); } [ResourceExposure(ResourceScope.Machine)] [ResourceConsumption(ResourceScope.Machine)] override protected bool ReleaseHandle() { return Win32Native.CloseHandle(handle); } } } // 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
- Parameter.cs
- StringExpressionSet.cs
- RawStylusInput.cs
- _SSPISessionCache.cs
- _NegotiateClient.cs
- DiffuseMaterial.cs
- DataComponentGenerator.cs
- DefaultParameterValueAttribute.cs
- GridViewCancelEditEventArgs.cs
- TrackingQueryElement.cs
- SoapInteropTypes.cs
- CodeArgumentReferenceExpression.cs
- HttpRuntimeSection.cs
- OrderablePartitioner.cs
- EditorPartChrome.cs
- EventProviderWriter.cs
- DrawingContextWalker.cs
- ButtonRenderer.cs
- DbConnectionPoolGroup.cs
- CreateUserErrorEventArgs.cs
- CqlErrorHelper.cs
- ListItemParagraph.cs
- ReadOnlyDictionary.cs
- BulletDecorator.cs
- Misc.cs
- AuthenticationManager.cs
- keycontainerpermission.cs
- Stylesheet.cs
- XmlBoundElement.cs
- DataGridViewCellMouseEventArgs.cs
- SqlFacetAttribute.cs
- DependencyPropertyConverter.cs
- RowTypeElement.cs
- AccessedThroughPropertyAttribute.cs
- CommandField.cs
- DataGridViewRowConverter.cs
- InternalRelationshipCollection.cs
- HMACRIPEMD160.cs
- PrinterResolution.cs
- BasicExpandProvider.cs
- XmlSchemaSimpleContentRestriction.cs
- CompModSwitches.cs
- EventArgs.cs
- BrowserDefinition.cs
- UniqueEventHelper.cs
- PersonalizablePropertyEntry.cs
- PointCollection.cs
- XPathSingletonIterator.cs
- PrintDocument.cs
- TypeConstant.cs
- CertificateManager.cs
- CompilerGlobalScopeAttribute.cs
- PathData.cs
- CounterSample.cs
- EventDescriptorCollection.cs
- XPathPatternParser.cs
- RightsManagementLicense.cs
- ElementAction.cs
- StylusCaptureWithinProperty.cs
- ManipulationDelta.cs
- DataMemberFieldConverter.cs
- CqlIdentifiers.cs
- SafeCryptoHandles.cs
- MonitorWrapper.cs
- ErrorProvider.cs
- DecimalConverter.cs
- XmlSchemaSequence.cs
- handlecollector.cs
- WorkflowElementDialog.cs
- BasicCellRelation.cs
- StructureChangedEventArgs.cs
- PointCollection.cs
- UIElementIsland.cs
- DefaultPrintController.cs
- XmlSchemaIdentityConstraint.cs
- Route.cs
- InternalResources.cs
- ProtocolInformationReader.cs
- ApplicationException.cs
- Vector3dCollection.cs
- ChangeConflicts.cs
- NativeActivityTransactionContext.cs
- SqlBinder.cs
- PropertyGeneratedEventArgs.cs
- StateWorkerRequest.cs
- Freezable.cs
- TabRenderer.cs
- TextEndOfLine.cs
- PageBuildProvider.cs
- PeerNameRecordCollection.cs
- TraceLevelHelper.cs
- XMLSyntaxException.cs
- MetadataArtifactLoaderXmlReaderWrapper.cs
- OleDbSchemaGuid.cs
- KnownBoxes.cs
- XPathBinder.cs
- PassportPrincipal.cs
- TextWriter.cs
- XslException.cs
- HtmlPageAdapter.cs