Debug Services with use of a UDP Stream...
-
Hello, i have to debug a service intensively. But it's not possible with normal tools. So i want to write a little C++ Class which uses UDP Socket with one Function Send(CString _somewhat). All the other stuff should be hardcoded. But i failed, because i don't have an UDP Example. I've tried mswinsck.ocx and the code from Nishant. But both looks not very smart for me. Has anybode coded something like that or has a UDP Send via Socket example for me? Marco
-
Hello, i have to debug a service intensively. But it's not possible with normal tools. So i want to write a little C++ Class which uses UDP Socket with one Function Send(CString _somewhat). All the other stuff should be hardcoded. But i failed, because i don't have an UDP Example. I've tried mswinsck.ocx and the code from Nishant. But both looks not very smart for me. Has anybode coded something like that or has a UDP Send via Socket example for me? Marco
Koep wrote: But it's not possible with normal tools. Well, it is possible, but there is a limitation - it is difficult to debug start of the service. Try to put the call to DebugBreak() function to a place where you want to start to debug your service, it must be after startup code and there should not be any communication between your service and SCM after this call. Or, design your service in a way, when you can compile two versions of it - one service version and one application version. Martin -------------------------------------------- C'mon we all know computers are experimental devices and should only be used for playing games. Using them for alternative stuff like business, is clearly not using them for what they are intended. Colin Davies
-
Koep wrote: But it's not possible with normal tools. Well, it is possible, but there is a limitation - it is difficult to debug start of the service. Try to put the call to DebugBreak() function to a place where you want to start to debug your service, it must be after startup code and there should not be any communication between your service and SCM after this call. Or, design your service in a way, when you can compile two versions of it - one service version and one application version. Martin -------------------------------------------- C'mon we all know computers are experimental devices and should only be used for playing games. Using them for alternative stuff like business, is clearly not using them for what they are intended. Colin Davies
Or, design your service in a way, when you can compile two versions of it - one service version and one application version. Thats the way i did it till now. But i use COM Interfaces and have to test all of Addref and Release stuff. Whats happend when DebugBreak() is executed ? I can't get much information from the help. The Service should be running again after the interruption. Marco