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
- Nodes.cs
- SatelliteContractVersionAttribute.cs
- DataGridColumnCollection.cs
- MailAddress.cs
- DataColumnCollection.cs
- EmptyControlCollection.cs
- Socket.cs
- FreeFormPanel.cs
- Constants.cs
- NetworkCredential.cs
- DeploymentExceptionMapper.cs
- Range.cs
- SystemIcmpV6Statistics.cs
- FastEncoderWindow.cs
- UInt16Storage.cs
- RangeValueProviderWrapper.cs
- UiaCoreApi.cs
- NavigateEvent.cs
- PropertyGrid.cs
- IsolationInterop.cs
- XmlSchemaValidator.cs
- SmtpClient.cs
- SqlError.cs
- XmlStreamStore.cs
- ScrollChangedEventArgs.cs
- ValueType.cs
- ZipIOExtraFieldZip64Element.cs
- XmlIgnoreAttribute.cs
- ServiceReference.cs
- StylusSystemGestureEventArgs.cs
- GridEntry.cs
- XmlTextEncoder.cs
- WizardStepBase.cs
- SettingsContext.cs
- DynamicPhysicalDiscoSearcher.cs
- ViewgenContext.cs
- DataServices.cs
- HttpProcessUtility.cs
- SymmetricCryptoHandle.cs
- Assert.cs
- Container.cs
- AdapterUtil.cs
- RedirectionProxy.cs
- EntityDataSourceContainerNameConverter.cs
- HtmlTitle.cs
- DataGridViewCheckBoxCell.cs
- BamlResourceSerializer.cs
- ConvertersCollection.cs
- StrokeFIndices.cs
- WaitForChangedResult.cs
- TreeWalkHelper.cs
- DispatcherExceptionFilterEventArgs.cs
- Matrix3DValueSerializer.cs
- ObjectViewEntityCollectionData.cs
- OperationBehaviorAttribute.cs
- DescendantBaseQuery.cs
- AxParameterData.cs
- PageClientProxyGenerator.cs
- RadioButtonFlatAdapter.cs
- DataControlCommands.cs
- Rules.cs
- Renderer.cs
- PagePropertiesChangingEventArgs.cs
- ObjectMemberMapping.cs
- CollectionBuilder.cs
- BitmapInitialize.cs
- DataControlFieldHeaderCell.cs
- RepeatInfo.cs
- HostedElements.cs
- EmptyQuery.cs
- SpecialTypeDataContract.cs
- HwndHostAutomationPeer.cs
- Marshal.cs
- HierarchicalDataTemplate.cs
- DbReferenceCollection.cs
- XPathMultyIterator.cs
- Normalization.cs
- DataPagerCommandEventArgs.cs
- OptimizedTemplateContent.cs
- TypeBuilder.cs
- WindowsImpersonationContext.cs
- ObjectNotFoundException.cs
- DbgUtil.cs
- WorkItem.cs
- EntityPropertyMappingAttribute.cs
- TimeSpanValidator.cs
- Timer.cs
- _BaseOverlappedAsyncResult.cs
- StrongNamePublicKeyBlob.cs
- InvokeGenerator.cs
- Separator.cs
- WebColorConverter.cs
- FontInfo.cs
- RegexStringValidatorAttribute.cs
- SiteMapNodeCollection.cs
- Sql8ExpressionRewriter.cs
- InternalCache.cs
- ArgumentException.cs
- BasicCommandTreeVisitor.cs
- ProcessModelInfo.cs