Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Core / Microsoft / Win32 / SafeHandles / safePerfProviderHandle.cs / 1305376 / safePerfProviderHandle.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace Microsoft.Win32.SafeHandles { using System; using System.Threading; using System.Diagnostics; using Microsoft.Win32; using Microsoft.Win32.SafeHandles; //// #pragma warning disable 618 // Have not migrated to v4 transparency yet [System.Security.SecurityCritical(System.Security.SecurityCriticalScope.Everything)] #pragma warning restore 618 internal sealed class SafePerfProviderHandle : SafeHandleZeroOrMinusOneIsInvalid { private SafePerfProviderHandle() : base(true) {} protected override bool ReleaseHandle() { IntPtr tempProviderHandle = handle; if (Interlocked.Exchange(ref handle, IntPtr.Zero) != IntPtr.Zero) { uint Status = UnsafeNativeMethods.PerfStopProvider(tempProviderHandle); Debug.Assert(Status == (uint)UnsafeNativeMethods.ERROR_SUCCESS, "PerfStopProvider() fails"); // ERROR_INVALID_PARAMETER } return true; } } } // 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
- InstanceKeyCollisionException.cs
- MissingFieldException.cs
- RewritingProcessor.cs
- FrameAutomationPeer.cs
- UnsafeNativeMethods.cs
- ImportCatalogPart.cs
- BuildProviderAppliesToAttribute.cs
- EntityContainerEntitySet.cs
- RangeValidator.cs
- XhtmlConformanceSection.cs
- ToolStripDropDownItem.cs
- ResourceDictionary.cs
- OleServicesContext.cs
- RuntimeWrappedException.cs
- EncodingInfo.cs
- ColumnProvider.cs
- JpegBitmapEncoder.cs
- DataMemberAttribute.cs
- XmlNullResolver.cs
- SqlGatherProducedAliases.cs
- HtmlProps.cs
- QueryResultOp.cs
- SqlUserDefinedAggregateAttribute.cs
- contentDescriptor.cs
- OSFeature.cs
- IgnoreSectionHandler.cs
- Canonicalizers.cs
- SingletonInstanceContextProvider.cs
- MDIWindowDialog.cs
- Preprocessor.cs
- ProviderCollection.cs
- MonitorWrapper.cs
- DataGrid.cs
- QilLiteral.cs
- MultipleViewProviderWrapper.cs
- ManagedIStream.cs
- Crypto.cs
- EntityDataSourceMemberPath.cs
- SystemColors.cs
- FontStretches.cs
- RadioButtonStandardAdapter.cs
- EditorZoneBase.cs
- validationstate.cs
- PropertyChangingEventArgs.cs
- ListViewItemEventArgs.cs
- SchemaDeclBase.cs
- TextContainerHelper.cs
- ZipIOExtraFieldZip64Element.cs
- RegexCaptureCollection.cs
- Calendar.cs
- RTLAwareMessageBox.cs
- InfiniteIntConverter.cs
- Message.cs
- DefaultSection.cs
- Bidi.cs
- PeerUnsafeNativeMethods.cs
- WebBrowserHelper.cs
- QuotedPrintableStream.cs
- AsyncResult.cs
- ScriptMethodAttribute.cs
- ToolboxDataAttribute.cs
- ContactManager.cs
- DebugView.cs
- PropertyManager.cs
- FrugalList.cs
- QilLoop.cs
- Material.cs
- PointUtil.cs
- PolyQuadraticBezierSegment.cs
- EnumBuilder.cs
- ItemList.cs
- ObjectListFieldCollection.cs
- TypeSystem.cs
- AssemblyFilter.cs
- ListViewGroupItemCollection.cs
- EventMappingSettings.cs
- SqlBulkCopyColumnMappingCollection.cs
- VarRemapper.cs
- WarningException.cs
- GridViewSortEventArgs.cs
- NotSupportedException.cs
- CellParagraph.cs
- LabelEditEvent.cs
- EncodingNLS.cs
- XmlStringTable.cs
- FrameworkElementFactoryMarkupObject.cs
- CloudCollection.cs
- FunctionDetailsReader.cs
- SmiGettersStream.cs
- ObjectStateEntryDbDataRecord.cs
- TreeChangeInfo.cs
- HWStack.cs
- CompilerTypeWithParams.cs
- HijriCalendar.cs
- TableCellCollection.cs
- TextTreeDeleteContentUndoUnit.cs
- EventTrigger.cs
- MgmtResManager.cs
- WebServiceClientProxyGenerator.cs
- ImageSourceConverter.cs