Exemple #1
0
        internal unsafe override void Register(Guid providerGuid)
        {
            _etwEnabledCallback = new ManifestEtw.EtwEnableCallback(EtwEnableCallback);
            ulong registrationHandle = 0;

            ManifestEtw.EventRegister(ref providerGuid, _etwEnabledCallback, null, ref registrationHandle);
            _registrationHandle.Value = registrationHandle;
        }
 private uint EventRegister(ref Guid providerId, ManifestEtw.EtwEnableCallback enableCallback)
 {
     s_isClassic        = this.m_isClassic = Environment.OSVersion.Version.Major < 6;
     this.m_providerId  = providerId;
     this.m_etwCallback = enableCallback;
     if (!this.m_isClassic)
     {
         return(ManifestEtw.EventRegister(ref providerId, enableCallback, null, ref this.m_regHandle));
     }
     return(this.ClassicShimRegister(providerId, enableCallback));
 }