G
Guest
Hi.
I'm trying to handle the SessionEnding event in
Microsoft.Win32.SystemEvents, but when I hook up my event handler it throws
an exception. I don't recognize the exception and I'm not sure whether it has
anything to do with the fact I'm using it in a Windows Service. The exception
is given below.
Thanks for your assistance.
Reuben
=====================================================
System.Runtime.InteropServices.ExternalException: Failed to create system
events window thread.
at Microsoft.Win32.SystemEvents.EnsureSystemEvents(Boolean requireHandle,
Boolean throwOnRefusal)
at
Microsoft.Win32.SystemEvents.add_SessionEnding(SessionEndingEventHandler
value)
at Symbiosis.Symbiosis.OnStart(String[] args)
at System.ServiceProcess.ServiceBase.ServiceQueuedMainCallback(Object
state).
I'm trying to handle the SessionEnding event in
Microsoft.Win32.SystemEvents, but when I hook up my event handler it throws
an exception. I don't recognize the exception and I'm not sure whether it has
anything to do with the fact I'm using it in a Windows Service. The exception
is given below.
Thanks for your assistance.
Reuben
=====================================================
System.Runtime.InteropServices.ExternalException: Failed to create system
events window thread.
at Microsoft.Win32.SystemEvents.EnsureSystemEvents(Boolean requireHandle,
Boolean throwOnRefusal)
at
Microsoft.Win32.SystemEvents.add_SessionEnding(SessionEndingEventHandler
value)
at Symbiosis.Symbiosis.OnStart(String[] args)
at System.ServiceProcess.ServiceBase.ServiceQueuedMainCallback(Object
state).