Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // ==++== // // 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; } } } // 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
- _Events.cs
- TypeInfo.cs
- DataGridTableCollection.cs
- TripleDES.cs
- ButtonFieldBase.cs
- InstanceCompleteException.cs
- TimeZone.cs
- Roles.cs
- TypeUsageBuilder.cs
- EasingQuaternionKeyFrame.cs
- SqlNode.cs
- ListBoxItemAutomationPeer.cs
- PersonalizationEntry.cs
- DataBoundControlHelper.cs
- ImageCodecInfoPrivate.cs
- DataSet.cs
- VScrollProperties.cs
- ToolStripItemCollection.cs
- FrameSecurityDescriptor.cs
- IntSecurity.cs
- Quaternion.cs
- FormClosedEvent.cs
- TargetException.cs
- FrameworkElement.cs
- RemoteWebConfigurationHostServer.cs
- ContractTypeNameElement.cs
- Library.cs
- TypographyProperties.cs
- DataGridViewButtonColumn.cs
- ExpressionWriter.cs
- RectKeyFrameCollection.cs
- COM2PropertyDescriptor.cs
- OleDbParameter.cs
- BuildDependencySet.cs
- StrongNameSignatureInformation.cs
- GlyphsSerializer.cs
- ProtocolState.cs
- TextTreeRootNode.cs
- Point4D.cs
- XmlSchemaChoice.cs
- DtrList.cs
- CodeTypeDelegate.cs
- CellNormalizer.cs
- UnconditionalPolicy.cs
- ClientSideQueueItem.cs
- OTFRasterizer.cs
- DodSequenceMerge.cs
- OdbcEnvironmentHandle.cs
- oledbmetadatacollectionnames.cs
- DependencyObjectType.cs
- DesignerTransactionCloseEvent.cs
- DataGridViewBand.cs
- GridViewDeletedEventArgs.cs
- ModelTreeEnumerator.cs
- XmlNavigatorStack.cs
- SpecialTypeDataContract.cs
- externdll.cs
- counter.cs
- DBDataPermissionAttribute.cs
- BitmapEffectRenderDataResource.cs
- DataGridColumnHeaderAutomationPeer.cs
- __ComObject.cs
- SourceChangedEventArgs.cs
- ExpressionEditorAttribute.cs
- PrintPageEvent.cs
- MenuItemCollection.cs
- WindowsFont.cs
- OneWayChannelListener.cs
- SpAudioStreamWrapper.cs
- MobileRedirect.cs
- httpstaticobjectscollection.cs
- SeverityFilter.cs
- WebPartCatalogAddVerb.cs
- URI.cs
- ClientRoleProvider.cs
- Timer.cs
- ResXResourceReader.cs
- SecureUICommand.cs
- LinkLabel.cs
- AutomationPeer.cs
- DependencyProperty.cs
- GraphicsPath.cs
- SystemFonts.cs
- BufferedWebEventProvider.cs
- CellConstantDomain.cs
- EntityCommandCompilationException.cs
- OpenTypeCommon.cs
- SettingsPropertyWrongTypeException.cs
- ZipIOExtraFieldPaddingElement.cs
- DesignerAttribute.cs
- EpmCustomContentDeSerializer.cs
- SymbolEqualComparer.cs
- DataGridViewImageColumn.cs
- ZipIOZip64EndOfCentralDirectoryBlock.cs
- SafeEventLogWriteHandle.cs
- Descriptor.cs
- WCFServiceClientProxyGenerator.cs
- DataProtection.cs
- StreamInfo.cs
- HttpCachePolicy.cs