Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / clr / src / BCL / Microsoft / Win32 / SafeHandles / SafeViewOfFileHandle.cs / 1305376 / SafeViewOfFileHandle.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; using Microsoft.Win32; using Microsoft.Win32.SafeHandles; namespace Microsoft.Win32.SafeHandles { [System.Security.SecurityCritical] // auto-generated internal sealed class SafeViewOfFileHandle : SafeHandleZeroOrMinusOneIsInvalid { [System.Security.SecurityCritical] // auto-generated_required internal SafeViewOfFileHandle() : base(true) {} // 0 is an Invalid Handle [System.Security.SecurityCritical] // auto-generated_required internal SafeViewOfFileHandle(IntPtr handle, bool ownsHandle) : base (ownsHandle) { SetHandle(handle); } [System.Security.SecurityCritical] [ResourceExposure(ResourceScope.Machine)] [ResourceConsumption(ResourceScope.Machine)] override protected bool ReleaseHandle() { if (Win32Native.UnmapViewOfFile(handle)) { handle = IntPtr.Zero; return true; } return false; } } } // 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
- InkCanvasFeedbackAdorner.cs
- StrokeNode.cs
- AttachedAnnotation.cs
- HtmlTable.cs
- ResXDataNode.cs
- Update.cs
- ConnectivityStatus.cs
- RuntimeResourceSet.cs
- GroupBox.cs
- AddressAlreadyInUseException.cs
- TearOffProxy.cs
- ActivatedMessageQueue.cs
- LazyLoadBehavior.cs
- SecureStringHasher.cs
- PackageDigitalSignatureManager.cs
- FunctionQuery.cs
- HwndAppCommandInputProvider.cs
- BrowserCapabilitiesFactoryBase.cs
- ResourceFallbackManager.cs
- Light.cs
- StringSource.cs
- StreamSecurityUpgradeInitiatorAsyncResult.cs
- CompatibleIComparer.cs
- XmlElement.cs
- OracleTimeSpan.cs
- IconHelper.cs
- GreenMethods.cs
- ImageDrawing.cs
- RequestSecurityTokenForRemoteTokenFactory.cs
- IItemProperties.cs
- ResourceReferenceExpressionConverter.cs
- TextTreeUndoUnit.cs
- Reference.cs
- ClientTargetSection.cs
- WebDisplayNameAttribute.cs
- PartBasedPackageProperties.cs
- ColumnResizeUndoUnit.cs
- StatusBarPanel.cs
- OracleMonthSpan.cs
- _SingleItemRequestCache.cs
- CrossAppDomainChannel.cs
- LookupNode.cs
- DataGridViewComboBoxCell.cs
- _AutoWebProxyScriptHelper.cs
- HtmlInputPassword.cs
- ValueChangedEventManager.cs
- LoginAutoFormat.cs
- ContentControl.cs
- SchemaImporterExtensionElement.cs
- BidOverLoads.cs
- RadioButtonPopupAdapter.cs
- TranslateTransform.cs
- ThreadLocal.cs
- TableItemStyle.cs
- SignatureTargetIdManager.cs
- LoadedOrUnloadedOperation.cs
- TypeDependencyAttribute.cs
- shaper.cs
- DialogResultConverter.cs
- PopupEventArgs.cs
- ElementHost.cs
- UnmanagedBitmapWrapper.cs
- JavaScriptString.cs
- SevenBitStream.cs
- SqlParameterizer.cs
- PersonalizationStateQuery.cs
- Pair.cs
- UIElementParagraph.cs
- XmlSchemaType.cs
- QueryCacheKey.cs
- IDispatchConstantAttribute.cs
- GiveFeedbackEventArgs.cs
- RectangleF.cs
- NominalTypeEliminator.cs
- SettingsPropertyWrongTypeException.cs
- StylusLogic.cs
- QuotedStringFormatReader.cs
- FixedTextSelectionProcessor.cs
- WebPartZoneCollection.cs
- CompositionDesigner.cs
- CodeAttachEventStatement.cs
- ChtmlSelectionListAdapter.cs
- PathSegmentCollection.cs
- XmlSchemaAny.cs
- SHA384Managed.cs
- Membership.cs
- EventMappingSettingsCollection.cs
- GeneratedCodeAttribute.cs
- OleDbConnectionInternal.cs
- ObjectStorage.cs
- UInt32Storage.cs
- XmlDocumentSchema.cs
- AssemblyBuilder.cs
- AdPostCacheSubstitution.cs
- CaretElement.cs
- ExpressionParser.cs
- ErrorHandlerFaultInfo.cs
- FixedBufferAttribute.cs
- XDRSchema.cs
- DeploymentSection.cs