Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- ColumnResizeUndoUnit.cs
- OneOf.cs
- SkewTransform.cs
- GenerateTemporaryTargetAssembly.cs
- DeviceContext.cs
- ViewStateException.cs
- CatalogPartCollection.cs
- ExpressionBindingCollection.cs
- GroupBox.cs
- Rotation3DAnimationUsingKeyFrames.cs
- DefaultAutoFieldGenerator.cs
- CompilationLock.cs
- BindToObject.cs
- PropertyEmitterBase.cs
- FrameworkElementFactoryMarkupObject.cs
- SingleConverter.cs
- LayoutTableCell.cs
- TemplatePropertyEntry.cs
- MsmqChannelFactory.cs
- LayoutSettings.cs
- EqualityComparer.cs
- ToolStripDropDownMenu.cs
- FileNotFoundException.cs
- ControlBuilder.cs
- TemplatePropertyEntry.cs
- TextReturnReader.cs
- PropertyMetadata.cs
- TTSEvent.cs
- XmlImplementation.cs
- PersonalizationState.cs
- TemplateBamlTreeBuilder.cs
- DataGridViewAutoSizeModeEventArgs.cs
- StringOutput.cs
- SqlBooleanMismatchVisitor.cs
- SessionEndingEventArgs.cs
- SingleTagSectionHandler.cs
- DecoderNLS.cs
- ReliableSession.cs
- CreateCardRequest.cs
- ComponentChangingEvent.cs
- HtmlTableRow.cs
- dbenumerator.cs
- VirtualizingPanel.cs
- MemberPath.cs
- MarkedHighlightComponent.cs
- LowerCaseStringConverter.cs
- WebPartManager.cs
- DrawingAttributes.cs
- EventSourceCreationData.cs
- PrintingPermissionAttribute.cs
- Volatile.cs
- ComponentConverter.cs
- EventNotify.cs
- GroupAggregateExpr.cs
- DataTableNameHandler.cs
- PolicyStatement.cs
- SemaphoreFullException.cs
- ClosureBinding.cs
- TrustLevelCollection.cs
- HttpConfigurationSystem.cs
- ChangeInterceptorAttribute.cs
- SignatureDescription.cs
- TemplatedWizardStep.cs
- Executor.cs
- _ContextAwareResult.cs
- TracingConnectionListener.cs
- RtfToken.cs
- PipeSecurity.cs
- ManagedIStream.cs
- InternalConfigConfigurationFactory.cs
- ETagAttribute.cs
- DivideByZeroException.cs
- TransformerInfo.cs
- Aes.cs
- DBConnectionString.cs
- DataGridViewSelectedCellsAccessibleObject.cs
- DllNotFoundException.cs
- FunctionQuery.cs
- TextFormatterHost.cs
- ReadOnlyHierarchicalDataSourceView.cs
- UnsafeNetInfoNativeMethods.cs
- SourceFilter.cs
- BufferModeSettings.cs
- ResourceContainer.cs
- RepeaterItem.cs
- FacetChecker.cs
- Underline.cs
- CodeDomLoader.cs
- LineSegment.cs
- HyperLinkField.cs
- DBNull.cs
- ReflectEventDescriptor.cs
- MetadataUtilsSmi.cs
- MexNamedPipeBindingCollectionElement.cs
- EmptyImpersonationContext.cs
- Literal.cs
- AsnEncodedData.cs
- HandlerBase.cs
- ExpressionNode.cs
- FontCacheUtil.cs