Code:
/ FX-1434 / FX-1434 / 1.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
- OverflowException.cs
- StringUtil.cs
- ReferentialConstraint.cs
- Connector.cs
- KeyPressEvent.cs
- DesignerActionHeaderItem.cs
- ProtectedProviderSettings.cs
- AssemblyBuilderData.cs
- WindowsSecurityTokenAuthenticator.cs
- Html32TextWriter.cs
- SafeTokenHandle.cs
- ListItemCollection.cs
- AuthorizationRule.cs
- TypographyProperties.cs
- AssemblyResourceLoader.cs
- NativeRecognizer.cs
- AmbientLight.cs
- MimeFormatExtensions.cs
- SwitchCase.cs
- DocumentSchemaValidator.cs
- XamlReaderConstants.cs
- EventHandlerList.cs
- CustomErrorsSection.cs
- NativeMethods.cs
- CompoundFileStorageReference.cs
- MessageLoggingFilterTraceRecord.cs
- SecureStringHasher.cs
- ErrorLog.cs
- DescendantBaseQuery.cs
- ServiceOperationParameter.cs
- TrackingValidationObjectDictionary.cs
- COM2ComponentEditor.cs
- _BasicClient.cs
- Exceptions.cs
- Reference.cs
- RelationshipManager.cs
- SchemaAttDef.cs
- BaseContextMenu.cs
- StringWriter.cs
- DataGridColumnHeadersPresenter.cs
- SurrogateSelector.cs
- SingleConverter.cs
- HttpConfigurationSystem.cs
- DataContractSerializerMessageContractImporter.cs
- SystemUnicastIPAddressInformation.cs
- QueryResults.cs
- InvalidProgramException.cs
- UInt64.cs
- SspiNegotiationTokenAuthenticatorState.cs
- validationstate.cs
- MarkupCompiler.cs
- ValidationResult.cs
- CodeDelegateCreateExpression.cs
- LinqToSqlWrapper.cs
- Pair.cs
- Vector3dCollection.cs
- Variant.cs
- ScaleTransform.cs
- PeerContact.cs
- Component.cs
- StyleBamlTreeBuilder.cs
- ItemMap.cs
- StringUtil.cs
- DataBoundControl.cs
- MenuItemStyleCollection.cs
- ProcessHostFactoryHelper.cs
- ConditionChanges.cs
- InfoCardRSACryptoProvider.cs
- formatstringdialog.cs
- GPRECT.cs
- ClientSettingsStore.cs
- BinaryCommonClasses.cs
- basemetadatamappingvisitor.cs
- PeerNameResolver.cs
- WpfKnownMemberInvoker.cs
- ColumnHeaderConverter.cs
- ReadOnlyDataSource.cs
- RegexGroup.cs
- Html32TextWriter.cs
- EventMetadata.cs
- WindowsListViewSubItem.cs
- EpmCustomContentWriterNodeData.cs
- VisualTreeHelper.cs
- brushes.cs
- HttpProfileGroupBase.cs
- XmlText.cs
- VectorConverter.cs
- ImageButton.cs
- Button.cs
- ErrorItem.cs
- httpstaticobjectscollection.cs
- EntityTemplateFactory.cs
- StylusDownEventArgs.cs
- PathFigure.cs
- ECDiffieHellmanPublicKey.cs
- ExtensionDataObject.cs
- XmlHierarchicalEnumerable.cs
- SqlMethodAttribute.cs
- AutomationTextAttribute.cs
- CacheMemory.cs