Oops - mixed two lines.
#ifdef UNICODE
regqueryvalueex = (REGQUERYVALUEEX)
GetProcAddress(advapi,"RegQueryValueExW");
#else
regqueryvalueex = (REGQUERYVALUEEX)
GetProcAddress(advapi,"RegQueryValueExA");
#endif
.. is much better in theory (but works almost as well)
Corrected patch is attached.
Risto
----------------------------------
Hello,
crypto/rand/rand_win.c assumes that function
RegQueryValueEx, exported by advapi32.dll, is linked in
statically.
As advapi32.lib is not linked in it gives build error.
Attached 'diff -w' patch to crypto/rand/rand_win.c tryes to fix the issue.
Tested on WinNT; Win32 API returns ERROR_SUCCESS,
randomness of returned data is not checked.
Best regards,
Risto
rand_win.diff