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
- WebScriptServiceHostFactory.cs
- PageThemeBuildProvider.cs
- ObjectViewFactory.cs
- XmlTextReaderImpl.cs
- PrintPreviewDialog.cs
- MenuAdapter.cs
- Padding.cs
- UpdateCommand.cs
- ECDsa.cs
- CrossSiteScriptingValidation.cs
- HTMLTextWriter.cs
- SoapAttributes.cs
- WebServicesSection.cs
- PenLineCapValidation.cs
- Operand.cs
- DefaultShape.cs
- ChangeNode.cs
- _SecureChannel.cs
- RowParagraph.cs
- TextTreeTextBlock.cs
- Line.cs
- DbParameterCollection.cs
- SkipStoryboardToFill.cs
- OleDbParameter.cs
- MatrixTransform3D.cs
- EmptyCollection.cs
- Part.cs
- TableRow.cs
- SmiContext.cs
- DocumentReference.cs
- MetadataExporter.cs
- UserControl.cs
- WsatAdminException.cs
- EventProvider.cs
- XmlBaseReader.cs
- Buffer.cs
- ZipIOLocalFileDataDescriptor.cs
- EventInfo.cs
- ReadOnlyActivityGlyph.cs
- SafeNativeMethods.cs
- DataGridViewDataConnection.cs
- WebBaseEventKeyComparer.cs
- WizardPanel.cs
- PenContexts.cs
- Match.cs
- Brush.cs
- ToolStripOverflowButton.cs
- NetworkCredential.cs
- AnonymousIdentificationModule.cs
- ToolboxItemFilterAttribute.cs
- DbBuffer.cs
- HttpPostedFile.cs
- FormViewUpdateEventArgs.cs
- HTTPNotFoundHandler.cs
- SqlServices.cs
- GZipDecoder.cs
- StreamGeometry.cs
- AmbientEnvironment.cs
- Popup.cs
- TypeSystem.cs
- LayoutTableCell.cs
- TaiwanLunisolarCalendar.cs
- DropDownList.cs
- OdbcInfoMessageEvent.cs
- OwnerDrawPropertyBag.cs
- ComponentRenameEvent.cs
- PropertyMap.cs
- XNameConverter.cs
- TabItemAutomationPeer.cs
- GestureRecognizer.cs
- StorageMappingItemCollection.cs
- JsonQNameDataContract.cs
- Point4DValueSerializer.cs
- OuterGlowBitmapEffect.cs
- DependentList.cs
- ViewBox.cs
- ScriptReferenceEventArgs.cs
- BitmapMetadata.cs
- Point.cs
- TransformCryptoHandle.cs
- Point3DAnimationUsingKeyFrames.cs
- MultiSelector.cs
- Assert.cs
- RoleGroupCollection.cs
- ContentPlaceHolderDesigner.cs
- CodePrimitiveExpression.cs
- ContentDisposition.cs
- BindingValueChangedEventArgs.cs
- recordstatefactory.cs
- ProbeDuplexAsyncResult.cs
- recordstate.cs
- ComponentManagerBroker.cs
- ClientBuildManagerCallback.cs
- Bezier.cs
- DetailsViewUpdatedEventArgs.cs
- DiscoveryEndpointElement.cs
- InstallerTypeAttribute.cs
- PathGeometry.cs
- Errors.cs
- MessageEventSubscriptionService.cs