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
- WsdlServiceChannelBuilder.cs
- MetadataFile.cs
- CommandLibraryHelper.cs
- SyndicationSerializer.cs
- TCEAdapterGenerator.cs
- EventEntry.cs
- OracleMonthSpan.cs
- ListViewContainer.cs
- ScopelessEnumAttribute.cs
- SamlAssertion.cs
- DesignerEditorPartChrome.cs
- PrinterSettings.cs
- SqlDataReaderSmi.cs
- ColorBlend.cs
- SafeMILHandle.cs
- InsufficientMemoryException.cs
- SystemIPv6InterfaceProperties.cs
- SiteMap.cs
- OletxDependentTransaction.cs
- RadioButtonAutomationPeer.cs
- EventlogProvider.cs
- QueueProcessor.cs
- Emitter.cs
- PropertyEntry.cs
- AutoGeneratedField.cs
- Rect3D.cs
- FlowDocumentScrollViewerAutomationPeer.cs
- EntityDesignerDataSourceView.cs
- KeyTimeConverter.cs
- XmlDictionaryReaderQuotas.cs
- IItemProperties.cs
- EncryptedData.cs
- WebPartConnectionCollection.cs
- ClientType.cs
- AssemblyUtil.cs
- BufferedMessageWriter.cs
- CodeSnippetStatement.cs
- FragmentQueryProcessor.cs
- HttpCapabilitiesEvaluator.cs
- TableCellAutomationPeer.cs
- ZipPackage.cs
- DataGridViewSelectedCellsAccessibleObject.cs
- Latin1Encoding.cs
- RijndaelManagedTransform.cs
- DataServiceQueryException.cs
- Library.cs
- DataGridTableCollection.cs
- ImageClickEventArgs.cs
- ButtonBaseAdapter.cs
- TextTreeText.cs
- InfoCardRequestException.cs
- SerializationObjectManager.cs
- SqlDataSourceConfigureFilterForm.cs
- DesignerSerializationOptionsAttribute.cs
- SchemaImporterExtension.cs
- FilterableAttribute.cs
- SafeTokenHandle.cs
- WindowsUserNameSecurityTokenAuthenticator.cs
- TextTreeTextBlock.cs
- Pair.cs
- ContentPlaceHolderDesigner.cs
- FastEncoderWindow.cs
- RequiredFieldValidator.cs
- HtmlInputText.cs
- WebResourceAttribute.cs
- TargetInvocationException.cs
- CollectionChangeEventArgs.cs
- GuidConverter.cs
- XPathNodeList.cs
- GorillaCodec.cs
- UnmanagedMemoryStream.cs
- BooleanExpr.cs
- RawMouseInputReport.cs
- AsyncSerializedWorker.cs
- MD5Cng.cs
- ToolStripSplitStackLayout.cs
- CompiledRegexRunner.cs
- Translator.cs
- InteropEnvironment.cs
- Logging.cs
- TemporaryBitmapFile.cs
- MsmqAppDomainProtocolHandler.cs
- XsltContext.cs
- TextParentUndoUnit.cs
- DiagnosticTraceSource.cs
- RawStylusInputReport.cs
- DataGridPagerStyle.cs
- OlePropertyStructs.cs
- Library.cs
- RichTextBoxAutomationPeer.cs
- SaveRecipientRequest.cs
- Point3DCollectionConverter.cs
- DataGridViewIntLinkedList.cs
- CustomValidator.cs
- Range.cs
- propertyentry.cs
- MetadataSource.cs
- TemplateAction.cs
- DefaultBindingPropertyAttribute.cs
- DataObjectMethodAttribute.cs