int QtService4Win::run() {
SERVICE_TABLE_ENTRYW ServiceTable[]= {
{ ServiceName, (LPSERVICE_MAIN_FUNCTIONW)ServiceMain }, { nullptr, nullptr }
};
if (!StartServiceCtrlDispatcherW(ServiceTable)) {
qCritical() << tr("Error starting the service dispatcher.");
return 1;
}else{
return 0;
}
}
has error .need change
int QtService4Win::run() {
SERVICE_TABLE_ENTRYW ServiceTable[]= {
{ ServiceName, (LPSERVICE_MAIN_FUNCTIONW)ServiceMain }, { nullptr, nullptr }
};
if (!StartServiceCtrlDispatcherW(ServiceTable)) {
qCritical() << tr("Error starting the service dispatcher.");
return 1;
}else{
return 0;
}
}
has error .need change