http://bugs.winehq.org/show_bug.cgi?id=27177
--- Comment #9 from Alexandex Yastrebov menone7@gmail.com 2011-08-04 20:35:13 CDT --- This code should work incorrectly even in Wine, but it's the same bug, signed int != DWORD.
char* prov = "Microsoft Base Cryptographic Provider v1.0"; DWORD cbProvName = 0xFFFFFFFF; /* -1 See http://source.winehq.org/source/dlls/advapi32/crypt.c#L130 */ DWORD dwProvType; char szProvName[128]; CryptEnumProvidersA(0, NULL, 0, &dwProvType, szProvName, &cbProvName);
ok(!strcmp(szProvName, prov), "expected %s, got %s\n", prov, szProvName);