M
McKool
Hello.
I'm making a Windows service with C#. This service connect a comm Port when
start and disconnect it when stop. I use an EventLog class to write
information about this service, by example, when the port get connect or
disconnect.
All work ok until the moment when the computer shutdown. If I stop the
service manually before window shutdown, there is not any problem. If the
service still run and windows is shutting down, the computer hang on after
terminate all programs and services (after the window message box "Windows
is being shutting down"). Only what I can see is the Mouse pointer and the
blue screen. If I do not use the EventLog class, the computer shutdown OK.
Every time when i use the Event log make something like:
MyEvents.WriteEntry(System.String.Format("Error: {0}",strError));
MyEvents.Close();
What can i doing wrong?
Thanks in advance....
KW
I'm making a Windows service with C#. This service connect a comm Port when
start and disconnect it when stop. I use an EventLog class to write
information about this service, by example, when the port get connect or
disconnect.
All work ok until the moment when the computer shutdown. If I stop the
service manually before window shutdown, there is not any problem. If the
service still run and windows is shutting down, the computer hang on after
terminate all programs and services (after the window message box "Windows
is being shutting down"). Only what I can see is the Mouse pointer and the
blue screen. If I do not use the EventLog class, the computer shutdown OK.
Every time when i use the Event log make something like:
MyEvents.WriteEntry(System.String.Format("Error: {0}",strError));
MyEvents.Close();
What can i doing wrong?
Thanks in advance....
KW