How to debug NT service using VC5 on NT5 Beta2 ? 
Author Message
 How to debug NT service using VC5 on NT5 Beta2 ?

Hello, everyone.

I need to debug NT service under NT5B2 using MSVC5.0SP3. The way it used to
be in NT4: I can place a hard-coded breakpoint using "__asm int 3", or I can
use DbgBreak(), then start the service using e.g. "net start", service
causes exception, and then I get the alternative to either abort the program
or debug it, so I select debug, and everything is OK provided that the
service was built with debug information. Another alternative is to attach
to process from MSVC IDE. Both these ways do not work in NT5B2. Processes
aren't listed in IDE, so I can't attach to them. When service causes
exception, I've not given the used to be dialog box to select "Debug", NT
just states the error message -- either in CMD window when using "net
start", or in a dialog box when using stop service from service manager from
control panel.

The question is: Is there a way to debug NT service using MSVC5 running on
NT5Beta2?

Thanks a lot.
Victor.



Sun, 15 Jul 2001 03:00:00 GMT  
 How to debug NT service using VC5 on NT5 Beta2 ?
You can put an option in to run the program in manual mode - so you can run
it directly from the IDE.  Essentially, you check for the command line
option, and if its there, you bypass all the code that hooks to the NT SCM
(Service Control Manager)

In the VC samples, there is a 'Simple Service' example - it has the code you
need.

of course, if you are doing fancy stuff interacting with the SCM, this
option won't work.

GL

DanL

Quote:

>Hello, everyone.

>I need to debug NT service under NT5B2 using MSVC5.0SP3.



Mon, 16 Jul 2001 03:00:00 GMT  
 How to debug NT service using VC5 on NT5 Beta2 ?
It 'should' report errors and exceptions if attached with a de{*filter*} (it
does on NT4)
One thing to try is to set your service to 'interact with desktop' from
control panel (or MMC) / 'services'.

Steve


Quote:
>Hello, everyone.

>I need to debug NT service under NT5B2 using MSVC5.0SP3. The way it used to
>be in NT4: I can place a hard-coded breakpoint using "__asm int 3", or I
can
>use DbgBreak(), then start the service using e.g. "net start", service
>causes exception, and then I get the alternative to either abort the
program
>or debug it, so I select debug, and everything is OK provided that the
>service was built with debug information. Another alternative is to attach
>to process from MSVC IDE. Both these ways do not work in NT5B2. Processes
>aren't listed in IDE, so I can't attach to them. When service causes
>exception, I've not given the used to be dialog box to select "Debug", NT
>just states the error message -- either in CMD window when using "net
>start", or in a dialog box when using stop service from service manager
from
>control panel.

>The question is: Is there a way to debug NT service using MSVC5 running on
>NT5Beta2?

>Thanks a lot.
>Victor.



Fri, 27 Jul 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. How to debug NT service using VC5 on NT5 Beta2 ?

2. Can't load debug symbols on NT5 [server] Beta2

3. VC6/NT5 Beta2: access denied to component gallery?

4. Debugging NT service using Compuware boundschecker

5. NT Service Using MFC (Samples\sdk\winnt\service) PLEASE HELP

6. Remote startup of NT Services from another NT Service

7. How to debug NT service

8. How to debug windows nt services

9. NT Service Pack Debug Symbols

10. Windows NT Service Pack 4 Debug Symbols

11. Q: Source debugging NT Services

12. Debugging an NT service - How to save output

 

 
Powered by phpBB® Forum Software