Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / clr / src / BCL / Microsoft / Win32 / SafeHandles / SafePEFileHandle.cs / 1 / SafePEFileHandle.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== /*============================================================ ** ** Class: SafePEFileHandle ** ** ** A wrapper for pefile pointers ** ** ===========================================================*/ using System; using System.Security; using System.Security.Permissions; using System.Runtime.InteropServices; using System.Runtime.CompilerServices; using System.Runtime.ConstrainedExecution; using Microsoft.Win32; namespace Microsoft.Win32.SafeHandles { internal sealed class SafePEFileHandle: SafeHandleZeroOrMinusOneIsInvalid { // 0 is an Invalid Handle private SafePEFileHandle(IntPtr handle) : base (true) { SetHandle(handle); } internal static SafePEFileHandle InvalidHandle { get { return new SafePEFileHandle(IntPtr.Zero); } } override protected bool ReleaseHandle() { #if !FEATURE_PAL System.Security.Policy.Hash._ReleasePEFile(handle); #endif return true; } } }
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DesignerDataTableBase.cs
- OrderedParallelQuery.cs
- WizardForm.cs
- RenameRuleObjectDialog.Designer.cs
- ManagedFilter.cs
- ReceiveErrorHandling.cs
- FixedPage.cs
- SimpleMailWebEventProvider.cs
- SQLBytes.cs
- RuntimeConfigLKG.cs
- PartManifestEntry.cs
- CryptoApi.cs
- SkinBuilder.cs
- FloaterBaseParagraph.cs
- CompatibleComparer.cs
- WarningException.cs
- AspNetSynchronizationContext.cs
- BindingBase.cs
- SmtpClient.cs
- StylusPoint.cs
- HtmlUtf8RawTextWriter.cs
- XmlDataSourceNodeDescriptor.cs
- CompositeTypefaceMetrics.cs
- followingquery.cs
- Registry.cs
- DataTableMapping.cs
- Int32KeyFrameCollection.cs
- TileBrush.cs
- SplashScreen.cs
- BCLDebug.cs
- CompressStream.cs
- XmlWellformedWriter.cs
- EarlyBoundInfo.cs
- ProfilePropertySettings.cs
- Expressions.cs
- AuthenticationConfig.cs
- CalendarSelectionChangedEventArgs.cs
- BitmapMetadata.cs
- DocumentApplicationJournalEntryEventArgs.cs
- ObjectItemAttributeAssemblyLoader.cs
- VirtualDirectoryMapping.cs
- OperationInvokerBehavior.cs
- AxHostDesigner.cs
- TableRowCollection.cs
- MaxMessageSizeStream.cs
- ZipIOExtraFieldElement.cs
- PageParserFilter.cs
- GridLength.cs
- FontStyles.cs
- PerspectiveCamera.cs
- MultiSelector.cs
- BindingNavigator.cs
- Helper.cs
- PermissionSetEnumerator.cs
- Timer.cs
- ImageCodecInfoPrivate.cs
- MetadataPropertyvalue.cs
- SecurityCriticalDataForSet.cs
- TextEditorMouse.cs
- SQLResource.cs
- XmlEntityReference.cs
- LookupBindingPropertiesAttribute.cs
- Parameter.cs
- GridViewRowCollection.cs
- MetadataSerializer.cs
- BufferedReadStream.cs
- DataGridViewCellMouseEventArgs.cs
- TimelineGroup.cs
- HashHelper.cs
- HttpFormatExtensions.cs
- entitydatasourceentitysetnameconverter.cs
- Inflater.cs
- RectAnimationBase.cs
- SupportsEventValidationAttribute.cs
- ToolStripInSituService.cs
- DesignerObjectListAdapter.cs
- ToolStripAdornerWindowService.cs
- WebFormsRootDesigner.cs
- HuffmanTree.cs
- UdpTransportSettingsElement.cs
- Literal.cs
- Stopwatch.cs
- CodeTypeReferenceCollection.cs
- EncryptedPackage.cs
- CssClassPropertyAttribute.cs
- RijndaelCryptoServiceProvider.cs
- EnumType.cs
- EnumerableRowCollection.cs
- HitTestResult.cs
- DeviceContext2.cs
- ThousandthOfEmRealPoints.cs
- HttpApplication.cs
- HtmlTextArea.cs
- NavigationProperty.cs
- IdentityHolder.cs
- ApplicationProxyInternal.cs
- WindowsScrollBar.cs
- TakeOrSkipQueryOperator.cs
- TrackingMemoryStreamFactory.cs
- SamlAssertion.cs