Stefan Leichter <Stefan.Leichter(a)camline.com> writes:
> + /* Wait a while. The following test also does a CreateService for the
> + * same servicename and this would result in an ERROR_SERVICE_MARKED_FOR_DELETE
> + * error if we do this to quick. Vista seems more picky then the others.
> + */
> + Sleep(1000);
> +
> + svc_handle1 = CreateServiceA(scm_handle, servicename, NULL, SERVICE_ALL_ACCESS, SERVICE_WIN32_SHARE_PROCESS,
> + SERVICE_DEMAND_START, SERVICE_ERROR_NORMAL, pathname, NULL, NULL, NULL, NULL, NULL);
> + ok(svc_handle1 != NULL, "Could not create the service : %d\n", GetLastError());
> + if (svc_handle1 != NULL) {
> + PSID sidOwner, sidGroup;
> + PACL dacl, sacl;
> + PSECURITY_DESCRIPTOR pSD;
> + HRESULT retval = GetSecurityInfo(svc_handle1,SE_SERVICE,DACL_SECURITY_INFORMATION,&sidOwner,&sidGroup,&dacl,&sacl,&pSD);
> + todo_wine ok(ERROR_SUCCESS == retval, "Expected GetSecurityInfo to succeed: result %d\n",retval);
> + }
You could insert that into one of the other tests that already create a
service, so that we don't need to have too many Sleeps in there.
--
Alexandre Julliard
julliard(a)winehq.org