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
- MouseGestureValueSerializer.cs
- Maps.cs
- DataGridPagingPage.cs
- LocatorPart.cs
- WebPart.cs
- SHA1CryptoServiceProvider.cs
- WindowsFormsHostAutomationPeer.cs
- TextServicesManager.cs
- FileDialog_Vista.cs
- XhtmlMobileTextWriter.cs
- LicenseException.cs
- ActivityTypeDesigner.xaml.cs
- CharUnicodeInfo.cs
- DesignTimeTemplateParser.cs
- SendMailErrorEventArgs.cs
- TemplateBaseAction.cs
- MetaModel.cs
- Exceptions.cs
- CqlErrorHelper.cs
- _DisconnectOverlappedAsyncResult.cs
- IPEndPoint.cs
- LocalValueEnumerator.cs
- OperationPickerDialog.designer.cs
- PropertyBuilder.cs
- XmlPreloadedResolver.cs
- dsa.cs
- ProxyGenerator.cs
- DataPager.cs
- Messages.cs
- IdnMapping.cs
- XmlDocument.cs
- QilStrConcatenator.cs
- DesignerObjectListAdapter.cs
- ManagementInstaller.cs
- OleServicesContext.cs
- XmlDataSource.cs
- FixedSOMImage.cs
- SymmetricCryptoHandle.cs
- PropertyValueUIItem.cs
- DynamicDiscoveryDocument.cs
- webproxy.cs
- PointCollectionConverter.cs
- SchemaMerger.cs
- XmlAutoDetectWriter.cs
- UserNamePasswordValidationMode.cs
- BitmapCacheBrush.cs
- RenderOptions.cs
- DocumentXmlWriter.cs
- ReceiveDesigner.xaml.cs
- ComboBoxItem.cs
- HeaderCollection.cs
- DesignerSerializationOptionsAttribute.cs
- XmlHierarchyData.cs
- AlignmentXValidation.cs
- ImageDrawing.cs
- TextDocumentView.cs
- TableLayout.cs
- PopupRootAutomationPeer.cs
- EmptyReadOnlyDictionaryInternal.cs
- PinnedBufferMemoryStream.cs
- ResourceAssociationType.cs
- FixedDocumentSequencePaginator.cs
- ErrorStyle.cs
- ObjectDataSourceDisposingEventArgs.cs
- ManagementException.cs
- TableRow.cs
- SmtpSpecifiedPickupDirectoryElement.cs
- ToolboxComponentsCreatedEventArgs.cs
- ConfigurationElementProperty.cs
- CancelEventArgs.cs
- NumberFormatInfo.cs
- IPHostEntry.cs
- ASCIIEncoding.cs
- ContractType.cs
- DirectoryInfo.cs
- DateTime.cs
- MatchSingleFxEngineOpcode.cs
- InvalidEnumArgumentException.cs
- FuncTypeConverter.cs
- OdbcConnectionOpen.cs
- OleDbException.cs
- CreateUserWizardStep.cs
- BindingsCollection.cs
- Matrix3DStack.cs
- SqlNotificationEventArgs.cs
- StyleCollection.cs
- WarningException.cs
- ToolStripTextBox.cs
- Renderer.cs
- SoundPlayerAction.cs
- XmlSchemaDatatype.cs
- BamlLocalizationDictionary.cs
- DefaultTextStore.cs
- DummyDataSource.cs
- ThicknessAnimationBase.cs
- NodeInfo.cs
- RoutedEventArgs.cs
- EnumerableValidator.cs
- WebScriptEnablingElement.cs
- ArrayWithOffset.cs