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);
Fixes additional test failures observed on my machine.
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/odbccp32/tests/Makefile.in | 3 +++ dlls/odbccp32/tests/odbccp32.manifest | 18 ++++++++++++++++++ dlls/odbccp32/tests/odbccp32.rc | 4 ++++ 3 files changed, 25 insertions(+) create mode 100644 dlls/odbccp32/tests/odbccp32.manifest create mode 100644 dlls/odbccp32/tests/odbccp32.rc
diff --git a/dlls/odbccp32/tests/Makefile.in b/dlls/odbccp32/tests/Makefile.in index 912f511..c65292e 100644 --- a/dlls/odbccp32/tests/Makefile.in +++ b/dlls/odbccp32/tests/Makefile.in @@ -3,3 +3,6 @@ IMPORTS = odbccp32 advapi32
C_SRCS = \ misc.c + +RC_SRCS = \ + odbccp32.rc diff --git a/dlls/odbccp32/tests/odbccp32.manifest b/dlls/odbccp32/tests/odbccp32.manifest new file mode 100644 index 0000000..cd879cc --- /dev/null +++ b/dlls/odbccp32/tests/odbccp32.manifest @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> + <assemblyIdentity + type="win32" + name="Wine.odbccp32.Test" + version="1.0.0.0" + processorArchitecture="*" + /> + <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2"> + <security> + <requestedPrivileges> + <requestedExecutionLevel + level="asInvoker" + /> + </requestedPrivileges> + </security> + </trustInfo> +</assembly> diff --git a/dlls/odbccp32/tests/odbccp32.rc b/dlls/odbccp32/tests/odbccp32.rc new file mode 100644 index 0000000..1e953d2 --- /dev/null +++ b/dlls/odbccp32/tests/odbccp32.rc @@ -0,0 +1,4 @@ +#include "winuser.h" + +/* @makedep: odbccp32.manifest */ +1 RT_MANIFEST odbccp32.manifest