Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- ValidatorCollection.cs
- COSERVERINFO.cs
- PkcsMisc.cs
- FillErrorEventArgs.cs
- SurrogateSelector.cs
- XamlWriter.cs
- CodeIterationStatement.cs
- Pkcs9Attribute.cs
- ExcludePathInfo.cs
- DeviceOverridableAttribute.cs
- BridgeDataReader.cs
- ParameterRetriever.cs
- MetadataItemCollectionFactory.cs
- PrivilegeNotHeldException.cs
- DrawingImage.cs
- RadioButtonList.cs
- LightweightCodeGenerator.cs
- PageThemeCodeDomTreeGenerator.cs
- SqlNodeAnnotations.cs
- TdsValueSetter.cs
- PersistChildrenAttribute.cs
- ValueExpressions.cs
- SqlPersonalizationProvider.cs
- OdbcUtils.cs
- BoolExpressionVisitors.cs
- SettingsAttributes.cs
- Rect3D.cs
- TriggerBase.cs
- SByteConverter.cs
- ValidatorCollection.cs
- X509CertificateChain.cs
- RoutedPropertyChangedEventArgs.cs
- SerializationInfo.cs
- PrinterResolution.cs
- SqlVisitor.cs
- MobileCapabilities.cs
- SoapFormatExtensions.cs
- HtmlContainerControl.cs
- SmtpReplyReaderFactory.cs
- DictionaryManager.cs
- CharKeyFrameCollection.cs
- CodeDesigner.cs
- LockedActivityGlyph.cs
- SemaphoreSecurity.cs
- ComponentResourceKeyConverter.cs
- CompiledQuery.cs
- ICollection.cs
- SqlMethodTransformer.cs
- TypeDescriptor.cs
- HatchBrush.cs
- TemplateControlParser.cs
- StoreAnnotationsMap.cs
- IdnElement.cs
- LinearGradientBrush.cs
- PropagationProtocolsTracing.cs
- VirtualStackFrame.cs
- Pts.cs
- AttachedPropertyBrowsableForTypeAttribute.cs
- LinqToSqlWrapper.cs
- PatternMatcher.cs
- BinaryQueryOperator.cs
- WeakRefEnumerator.cs
- ButtonColumn.cs
- IntSecurity.cs
- ErrorHandlerModule.cs
- XmlSchemaParticle.cs
- IssuedSecurityTokenParameters.cs
- Context.cs
- PanelDesigner.cs
- ItemCheckedEvent.cs
- TypeHelper.cs
- QilReference.cs
- wgx_commands.cs
- _AutoWebProxyScriptWrapper.cs
- BindingsCollection.cs
- NativeMethods.cs
- ConfigurationSchemaErrors.cs
- HWStack.cs
- BindingListCollectionView.cs
- CommandManager.cs
- SoapAttributeOverrides.cs
- Win32SafeHandles.cs
- WebBrowserDesigner.cs
- DataGridViewRowErrorTextNeededEventArgs.cs
- JsonGlobals.cs
- Label.cs
- XPathPatternParser.cs
- RectangleGeometry.cs
- FixedTextSelectionProcessor.cs
- ContentFileHelper.cs
- TreeViewImageKeyConverter.cs
- DataAdapter.cs
- EventHandlerService.cs
- x509store.cs
- SqlInternalConnection.cs
- ArglessEventHandlerProxy.cs
- WorkflowRuntime.cs
- DataGridViewRowErrorTextNeededEventArgs.cs
- HttpContext.cs
- PointLight.cs