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
- StylusPointPropertyId.cs
- ContextActivityUtils.cs
- loginstatus.cs
- WorkflowViewManager.cs
- FixedSOMSemanticBox.cs
- SmtpMail.cs
- FileDataSourceCache.cs
- UniqueConstraint.cs
- ControlCollection.cs
- SiteMapDataSource.cs
- DoubleSumAggregationOperator.cs
- SqlDeflator.cs
- DefaultIfEmptyQueryOperator.cs
- PerformanceCounterPermissionEntry.cs
- EndpointAddressProcessor.cs
- ClientEventManager.cs
- HtmlForm.cs
- SpoolingTaskBase.cs
- PeerApplicationLaunchInfo.cs
- DocumentDesigner.cs
- SHA512.cs
- CallSiteBinder.cs
- FunctionParameter.cs
- SymmetricAlgorithm.cs
- ProfileModule.cs
- WebServiceReceiveDesigner.cs
- MailHeaderInfo.cs
- SelectionItemProviderWrapper.cs
- DataListItemCollection.cs
- RecognitionResult.cs
- QilReference.cs
- CommonServiceBehaviorElement.cs
- FtpCachePolicyElement.cs
- DispatcherOperation.cs
- WinInet.cs
- WarningException.cs
- SecureUICommand.cs
- SourceElementsCollection.cs
- TextEditorCharacters.cs
- DynamicPropertyReader.cs
- BitmapMetadata.cs
- ProxyHwnd.cs
- XappLauncher.cs
- TypeListConverter.cs
- PasswordTextContainer.cs
- TextWriterTraceListener.cs
- CodeTypeDelegate.cs
- ConnectionPointCookie.cs
- ZipPackagePart.cs
- TreeView.cs
- CodeMethodInvokeExpression.cs
- WebConfigurationManager.cs
- Point.cs
- StrokeDescriptor.cs
- SingleAnimationBase.cs
- GroupAggregateExpr.cs
- linebase.cs
- Pointer.cs
- CroppedBitmap.cs
- CodeSubDirectory.cs
- ExecutionPropertyManager.cs
- figurelengthconverter.cs
- PropertyChangeTracker.cs
- HttpListenerException.cs
- SqlGatherConsumedAliases.cs
- Evidence.cs
- SystemKeyConverter.cs
- TextRenderer.cs
- UIElementParaClient.cs
- ToolboxItem.cs
- AutomationElementCollection.cs
- XhtmlBasicPhoneCallAdapter.cs
- StrongTypingException.cs
- ErrorTolerantObjectWriter.cs
- XNodeNavigator.cs
- BaseConfigurationRecord.cs
- XmlWrappingReader.cs
- InvokePattern.cs
- PinnedBufferMemoryStream.cs
- IriParsingElement.cs
- PageCodeDomTreeGenerator.cs
- Event.cs
- TraceUtility.cs
- TreeNodeClickEventArgs.cs
- IEnumerable.cs
- ParallelTimeline.cs
- UITypeEditor.cs
- ConfigurationStrings.cs
- PageStatePersister.cs
- SizeLimitedCache.cs
- Literal.cs
- CompositeScriptReferenceEventArgs.cs
- EpmContentSerializerBase.cs
- RuleDefinitions.cs
- NamedObject.cs
- Underline.cs
- CompressionTransform.cs
- RichTextBox.cs
- ApplicationDirectory.cs
- OutKeywords.cs