[Interest] debug QtService
Sergey
sh0375 at gmail.com
Thu Nov 8 08:13:48 CET 2012
Hello, all
I'm developing windows web service using QtService.
To debug it, I launch program in VS2005 debugger with -e argument.
It starts in console mode and handles requests.
How can I emulate stopping the service, so that all code, which is
working usually when windows stops the service?
I want to make web service method, requesing which I would tell service
to stop.
void RequestMapper::service(HttpRequest& request, HttpResponse& response) {
QByteArray path=request.getPath();
#ifdef _DEBUG
if (path.startsWith("/stop")) {
//QCoreApplication::instance()->exit(); // this leads to error
in HttpConnectionHandler::run() in line:
moveToThread(QCoreApplication::instance()->thread());
How to emulate stopping the service here, so that program, running with
-e argument would stop normally, as it stops when running as windows
service?
}
#endif
}
Thanks!
More information about the Interest
mailing list