Click here to Skip to main content
15,883,978 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi Guys,

I have an application which is a windows service and it is a multithreaded application and it will load other dlls and exes. And this service will run in service manager.

My problem here is when i am trying to debug the application it is moving to the winmain application and one more written function i.e mymain() but when i am debugging it is moving in wimnain and main and some functions like service table and how to check other threads and how to verify whether other dlls are loaded or not?


Thanks a lot in advance.Awaiting for your reply guys.
Posted

This is more difficult than with other applications. You can find some ideas in my past answer: Configure Windows Service with UI[^].

—SA
 
Share this answer
 
add a messagebox in your servicemain, allow the service to interact with the desktop, have the messagebox advertise the pid with a call to GetCurrentProcessId[^], and attach the debugger to it
 
Share this answer
 
Can you check this link. One of my colleague had written this few years back

http://www.mindfiresolutions.com/3-Ways-To-Debug-A-Web-Service-In-Visual-Studio-1006.php[^]
 
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