예제 #1
0
        unsafe uint IEventProvider.EventRegister(
            EventSource eventSource,
            Interop.Advapi32.EtwEnableCallback enableCallback,
            void *callbackContext,
            ref long registrationHandle)
        {
            uint returnStatus = 0;

            m_provHandle = EventPipeInternal.CreateProvider(eventSource.Name, enableCallback);
            if (m_provHandle != IntPtr.Zero)
            {
                // Fixed registration handle because a new EventPipeEventProvider
                // will be created for each new EventSource.
                registrationHandle = 1;
            }
            else
            {
                // Unable to create the provider.
                returnStatus = 1;
            }

            return(returnStatus);
        }
예제 #2
0
 internal static uint GetAssemblyCount()
 {
     return((uint)EventPipeInternal.GetRuntimeCounterValue(EventPipeInternal.RuntimeCounters.ASSEMBLY_COUNT));
 }