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
- CopyOfAction.cs
- sqlpipe.cs
- ContractListAdapter.cs
- QilReplaceVisitor.cs
- MimeBasePart.cs
- X509Certificate.cs
- StopStoryboard.cs
- BaseCollection.cs
- ValidationRule.cs
- ToolStripSettings.cs
- OdbcInfoMessageEvent.cs
- ResolveNextArgumentWorkItem.cs
- TransformDescriptor.cs
- ListControlDesigner.cs
- MouseActionConverter.cs
- OleDbReferenceCollection.cs
- RequestCacheValidator.cs
- RevocationPoint.cs
- WindowsIPAddress.cs
- SystemInformation.cs
- WSHttpBindingElement.cs
- DataRowChangeEvent.cs
- UntypedNullExpression.cs
- ColumnBinding.cs
- PropertyInformation.cs
- DataGridViewRowEventArgs.cs
- GeneralTransform3DTo2DTo3D.cs
- InvalidProgramException.cs
- Token.cs
- FrameworkTemplate.cs
- BinaryMessageEncodingElement.cs
- Expander.cs
- _SSPISessionCache.cs
- XdrBuilder.cs
- StackOverflowException.cs
- TextEndOfSegment.cs
- ProgressBar.cs
- SchemaImporterExtension.cs
- CollectionsUtil.cs
- AssemblyAttributes.cs
- DocumentPage.cs
- StoreAnnotationsMap.cs
- WSSecurityTokenSerializer.cs
- ExpandCollapsePattern.cs
- Rect3D.cs
- OneOfScalarConst.cs
- MachineKeySection.cs
- ButtonColumn.cs
- PositiveTimeSpanValidator.cs
- ContentType.cs
- ContextMenu.cs
- PixelShader.cs
- ResumeStoryboard.cs
- SchemaElementLookUpTable.cs
- MenuItemCollectionEditor.cs
- ToolboxService.cs
- InsufficientMemoryException.cs
- ImageList.cs
- StylusPoint.cs
- WebServiceParameterData.cs
- _UncName.cs
- dtdvalidator.cs
- EncoderBestFitFallback.cs
- TextBox.cs
- MultiAsyncResult.cs
- SafeNativeMethods.cs
- rsa.cs
- InvokePatternIdentifiers.cs
- ResponseStream.cs
- DebuggerAttributes.cs
- MatrixCamera.cs
- Config.cs
- PrinterSettings.cs
- ClientBuildManager.cs
- DoubleLink.cs
- Matrix3DStack.cs
- ThicknessKeyFrameCollection.cs
- XmlAggregates.cs
- DbConnectionPoolOptions.cs
- ExpandableObjectConverter.cs
- EditorZoneBase.cs
- TypeForwardedToAttribute.cs
- XmlSortKey.cs
- Attribute.cs
- ellipse.cs
- Win32PrintDialog.cs
- BaseCodeDomTreeGenerator.cs
- SqlInternalConnection.cs
- PerformanceCounterScope.cs
- BaseResourcesBuildProvider.cs
- SlotInfo.cs
- FrameworkContentElement.cs
- VideoDrawing.cs
- XmlAtomicValue.cs
- PersonalizationProviderCollection.cs
- UndoManager.cs
- SemanticResolver.cs
- EntityViewGenerator.cs
- SqlRecordBuffer.cs
- ConfigurationManagerInternalFactory.cs