Click to See Complete Forum and Search --> : NT service debugging


Ken Shaw
September 22nd, 1999, 01:57 PM
I am developing a NT service using VC++ 6 and can't seem to figure out a way to test the thread that is supposed to do stuff. any help would be appreciated.

Laetia
September 24th, 1999, 09:47 AM
What's your thread supposed to b doing?

Maybe you could try to log the thread's activity in a text file or something of the sort.

Or maybe you could try (it depends on what the thread is supposed to b doing) to run that part of the prog as a stand alone, see if it works and then implement the functions to make it a service. That is what I did with the service I'm "playing around" with right now. It's easier that way, I found.... Services aren't very easy, to start with!!!

Good luck!

Caroline

September 24th, 1999, 10:10 AM
Go to your registry where the service is installed. HKEY_LOCAL_MACHINE, SYSTEM, CURRENTCONTROLSET, SERVICES....your service. there is a value name called ImagePath. Double click this, and copy the last bits of it. Open VC6, go to Projects, settings, Debug. In Program argumants, paste the stuff in, add -debug to the end of the string, click OK.

Then run your program, and make sure the service is stopped in SCM.

Its that easy, if it doesnt work. Read Professional NT Services By Kevin "The man" Miller.

Chikere Ezeh
chyke@aol.com