advapi32/tests: Use skip when OpenSCManagerA is not implemented.
This commit is contained in:
parent
57d2002351
commit
7dd647b633
|
@ -754,8 +754,8 @@ static void test_regconnectregistry( void)
|
||||||
LONG retl;
|
LONG retl;
|
||||||
HKEY hkey;
|
HKEY hkey;
|
||||||
SC_HANDLE schnd;
|
SC_HANDLE schnd;
|
||||||
DWORD GLE;
|
|
||||||
|
|
||||||
|
SetLastError(0xdeadbeef);
|
||||||
ret = GetComputerNameA(compName, &len);
|
ret = GetComputerNameA(compName, &len);
|
||||||
ok( ret, "GetComputerName failed err = %d\n", GetLastError());
|
ok( ret, "GetComputerName failed err = %d\n", GetLastError());
|
||||||
if( !ret) return;
|
if( !ret) return;
|
||||||
|
@ -771,16 +771,20 @@ static void test_regconnectregistry( void)
|
||||||
ok( !retl || retl == ERROR_DLL_INIT_FAILED, "RegConnectRegistryA failed err = %d\n", retl);
|
ok( !retl || retl == ERROR_DLL_INIT_FAILED, "RegConnectRegistryA failed err = %d\n", retl);
|
||||||
if( !retl) RegCloseKey( hkey);
|
if( !retl) RegCloseKey( hkey);
|
||||||
|
|
||||||
|
SetLastError(0xdeadbeef);
|
||||||
schnd = OpenSCManagerA( compName, NULL, GENERIC_READ);
|
schnd = OpenSCManagerA( compName, NULL, GENERIC_READ);
|
||||||
GLE = GetLastError();
|
if (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
|
||||||
ok( schnd != NULL || GLE==ERROR_CALL_NOT_IMPLEMENTED,
|
{
|
||||||
"OpenSCManagerA failed err = %d\n", GLE);
|
skip("OpenSCManagerA is not implemented\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
ok( schnd != NULL, "OpenSCManagerA failed err = %d\n", GetLastError());
|
||||||
CloseServiceHandle( schnd);
|
CloseServiceHandle( schnd);
|
||||||
|
|
||||||
|
SetLastError(0xdeadbeef);
|
||||||
schnd = OpenSCManagerA( netwName, NULL, GENERIC_READ);
|
schnd = OpenSCManagerA( netwName, NULL, GENERIC_READ);
|
||||||
GLE = GetLastError();
|
ok( schnd != NULL, "OpenSCManagerA failed err = %d\n", GetLastError());
|
||||||
ok( schnd != NULL || GLE==ERROR_CALL_NOT_IMPLEMENTED,
|
|
||||||
"OpenSCManagerA failed err = %d\n", GLE);
|
|
||||||
CloseServiceHandle( schnd);
|
CloseServiceHandle( schnd);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue