Please review this. I have no idea about WinRT. I was just trying to fix compiler warning that IBuffer_Release() is undefined.
From c0629e1a2db63f27c722672c7fad39692959e768 Mon Sep 17 00:00:00 2001 From: Biswapriyo Nath <nathbap...@gmail.com> Date: Mon, 1 Feb 2021 15:07:55 +0530 Subject: [PATCH] winstorecompat/Crypto: Use proper namespaced Release method.
Signed-off-by: Biswapriyo Nath <nathbap...@gmail.com> --- mingw-w64-libraries/winstorecompat/src/Crypto.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mingw-w64-libraries/winstorecompat/src/Crypto.c b/mingw-w64-libraries/winstorecompat/src/Crypto.c index c8299a8..dd3a99a 100644 --- a/mingw-w64-libraries/winstorecompat/src/Crypto.c +++ b/mingw-w64-libraries/winstorecompat/src/Crypto.c @@ -35,6 +35,7 @@ #include <windef.h> #include <windows.h> #include <windows.security.cryptography.h> +#include <windows.storage.streams.h> #include <winstring.h> #include <roapi.h> #undef CertOpenSystemStore @@ -93,12 +94,12 @@ BOOL WINAPI CryptGenRandom(HCRYPTPROV phProv, DWORD dwLen, BYTE *pbBuffer) unsigned char *rnd = NULL; hr = __x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics_CopyToByteArray(phProv, buffer, &olength, (BYTE**)&rnd); if (FAILED(hr)) { - IBuffer_Release(buffer); + __x_ABI_CWindows_CStorage_CStreams_CIBuffer_Release(buffer); return FALSE; } memcpy(pbBuffer, rnd, dwLen); - IBuffer_Release(buffer); + __x_ABI_CWindows_CStorage_CStreams_CIBuffer_Release(buffer); return TRUE; } -- 2.30.0
_______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public