Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / WCF / Log / System / IO / Log / SafeReadContext.cs / 1305376 / SafeReadContext.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace System.IO.Log { using System; using System.Diagnostics; using System.Runtime.InteropServices; using System.Runtime.ConstrainedExecution; using System.Runtime.Versioning; using System.Security; internal sealed class SafeReadContext : SafeHandle { public SafeReadContext() : 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 TerminateReadLog(IntPtr ptr); override protected bool ReleaseHandle() { return TerminateReadLog(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.Diagnostics; using System.Runtime.InteropServices; using System.Runtime.ConstrainedExecution; using System.Runtime.Versioning; using System.Security; internal sealed class SafeReadContext : SafeHandle { public SafeReadContext() : 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 TerminateReadLog(IntPtr ptr); override protected bool ReleaseHandle() { return TerminateReadLog(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
- IProducerConsumerCollection.cs
- QilNode.cs
- ReadOnlyDictionary.cs
- Identifier.cs
- HttpPostProtocolImporter.cs
- Main.cs
- WebDisplayNameAttribute.cs
- Verify.cs
- StyleTypedPropertyAttribute.cs
- ExtenderControl.cs
- OptimizerPatterns.cs
- SecurityElement.cs
- TableRowCollection.cs
- WindowsToolbarItemAsMenuItem.cs
- XmlLanguage.cs
- ToolStripMenuItem.cs
- TextAction.cs
- ProgressPage.cs
- HostSecurityManager.cs
- ConstraintConverter.cs
- CodeGen.cs
- HostingEnvironment.cs
- TypeSource.cs
- HostingEnvironment.cs
- ContextMenuStripGroupCollection.cs
- ArgumentOutOfRangeException.cs
- TrackBar.cs
- ReadOnlyDictionary.cs
- DirectoryNotFoundException.cs
- MemberInfoSerializationHolder.cs
- ApplicationServiceManager.cs
- SchemaElement.cs
- FormViewDeletedEventArgs.cs
- relpropertyhelper.cs
- DesignTimeTemplateParser.cs
- WizardStepBase.cs
- WinEventHandler.cs
- WindowsFormsSynchronizationContext.cs
- QueryableDataSource.cs
- ADMembershipProvider.cs
- UInt32Storage.cs
- MobileListItem.cs
- StreamedFramingRequestChannel.cs
- PropertyChangingEventArgs.cs
- ACL.cs
- StorageSetMapping.cs
- XmlSchemaIdentityConstraint.cs
- DataGridTextBox.cs
- ActivationArguments.cs
- FactoryMaker.cs
- WindowsFormsHost.cs
- FormsAuthentication.cs
- FaultFormatter.cs
- ScrollItemPattern.cs
- ReadOnlyDictionary.cs
- SmiMetaDataProperty.cs
- Pkcs7Recipient.cs
- GlyphInfoList.cs
- DataException.cs
- HttpCapabilitiesSectionHandler.cs
- BackgroundWorker.cs
- Animatable.cs
- TextComposition.cs
- WindowsFormsHelpers.cs
- VScrollProperties.cs
- CapabilitiesPattern.cs
- UIntPtr.cs
- CompatibleComparer.cs
- TextDocumentView.cs
- SafeNativeMemoryHandle.cs
- Identity.cs
- CapabilitiesSection.cs
- BrowsableAttribute.cs
- DesignerView.cs
- ChunkedMemoryStream.cs
- CompilerResults.cs
- HttpCookieCollection.cs
- WebBrowserSiteBase.cs
- TemplateNodeContextMenu.cs
- WizardDesigner.cs
- ApplicationHost.cs
- BinaryNode.cs
- FullTextState.cs
- ContainerControlDesigner.cs
- OneOfConst.cs
- MenuAutomationPeer.cs
- DynamicValueConverter.cs
- ThreadStateException.cs
- SafeProcessHandle.cs
- XmlBaseReader.cs
- Or.cs
- SecurityUtils.cs
- ServiceHttpHandlerFactory.cs
- DoubleAnimation.cs
- TargetInvocationException.cs
- Renderer.cs
- ObjectDataSourceView.cs
- DBSchemaRow.cs
- DelimitedListTraceListener.cs
- GreenMethods.cs