#if defined (PLATFORM_WIN32)
-#include <WinCrypt.h>
+#include <windows.h>
+#include <wincrypt.h>
#ifndef PROV_INTEL_SEC
#define PROV_INTEL_SEC 22
if (!CryptGenRandom (provider, len, buf)) {
CryptReleaseContext (provider, 0);
/* we may have lost our context with CryptoAPI, but all hope isn't lost yet! */
- provider = ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_RngInitialize (NULL);
+ provider = (HCRYPTPROV) ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_RngInitialize (NULL);
if (!CryptGenRandom (provider, len, buf)) {
CryptReleaseContext (provider, 0);
provider = 0;
/* exception will be thrown in managed code */
}
- }
+ }
+ return (gpointer) provider;
}
void