[vlc-devel] [PATCH] contrib: gcrypt: do not use the API via LoadLibrary on winstore builds
Jean-Baptiste Kempf
jb at videolan.org
Tue May 24 15:06:33 CEST 2016
On 24 May, Steve Lhomme wrote :
> ++#include <winapifamily.h>
> ++#if (WINAPI_FAMILY == WINAPI_FAMILY_PC_APP || WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP)
> ++#include <wincrypt.h>
> ++#else
> + /* We don't include wincrypt.h so define it here. */
> + #define HCRYPTPROV HANDLE
> ++#endif
Why not make that if WINNT > 0x501 ?
> ++#if (WINAPI_FAMILY == WINAPI_FAMILY_PC_APP || WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP)
> ++ pCryptAcquireContext = CryptAcquireContext;
> ++ pCryptGenRandom = CryptGenRandom;
> ++ pCryptReleaseContext = CryptReleaseContext;
> ++ pRtlGenRandom = CryptGenRandom;
> ++#else
> + hAdvAPI32 = GetModuleHandle ("AdvAPI32.dll");
> + if (!hAdvAPI32)
> + return;
> +@@ -274,6 +287,7 @@ init_system_rng (void)
> + This isn't exported by name, so we have to get it by ordinal. */
> + pRtlGenRandom = (RTLGENRANDOM)
> + GetProcAddress (hAdvAPI32, "SystemFunction036");
> ++#endif
OK, maybe you cannot with pRtlGenRandom
With my kindest regards,
--
Jean-Baptiste Kempf
http://www.jbkempf.com/ - +33 672 704 734
Sent from my Electronic Device
More information about the vlc-devel
mailing list