Fixes https://bugs.winehq.org/show_bug.cgi?id=45389
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/odbccp32/tests/misc.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/dlls/odbccp32/tests/misc.c b/dlls/odbccp32/tests/misc.c index c12ff49..8a16a9e 100644 --- a/dlls/odbccp32/tests/misc.c +++ b/dlls/odbccp32/tests/misc.c @@ -618,11 +618,19 @@ static void test_SQLGetInstalledDrivers(void) { char buffer[1000], *p; WORD written, len; + BOOL ret, sql_ret; + DWORD error_code; int found = 0; - BOOL ret;
- SQLInstallDriverEx("Wine test\0Driver=test.dll\0\0", NULL, buffer, - sizeof(buffer), &written, ODBC_INSTALL_COMPLETE, NULL); + ret = SQLInstallDriverEx("Wine test\0Driver=test.dll\0\0", NULL, buffer, + sizeof(buffer), &written, ODBC_INSTALL_COMPLETE, NULL); + ok(ret, "SQLInstallDriverEx failed: %d\n", ret); + sql_ret = SQLInstallerErrorW(1, &error_code, NULL, 0, NULL); + if (sql_ret && error_code == ODBC_ERROR_WRITING_SYSINFO_FAILED) + { + skip("not enough privileges\n"); + return; + }
ret = SQLGetInstalledDrivers(NULL, sizeof(buffer), &written); ok(!ret, "got %d\n", ret);