Exemple #1
0
        public void WriteLine(SeverityTypes severity, uint id, string msg)
        {
            try
            {
                string[] message = new string[1];
                message[0] = msg;
#if !WSA81
                bool bresult = EventWriterDLL.ReportEvent(this.eventSrcHandle, (ushort)severity, 0, id, null, 1, 0, message, null);
#endif
            }
            catch (Exception e)
            {
                Debug.WriteLine("Exception in EventWriterDLL::WriteLine: " + e.ToString());
            }
        }
Exemple #2
0
        public void Uninitialize()
        {
#if !WSA81
            EventWriterDLL.DeregisterEventSource(eventSrcHandle);
#endif
        }
Exemple #3
0
        public void Initialize(string myName)
        {
#if !WSA81
            this.eventSrcHandle = EventWriterDLL.RegisterEventSource(null, myName);
#endif
        }