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.
- /* 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.