svn path=/trunk/; revision=18982
_tprintf(_T("Remote service control is not yet implemented\n"));
return 2;
}
-/*
+
hSCManager = OpenSCManager(MachineName, NULL, SC_MANAGER_ALL_ACCESS);
if (hSCManager == NULL)
{
ReportLastError();
return -1;
}
-*/
+
if (_tcsicmp(Command, _T("query")) == 0)
Query(Args, FALSE);
else if (_tcsicmp(Command, _T("start")) == 0)
{
if (*Args)
- Start(3, Args);
+ Start(0, Args);
else
StartUsage();
}
/* testing */
- printf("service to start - %s\n\n", ServiceName);
- printf("Arguments :\n");
+ _tprintf(_T("service to start - %s\n\n"), ServiceName);
+ _tprintf(_T("Arguments :\n"));
while (*ServiceArgs)
{
printf("%s\n", *ServiceArgs);
ServiceArgs++;
}
+ if (! *ServiceArgs)
+ ServiceArgs = NULL;
/* get a handle to the service requested for starting */
hSc = OpenService(hSCManager, ServiceName, SERVICE_ALL_ACCESS);