Windows Service cannot instantiate object of external class???

NugeMan

New member
Joined
Oct 6, 2004
Messages
1
Programming Experience
10+
Please, someone help!

I created a very simple .NET class (let's call it MyClass) and compiled it. I then have a Windows service in a separate project that references the DLL library where MyClass is located. In the OnPause event code of the service class, I attempt to instantiate an instance of MyClass. The service project compiles fine, but when I try to run it, the MyClass object never gets instantiated. In fact, the OnPause event code will not even be executed! If I set a breakpoint and attach to the service process and then pause the service, the service process never breaks at the breakpoint. But if I comment out the line that instantiates the MyClass object, it does stop at the breakpoint.

The only thing I can conclude is that an attempt to instantiate the object of my external class causes the container event to not even execute!

Does anyone have any ideas? I can't find anything online about this. I'm just trying to share a code library and make use of it in a service. If I add the class to the service project, it works fine!
 
Back
Top