Click here to Skip to main content
15,887,135 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a 3rd-party DLL that sends events to applications.

So to hook a handler for an event from the DLL, one does this:

void OnEventProc()
{
// do something
}

DLL_CLASS DllInstance = new DLL_CLASS;
DllInstance.OnEvent += OnEventProc;

This works just fine in a Windows Forms application, but how do I make it work in a Windows service?

I don't need to see Windows events, just events from the DLL.

All help is welcome, thanks!

Lou

What I have tried:

I have tried adding a NativeWindow to my service, but couldn't get that to work.
Posted
Updated 6-Aug-17 16:25pm

1 solution

This CodeProject article will help in converting your app into a service: Yes, I Know, But I Still Want a GUI for my Windows Service![^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900