Hi,
I use QtService and QtServiceController classes.
To start the service I use the function start() of QtServiceController and it runs without problem with visual studio 2008.
The problem is with Visual Studio 2010. The lpServiceController->start() doesn't run.
bool QtServiceController::start(const QStringList &args)
{
Q_D(QtServiceController);
bool result = false;
if (!winServiceInit())
return result;
// Open the Service Control Manager
SC_HANDLE hSCM = pOpenSCManager(0, 0, SC_MANAGER_CONNECT);
if (hSCM) {
// Try to open the service
SC_HANDLE hService = pOpenService(hSCM,(wchar_t *)d->serviceName.utf16(), SERVICE_START);
....
hService in Visual Studio 2010 is null, in 2008 is ok.
Suggestions?
Thanks
Teo
Bookmarks