Пример #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;
        }
        internal void Register(Guid providerGuid)
        {
            this.m_providerId  = providerGuid;
            this.m_etwCallback = new ManifestEtw.EtwEnableCallback(this.EtwEnableCallBack);
            uint num = this.EventRegister(ref this.m_providerId, this.m_etwCallback);

            if (num != 0)
            {
                throw new ArgumentException(Win32Native.GetMessage((int)num));
            }
        }
 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));
 }
 private unsafe uint ClassicShimRegister(Guid providerId, ManifestEtw.EtwEnableCallback enableCallback)
 {
     ClassicEtw.TRACE_GUID_REGISTRATION trace_guid_registration;
     if (this.m_regHandle != 0L)
     {
         throw new Exception();
     }
     this.m_classicEventHeader = (ClassicEtw.EVENT_HEADER *)Marshal.AllocHGlobal(sizeof(ClassicEtw.EVENT_HEADER));
     ZeroMemory((IntPtr)this.m_classicEventHeader, sizeof(ClassicEtw.EVENT_HEADER));
     trace_guid_registration.RegHandle = null;
     trace_guid_registration.Guid      = &providerId;
     this.m_classicControlCallback     = new ClassicEtw.ControlCallback(this.ClassicControlCallback);
     return(ClassicEtw.RegisterTraceGuidsW(this.m_classicControlCallback, null, ref providerId, 1, &trace_guid_registration, null, null, out this.m_regHandle));
 }
Пример #5
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;
 }
 internal void Register(Guid providerGuid)
 {
     this.m_providerId = providerGuid;
     this.m_etwCallback = new ManifestEtw.EtwEnableCallback(this.EtwEnableCallBack);
     uint num = this.EventRegister(ref this.m_providerId, this.m_etwCallback);
     if (num != 0)
     {
         throw new ArgumentException(Win32Native.GetMessage((int) num));
     }
 }
 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);
 }
Пример #8
0
        internal unsafe void Register(Guid providerGuid)
        { 
            m_providerId = providerGuid; 
            uint status;
            m_etwCallback = new ManifestEtw.EtwEnableCallback(EtwEnableCallBack); 

            status = EventRegister(ref m_providerId, m_etwCallback);
            if (status != 0)
            { 
                throw new ArgumentException(Win32Native.GetMessage(unchecked((int)status)));
            } 
        }