Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Core / Microsoft / Win32 / SafeHandles / SafeLibraryHandle.cs / 1305376 / SafeLibraryHandle.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== /*============================================================ ** ** Class: SafeLibraryHandle ** ============================================================*/ namespace Microsoft.Win32 { using Microsoft.Win32; using Microsoft.Win32.SafeHandles; using System; using System.Runtime.CompilerServices; using System.Runtime.ConstrainedExecution; using System.Runtime.InteropServices; using System.Runtime.Serialization; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using System.Text; //// #pragma warning disable 618 // Have not migrated to v4 transparency yet [System.Security.SecurityCritical(System.Security.SecurityCriticalScope.Everything)] #pragma warning restore 618 [HostProtectionAttribute(MayLeakOnAbort = true)] sealed internal class SafeLibraryHandle : SafeHandleZeroOrMinusOneIsInvalid { internal SafeLibraryHandle() : base(true) {} override protected bool ReleaseHandle() { return UnsafeNativeMethods.FreeLibrary(handle); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== /*============================================================ ** ** Class: SafeLibraryHandle ** ============================================================*/ namespace Microsoft.Win32 { using Microsoft.Win32; using Microsoft.Win32.SafeHandles; using System; using System.Runtime.CompilerServices; using System.Runtime.ConstrainedExecution; using System.Runtime.InteropServices; using System.Runtime.Serialization; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using System.Text; //// // #pragma warning disable 618 // Have not migrated to v4 transparency yet [System.Security.SecurityCritical(System.Security.SecurityCriticalScope.Everything)] #pragma warning restore 618 [HostProtectionAttribute(MayLeakOnAbort = true)] sealed internal class SafeLibraryHandle : SafeHandleZeroOrMinusOneIsInvalid { internal SafeLibraryHandle() : base(true) {} override protected bool ReleaseHandle() { return UnsafeNativeMethods.FreeLibrary(handle); } } } // 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
- ForeignKeyConstraint.cs
- PageMediaSize.cs
- BigInt.cs
- CompositeFontParser.cs
- MaskInputRejectedEventArgs.cs
- PersonalizationDictionary.cs
- ConfigurationStrings.cs
- CollectionViewGroup.cs
- NumericExpr.cs
- ErrorHandler.cs
- ProfileProvider.cs
- RootNamespaceAttribute.cs
- ReadOnlyDataSource.cs
- SqlCaseSimplifier.cs
- PathStreamGeometryContext.cs
- BuildResultCache.cs
- _DynamicWinsockMethods.cs
- ItemsControlAutomationPeer.cs
- WebContext.cs
- Win32Interop.cs
- _UriSyntax.cs
- HttpCacheParams.cs
- Util.cs
- ExpressionBindingCollection.cs
- Identity.cs
- Activity.cs
- ParseNumbers.cs
- FilterElement.cs
- SortKey.cs
- ArraySegment.cs
- SpanIndex.cs
- Util.cs
- XmlNavigatorFilter.cs
- CacheChildrenQuery.cs
- InputLanguageSource.cs
- ImageIndexConverter.cs
- ComponentEvent.cs
- HttpServerChannel.cs
- PropertyEmitterBase.cs
- WizardStepCollectionEditor.cs
- EventEntry.cs
- TreeNodeStyle.cs
- CodeSubDirectory.cs
- ThumbAutomationPeer.cs
- ItemChangedEventArgs.cs
- ScrollEventArgs.cs
- Misc.cs
- PageBreakRecord.cs
- ItemContainerGenerator.cs
- TraversalRequest.cs
- ObjectSelectorEditor.cs
- FrameworkElement.cs
- X509WindowsSecurityToken.cs
- SvcMapFileSerializer.cs
- ListItemCollection.cs
- HandleCollector.cs
- RootAction.cs
- AppDomainFactory.cs
- TextRange.cs
- Expression.cs
- EntitySet.cs
- EntityContainerRelationshipSetEnd.cs
- AspNetSynchronizationContext.cs
- XmlFormatExtensionPrefixAttribute.cs
- SymmetricCryptoHandle.cs
- SendKeys.cs
- BamlStream.cs
- TransactionChannelFactory.cs
- TextTrailingWordEllipsis.cs
- SqlDataSourceStatusEventArgs.cs
- ModelToObjectValueConverter.cs
- Interfaces.cs
- Encoding.cs
- HandlerBase.cs
- EncryptedKey.cs
- CheckBoxRenderer.cs
- FloaterBaseParaClient.cs
- CodeDOMUtility.cs
- LeafCellTreeNode.cs
- SettingsBase.cs
- DataStorage.cs
- SecurityContext.cs
- SecurityDescriptor.cs
- AttachedProperty.cs
- DesignSurfaceManager.cs
- DBSchemaTable.cs
- InfoCardRSAPKCS1KeyExchangeDeformatter.cs
- RegistryKey.cs
- WCFModelStrings.Designer.cs
- IsolatedStorageFile.cs
- ClientScriptManagerWrapper.cs
- NavigationService.cs
- TypeInitializationException.cs
- MessageFilterTable.cs
- HtmlForm.cs
- ExternalCalls.cs
- FrameworkContentElementAutomationPeer.cs
- RuntimeEnvironment.cs
- EnumerableCollectionView.cs
- ProxyWebPartConnectionCollection.cs