Hi Alexandre,
On Oct 9, 2019, at 1:00 AM, Alexandre Julliard julliard@winehq.org wrote:
Brendan Shanks bshanks@codeweavers.com writes:
- /* Only run tests on Win7/2008R2 (NT 6.1) and newer. The LoadLibrary calls fail on Vista/2008. */
- memset(&info, 0, sizeof(info));
- info.dwOSVersionInfoSize = sizeof(info);
- info.dwMajorVersion = 6;
- info.dwMinorVersion = 1;
- if (VerifyVersionInfoA(&info, VER_MAJORVERSION|VER_MINORVERSION|VER_SERVICEPACKMAJOR,
VerSetConditionMask(VerSetConditionMask(VerSetConditionMask(0,
VER_MAJORVERSION,VER_GREATER_EQUAL),
VER_MINORVERSION,VER_GREATER_EQUAL),
VER_SERVICEPACKMAJOR,VER_GREATER_EQUAL)) == 0)
return;
Please don't do version checks in tests. You can mark results as broken instead.
Thanks, will do.
- /* Use system libraries that shouldn't already be loaded in this process. */
- lib = LoadLibraryExA("bcrypt.dll", NULL, 0);
- todo_wine ok (lib != NULL, "Loading bcrypt.dll should succeed with WOW64 redirection disabled\n");
- if (lib) FreeLibrary(lib);
It would be good to confirm that it wasn't previously loaded, using GetModuleHandle(). Also testing the loaded module path with GetModuleFileNameA() may be interesting.
On Windows 10, the module path returned is “c:\windows\system32\bcrypt.dll”, i.e. what you would expect with redirection enabled. If I free the library and then re-load it using that absolute path, it succeeds. It almost seems like Windows is ignoring redirection being disabled. I’ll send another rev of the patch.
Brendan