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
- SimpleWorkerRequest.cs
- ModifiableIteratorCollection.cs
- RenderDataDrawingContext.cs
- QueryOperationResponseOfT.cs
- HttpPostLocalhostServerProtocol.cs
- RequestSecurityTokenSerializer.cs
- CryptoApi.cs
- DbConnectionPoolGroup.cs
- CustomBinding.cs
- ReachDocumentReferenceCollectionSerializerAsync.cs
- ThreadPoolTaskScheduler.cs
- StoryFragments.cs
- HashAlgorithm.cs
- SoapSchemaMember.cs
- KeyboardDevice.cs
- Vector3DValueSerializer.cs
- ObjectListItem.cs
- RenderContext.cs
- QueryStringParameter.cs
- SqlMethodAttribute.cs
- Pair.cs
- Debug.cs
- HtmlUtf8RawTextWriter.cs
- SessionSwitchEventArgs.cs
- XmlCharCheckingWriter.cs
- ExpandoClass.cs
- RadioButtonList.cs
- TextAutomationPeer.cs
- AsyncDataRequest.cs
- TextStore.cs
- SequentialActivityDesigner.cs
- BamlTreeMap.cs
- XmlEncoding.cs
- CallId.cs
- StickyNote.cs
- SqlStream.cs
- Authorization.cs
- ContextBase.cs
- SchemaType.cs
- DynamicDiscoveryDocument.cs
- PrimitiveSchema.cs
- Util.cs
- entityreference_tresulttype.cs
- ObjectStateFormatter.cs
- ButtonChrome.cs
- TimeSpanSecondsConverter.cs
- GeneralTransform3D.cs
- MultiPropertyDescriptorGridEntry.cs
- SchemaInfo.cs
- BaseTemplateParser.cs
- XmlSchemaAttributeGroupRef.cs
- BorderGapMaskConverter.cs
- XmlSchemaSimpleType.cs
- TableLayoutCellPaintEventArgs.cs
- SafeUserTokenHandle.cs
- ComponentResourceManager.cs
- MouseActionConverter.cs
- XPathNodeInfoAtom.cs
- MessageBox.cs
- CompilerTypeWithParams.cs
- ListMarkerSourceInfo.cs
- _SslStream.cs
- XmlSerializableReader.cs
- TransportContext.cs
- NativeMethods.cs
- ObjectQuery_EntitySqlExtensions.cs
- StackBuilderSink.cs
- ValueType.cs
- ManifestResourceInfo.cs
- DynamicPropertyHolder.cs
- MarginsConverter.cs
- IntPtr.cs
- NativeConfigurationLoader.cs
- ExceptionTrace.cs
- Page.cs
- FixedSOMFixedBlock.cs
- VersionedStream.cs
- PersonalizationEntry.cs
- Floater.cs
- FileFormatException.cs
- ButtonStandardAdapter.cs
- DocumentsTrace.cs
- NativeMethods.cs
- AnimationTimeline.cs
- _PooledStream.cs
- XmlDomTextWriter.cs
- FormViewInsertEventArgs.cs
- XmlCharCheckingReader.cs
- RuleSetCollection.cs
- ToolStripSplitStackLayout.cs
- MetafileHeaderWmf.cs
- OleAutBinder.cs
- GraphicsState.cs
- DnsElement.cs
- Clause.cs
- ColumnWidthChangedEvent.cs
- Executor.cs
- QilGenerator.cs
- ConfigXmlReader.cs
- AsyncSerializedWorker.cs