Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / WCF / Log / System / IO / Log / SafeArchiveContext.cs / 1305376 / SafeArchiveContext.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace System.IO.Log { using System; using System.Runtime.InteropServices; using System.Runtime.ConstrainedExecution; using System.Runtime.Versioning; using System.Security; internal sealed class SafeArchiveContext : SafeHandle { public SafeArchiveContext() : base(IntPtr.Zero, true) { } public override bool IsInvalid { get { return IsClosed || this.handle == IntPtr.Zero; } } [DllImport("clfsw32.dll"), SuppressUnmanagedCodeSecurity, ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)] [ResourceExposure(ResourceScope.None)] private static extern bool TerminateLogArchive(IntPtr ptr); override protected bool ReleaseHandle() { return TerminateLogArchive(this.handle); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace System.IO.Log { using System; using System.Runtime.InteropServices; using System.Runtime.ConstrainedExecution; using System.Runtime.Versioning; using System.Security; internal sealed class SafeArchiveContext : SafeHandle { public SafeArchiveContext() : base(IntPtr.Zero, true) { } public override bool IsInvalid { get { return IsClosed || this.handle == IntPtr.Zero; } } [DllImport("clfsw32.dll"), SuppressUnmanagedCodeSecurity, ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)] [ResourceExposure(ResourceScope.None)] private static extern bool TerminateLogArchive(IntPtr ptr); override protected bool ReleaseHandle() { return TerminateLogArchive(this.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
- ZipIOLocalFileHeader.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- XmlLoader.cs
- Application.cs
- SqlExpander.cs
- DispatchChannelSink.cs
- XmlEntityReference.cs
- LoginName.cs
- CompiledAction.cs
- BitmapSource.cs
- WindowCollection.cs
- Cursors.cs
- DataFieldConverter.cs
- NonVisualControlAttribute.cs
- BindingManagerDataErrorEventArgs.cs
- GridViewColumnHeader.cs
- StrokeFIndices.cs
- Line.cs
- storepermission.cs
- GuidTagList.cs
- HtmlShim.cs
- MarkupExtensionParser.cs
- ServicePointManagerElement.cs
- ParameterCollectionEditorForm.cs
- MemberProjectionIndex.cs
- EmissiveMaterial.cs
- DependencyPropertyKind.cs
- MetadataArtifactLoaderResource.cs
- PersonalizableTypeEntry.cs
- SimpleHandlerBuildProvider.cs
- Span.cs
- ScriptingRoleServiceSection.cs
- AttributeProviderAttribute.cs
- MessageBox.cs
- MdiWindowListItemConverter.cs
- NumberFormatter.cs
- EdmFunction.cs
- MsmqElementBase.cs
- PropertyAccessVisitor.cs
- WorkflowRuntimeSection.cs
- WsiProfilesElementCollection.cs
- CompilerInfo.cs
- XPathExpr.cs
- SqlBulkCopyColumnMapping.cs
- Keyboard.cs
- TextEffect.cs
- IndexExpression.cs
- RSAPKCS1SignatureFormatter.cs
- ServiceOperationParameter.cs
- HashCryptoHandle.cs
- WinEventWrap.cs
- UIElement3D.cs
- ProfileServiceManager.cs
- CultureInfoConverter.cs
- SqlConnectionFactory.cs
- MenuDesigner.cs
- MouseWheelEventArgs.cs
- MarkupCompilePass2.cs
- ControlOperationBehavior.cs
- SchemaImporter.cs
- SqlMultiplexer.cs
- VersionedStreamOwner.cs
- LoginView.cs
- Memoizer.cs
- CoTaskMemUnicodeSafeHandle.cs
- LocatorManager.cs
- FullTextBreakpoint.cs
- QilReference.cs
- BinHexDecoder.cs
- safelink.cs
- ProxyGenerator.cs
- TransformerInfoCollection.cs
- WebPartZoneCollection.cs
- TextEditorSpelling.cs
- DatasetMethodGenerator.cs
- StyleSelector.cs
- ProxyAttribute.cs
- CmsUtils.cs
- HttpClientChannel.cs
- ClientTargetCollection.cs
- ByteRangeDownloader.cs
- OlePropertyStructs.cs
- VerificationAttribute.cs
- ControlParameter.cs
- ResXFileRef.cs
- OutputCacheProfileCollection.cs
- SiteMapNodeItem.cs
- BufferedResponseStream.cs
- COM2Enum.cs
- BuildTopDownAttribute.cs
- StatusBarDesigner.cs
- wgx_sdk_version.cs
- XmlSchemaSet.cs
- PrtCap_Public.cs
- CodeAttributeArgumentCollection.cs
- SafeNativeMethods.cs
- ContentDesigner.cs
- XmlEncoding.cs
- ExtentKey.cs
- XPathNavigatorReader.cs