Hi.
I am new to developing services and I am trying to develop a service that can print out labels from something called Codesoft.
I have added a reference to the Codesoft component/server.

I have tried to make at standard Windows forms application with Exactly the same code and it works, but as a service application I get an error like this: "Object reference not set to an instance of an object" I can see the Codesoft component is starting ( when I see Processes in task manager) when I start the service.

Can anyone explain where I put the declarations when it's a Windows Service project?

I am using Visual Studio 2008.

Thanks

Is the user going to interact with the service?

Thank you for your reply.
Just a few minutes before, I discovered that the problem was that I installed it under the LocalSystem account and the service is using network drives which it apparently could not. I tried to install it under User account with my own username and then it worked, so you are right, it has something to do with a user.
Now I just have to figure out which user I shall use, because the service shall run on a server.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.