advapi32/service: Set correct error when the service doesn't exist.
This commit is contained in:
parent
b67b66d7b3
commit
07af2fe2b5
|
@ -2352,6 +2352,8 @@ BOOL WINAPI GetServiceDisplayNameW( SC_HANDLE hSCManager, LPCWSTR lpServiceName,
|
|||
SetLastError(ERROR_INSUFFICIENT_BUFFER);
|
||||
*lpcchBuffer = (size / sizeof(WCHAR)) - 1;
|
||||
}
|
||||
else if (ret == ERROR_FILE_NOT_FOUND)
|
||||
SetLastError(ERROR_SERVICE_DOES_NOT_EXIST);
|
||||
else
|
||||
SetLastError(ret);
|
||||
return FALSE;
|
||||
|
|
|
@ -420,7 +420,6 @@ static void test_get_displayname(void)
|
|||
displaysize = -1;
|
||||
ret = GetServiceDisplayNameA(scm_handle, deadbeef, NULL, &displaysize);
|
||||
ok(!ret, "Expected failure\n");
|
||||
todo_wine
|
||||
ok(GetLastError() == ERROR_SERVICE_DOES_NOT_EXIST,
|
||||
"Expected ERROR_SERVICE_DOES_NOT_EXIST, got %d\n", GetLastError());
|
||||
|
||||
|
|
Loading…
Reference in New Issue