Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Core / System / Diagnostics / PerformanceData / PerfProviderCollection.cs / 1305376 / PerfProviderCollection.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.Diagnostics.PerformanceData {
using System;
using System.Threading;
using System.ComponentModel;
using System.Collections.Generic;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using Microsoft.Win32;
using Microsoft.Win32.SafeHandles;
internal sealed class PerfProvider {
internal Guid m_providerGuid;
internal Int32 m_counterSet;
internal SafePerfProviderHandle m_hProvider;
//
//
//
//
//
[System.Security.SecurityCritical]
internal PerfProvider(Guid providerGuid) {
m_providerGuid = providerGuid;
uint Status = UnsafeNativeMethods.PerfStartProvider(ref m_providerGuid, null, out m_hProvider);
// ERROR_INVALID_PARAMETER, ERROR_OUTOFMEMORY
if (Status != (uint) UnsafeNativeMethods.ERROR_SUCCESS) {
throw new Win32Exception((int) Status);
}
}
}
internal static class PerfProviderCollection {
// Internal global PERFLIB V2 provider collection that contains a collection of PerfProvider objects.
// Use mutex to serialize collection initialization/update.
//
private static Object s_hiddenInternalSyncObject;
private static List s_providerList = new List();
private static Dictionary
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- path.cs
- RedistVersionInfo.cs
- GeneralTransformCollection.cs
- ToolStripCustomTypeDescriptor.cs
- ExtractedStateEntry.cs
- PeerCollaborationPermission.cs
- TableLayoutStyleCollection.cs
- BuildProvidersCompiler.cs
- ZoneIdentityPermission.cs
- WaitHandleCannotBeOpenedException.cs
- controlskin.cs
- WindowsListViewGroupSubsetLink.cs
- DrawingContextWalker.cs
- SoapDocumentServiceAttribute.cs
- Types.cs
- VisualProxy.cs
- RawStylusActions.cs
- InvokeBase.cs
- GroupByQueryOperator.cs
- EventSetter.cs
- BoolExpression.cs
- DispatcherProcessingDisabled.cs
- ProvidePropertyAttribute.cs
- DataGridHyperlinkColumn.cs
- TryLoadRunnableWorkflowCommand.cs
- FixedHyperLink.cs
- ContentElement.cs
- EpmCustomContentSerializer.cs
- ServiceReference.cs
- SqlErrorCollection.cs
- Helpers.cs
- CollectionEditVerbManager.cs
- DbProviderConfigurationHandler.cs
- XPathNavigatorKeyComparer.cs
- HttpCapabilitiesBase.cs
- cryptoapiTransform.cs
- ISAPIWorkerRequest.cs
- CheckBoxPopupAdapter.cs
- DataGridRowClipboardEventArgs.cs
- Screen.cs
- WindowsGraphics2.cs
- UnSafeCharBuffer.cs
- WindowsAuthenticationModule.cs
- OleDbConnectionPoolGroupProviderInfo.cs
- XslAstAnalyzer.cs
- InputDevice.cs
- WebControlParameterProxy.cs
- ReferencedCollectionType.cs
- SchemaComplexType.cs
- HtmlElementErrorEventArgs.cs
- SchemaElementDecl.cs
- ToRequest.cs
- RowsCopiedEventArgs.cs
- MetadataItemEmitter.cs
- Point3DCollection.cs
- ParsedRoute.cs
- HideDisabledControlAdapter.cs
- NamespaceCollection.cs
- LookupNode.cs
- UnsafeNativeMethods.cs
- UriScheme.cs
- IDReferencePropertyAttribute.cs
- infer.cs
- StrokeDescriptor.cs
- LifetimeManager.cs
- HttpCacheParams.cs
- DetailsViewDeletedEventArgs.cs
- SqlTrackingWorkflowInstance.cs
- ItemPager.cs
- ToolBarTray.cs
- AxHost.cs
- ThrowHelper.cs
- XPathScanner.cs
- FormDesigner.cs
- XmlResolver.cs
- XMLUtil.cs
- DynamicRenderer.cs
- SimpleLine.cs
- SequenceDesigner.cs
- FontSizeConverter.cs
- MethodBuilder.cs
- BufferAllocator.cs
- XmlObjectSerializerReadContextComplexJson.cs
- SurrogateSelector.cs
- embossbitmapeffect.cs
- EmptyEnumerable.cs
- XmlFormatWriterGenerator.cs
- Visual3D.cs
- Blend.cs
- MarkupWriter.cs
- smtpconnection.cs
- RecognizerStateChangedEventArgs.cs
- Binding.cs
- FileDetails.cs
- MasterPageCodeDomTreeGenerator.cs
- WebPartManagerInternals.cs
- HttpResponseInternalWrapper.cs
- InertiaRotationBehavior.cs
- _LocalDataStore.cs
- SqlPersonalizationProvider.cs