widl needs to be helped to find the IBuffer class.
The enum values need to be defined without the typedef.

It's now matching the type names of MSVC. So winstorecompat needs to be
updated to match the new names.

Generated with:
x86_64-w64-mingw32-widl -DBOOL=WINBOOL -I. -I../build/crt -I../crt -h -o 
windows.security.cryptography.h windows.security.cryptography.idl
---
 .../include/windows.security.cryptography.h   | 347 +++++++++++-------
 .../include/windows.security.cryptography.idl |   8 +-
 .../winstorecompat/src/Crypto.c               |  12 +-
 3 files changed, 215 insertions(+), 152 deletions(-)

diff --git a/mingw-w64-headers/include/windows.security.cryptography.h 
b/mingw-w64-headers/include/windows.security.cryptography.h
index 5a4c7c72..78c71c87 100644
--- a/mingw-w64-headers/include/windows.security.cryptography.h
+++ b/mingw-w64-headers/include/windows.security.cryptography.h
@@ -1,11 +1,12 @@
-/*** Autogenerated by WIDL 1.5.31 from 
include/windows.security.cryptography.idl - Do not edit ***/
+/*** Autogenerated by WIDL 6.0-rc1 from 
include/windows.security.cryptography.idl - Do not edit ***/
 
+#ifdef _WIN32
 #ifndef __REQUIRED_RPCNDR_H_VERSION__
 #define __REQUIRED_RPCNDR_H_VERSION__ 475
 #endif
-
 #include <rpc.h>
 #include <rpcndr.h>
+#endif
 
 #ifndef COM_NO_WINDOWS_H
 #include <windows.h>
@@ -17,9 +18,20 @@
 
 /* Forward declarations */
 
-#ifndef __ICryptographicBufferStatics_FWD_DEFINED__
-#define __ICryptographicBufferStatics_FWD_DEFINED__
-typedef interface ICryptographicBufferStatics ICryptographicBufferStatics;
+#ifndef 
____x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics_FWD_DEFINED__
+#define 
____x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics_FWD_DEFINED__
+typedef interface 
__x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics 
__x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics;
+#ifdef __cplusplus
+namespace ABI {
+    namespace Windows {
+        namespace Security {
+            namespace Cryptography {
+                interface ICryptographicBufferStatics;
+            }
+        }
+    }
+}
+#endif /* __cplusplus */
 #endif
 
 /* Headers for imported files */
@@ -31,257 +43,308 @@ typedef interface ICryptographicBufferStatics 
ICryptographicBufferStatics;
 extern "C" {
 #endif
 
-#ifndef __IBuffer_FWD_DEFINED__
-#define __IBuffer_FWD_DEFINED__
-typedef interface IBuffer IBuffer;
+#ifndef ____x_ABI_CWindows_CStorage_CStreams_CIBuffer_FWD_DEFINED__
+#define ____x_ABI_CWindows_CStorage_CStreams_CIBuffer_FWD_DEFINED__
+typedef interface __x_ABI_CWindows_CStorage_CStreams_CIBuffer 
__x_ABI_CWindows_CStorage_CStreams_CIBuffer;
+#ifdef __cplusplus
+namespace ABI {
+    namespace Windows {
+        namespace Storage {
+            namespace Streams {
+                interface IBuffer;
+            }
+        }
+    }
+}
+#endif /* __cplusplus */
 #endif
 
-#ifndef __ICryptographicBufferStatics_FWD_DEFINED__
-#define __ICryptographicBufferStatics_FWD_DEFINED__
-typedef interface ICryptographicBufferStatics ICryptographicBufferStatics;
+#ifndef 
____x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics_FWD_DEFINED__
+#define 
____x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics_FWD_DEFINED__
+typedef interface 
__x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics 
__x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics;
+#ifdef __cplusplus
+namespace ABI {
+    namespace Windows {
+        namespace Security {
+            namespace Cryptography {
+                interface ICryptographicBufferStatics;
+            }
+        }
+    }
+}
+#endif /* __cplusplus */
 #endif
 
-enum BinaryStringEncoding;
+#ifdef __cplusplus
+} /* extern "C" */
+namespace ABI {
+    namespace Windows {
+        namespace Security {
+            namespace Cryptography {
+                enum BinaryStringEncoding {
+                    BinaryStringEncoding_Utf8 = 0,
+                    BinaryStringEncoding_Utf16LE = 1,
+                    BinaryStringEncoding_Utf16BE = 2
+                };
+            }
+        }
+    }
+}
+extern "C" {
+#else
+enum __x_ABI_CWindows_CSecurity_CCryptography_CBinaryStringEncoding {
+    BinaryStringEncoding_Utf8 = 0,
+    BinaryStringEncoding_Utf16LE = 1,
+    BinaryStringEncoding_Utf16BE = 2
+};
+#endif
 
-typedef enum BinaryStringEncoding {
-    Utf8 = 0,
-    Utf16LE = 1,
-    Utf16BE = 2
-} BinaryStringEncoding;
 /*****************************************************************************
  * ICryptographicBufferStatics interface
+ *
  */
-#ifndef __ICryptographicBufferStatics_INTERFACE_DEFINED__
-#define __ICryptographicBufferStatics_INTERFACE_DEFINED__
+#ifndef 
____x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics_INTERFACE_DEFINED__
+#define 
____x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics_INTERFACE_DEFINED__
 
-DEFINE_GUID(IID_ICryptographicBufferStatics, 0x320b7e22, 0x3cb0, 0x4cdf, 
0x86,0x63, 0x1d,0x28,0x91,0x00,0x65,0xeb);
+DEFINE_GUID(IID___x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics,
 0x320b7e22, 0x3cb0, 0x4cdf, 0x86,0x63, 0x1d,0x28,0x91,0x00,0x65,0xeb);
 #if defined(__cplusplus) && !defined(CINTERFACE)
-MIDL_INTERFACE("320b7e22-3cb0-4cdf-8663-1d28910065eb")
-ICryptographicBufferStatics : public IInspectable
-{
-    virtual HRESULT STDMETHODCALLTYPE Compare(
-        IBuffer *object1,
-        IBuffer *object2,
-        boolean *isEqual) = 0;
-
-    virtual HRESULT STDMETHODCALLTYPE GenerateRandom(
-        UINT32 length,
-        IBuffer **buffer) = 0;
-
-    virtual HRESULT STDMETHODCALLTYPE GenerateRandomNumber(
-        UINT32 *value) = 0;
-
-    virtual HRESULT STDMETHODCALLTYPE CreateFromByteArray(
-        UINT32 __valueSize,
-        BYTE *value,
-        IBuffer **buffer) = 0;
-
-    virtual HRESULT STDMETHODCALLTYPE CopyToByteArray(
-        IBuffer *buffer,
-        UINT32 *__valueSize,
-        BYTE **value) = 0;
-
-    virtual HRESULT STDMETHODCALLTYPE DecodeFromHexString(
-        HSTRING value,
-        IBuffer **buffer) = 0;
-
-    virtual HRESULT STDMETHODCALLTYPE EncodeToHexString(
-        IBuffer *buffer,
-        HSTRING *value) = 0;
-
-    virtual HRESULT STDMETHODCALLTYPE DecodeFromBase64String(
-        HSTRING value,
-        IBuffer **buffer) = 0;
-
-    virtual HRESULT STDMETHODCALLTYPE EncodeToBase64String(
-        IBuffer *buffer,
-        HSTRING *value) = 0;
-
-    virtual HRESULT STDMETHODCALLTYPE ConvertStringToBinary(
-        HSTRING value,
-        BinaryStringEncoding encoding,
-        IBuffer **buffer) = 0;
-
-    virtual HRESULT STDMETHODCALLTYPE ConvertBinaryToString(
-        BinaryStringEncoding encoding,
-        IBuffer *buffer,
-        HSTRING *value) = 0;
-
-};
+} /* extern "C" */
+namespace ABI {
+    namespace Windows {
+        namespace Security {
+            namespace Cryptography {
+                MIDL_INTERFACE("320b7e22-3cb0-4cdf-8663-1d28910065eb")
+                ICryptographicBufferStatics : public IInspectable
+                {
+                    virtual HRESULT STDMETHODCALLTYPE Compare(
+                        IBuffer *object1,
+                        IBuffer *object2,
+                        boolean *isEqual) = 0;
+
+                    virtual HRESULT STDMETHODCALLTYPE GenerateRandom(
+                        UINT32 length,
+                        IBuffer **buffer) = 0;
+
+                    virtual HRESULT STDMETHODCALLTYPE GenerateRandomNumber(
+                        UINT32 *value) = 0;
+
+                    virtual HRESULT STDMETHODCALLTYPE CreateFromByteArray(
+                        UINT32 __valueSize,
+                        BYTE *value,
+                        IBuffer **buffer) = 0;
+
+                    virtual HRESULT STDMETHODCALLTYPE CopyToByteArray(
+                        IBuffer *buffer,
+                        UINT32 *__valueSize,
+                        BYTE **value) = 0;
+
+                    virtual HRESULT STDMETHODCALLTYPE DecodeFromHexString(
+                        HSTRING value,
+                        IBuffer **buffer) = 0;
+
+                    virtual HRESULT STDMETHODCALLTYPE EncodeToHexString(
+                        IBuffer *buffer,
+                        HSTRING *value) = 0;
+
+                    virtual HRESULT STDMETHODCALLTYPE DecodeFromBase64String(
+                        HSTRING value,
+                        IBuffer **buffer) = 0;
+
+                    virtual HRESULT STDMETHODCALLTYPE EncodeToBase64String(
+                        IBuffer *buffer,
+                        HSTRING *value) = 0;
+
+                    virtual HRESULT STDMETHODCALLTYPE ConvertStringToBinary(
+                        HSTRING value,
+                        enum BinaryStringEncoding encoding,
+                        IBuffer **buffer) = 0;
+
+                    virtual HRESULT STDMETHODCALLTYPE ConvertBinaryToString(
+                        enum BinaryStringEncoding encoding,
+                        IBuffer *buffer,
+                        HSTRING *value) = 0;
+
+                };
+            }
+        }
+    }
+}
+extern "C" {
 #ifdef __CRT_UUID_DECL
-__CRT_UUID_DECL(ICryptographicBufferStatics, 0x320b7e22, 0x3cb0, 0x4cdf, 
0x86,0x63, 0x1d,0x28,0x91,0x00,0x65,0xeb)
+__CRT_UUID_DECL(ABI::Windows::Security::Cryptography::ICryptographicBufferStatics,
 0x320b7e22, 0x3cb0, 0x4cdf, 0x86,0x63, 0x1d,0x28,0x91,0x00,0x65,0xeb)
 #endif
 #else
-typedef struct ICryptographicBufferStaticsVtbl {
+typedef struct 
__x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStaticsVtbl {
     BEGIN_INTERFACE
 
     /*** IUnknown methods ***/
     HRESULT (STDMETHODCALLTYPE *QueryInterface)(
-        ICryptographicBufferStatics* This,
+        __x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics 
*This,
         REFIID riid,
         void **ppvObject);
 
     ULONG (STDMETHODCALLTYPE *AddRef)(
-        ICryptographicBufferStatics* This);
+        __x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics 
*This);
 
     ULONG (STDMETHODCALLTYPE *Release)(
-        ICryptographicBufferStatics* This);
+        __x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics 
*This);
 
     /*** IInspectable methods ***/
     HRESULT (STDMETHODCALLTYPE *GetIids)(
-        ICryptographicBufferStatics* This,
+        __x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics 
*This,
         ULONG *iidCount,
         IID **iids);
 
     HRESULT (STDMETHODCALLTYPE *GetRuntimeClassName)(
-        ICryptographicBufferStatics* This,
+        __x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics 
*This,
         HSTRING *className);
 
     HRESULT (STDMETHODCALLTYPE *GetTrustLevel)(
-        ICryptographicBufferStatics* This,
+        __x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics 
*This,
         TrustLevel *trustLevel);
 
     /*** ICryptographicBufferStatics methods ***/
     HRESULT (STDMETHODCALLTYPE *Compare)(
-        ICryptographicBufferStatics* This,
-        IBuffer *object1,
-        IBuffer *object2,
+        __x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics 
*This,
+        __x_ABI_CWindows_CStorage_CStreams_CIBuffer *object1,
+        __x_ABI_CWindows_CStorage_CStreams_CIBuffer *object2,
         boolean *isEqual);
 
     HRESULT (STDMETHODCALLTYPE *GenerateRandom)(
-        ICryptographicBufferStatics* This,
+        __x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics 
*This,
         UINT32 length,
-        IBuffer **buffer);
+        __x_ABI_CWindows_CStorage_CStreams_CIBuffer **buffer);
 
     HRESULT (STDMETHODCALLTYPE *GenerateRandomNumber)(
-        ICryptographicBufferStatics* This,
+        __x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics 
*This,
         UINT32 *value);
 
     HRESULT (STDMETHODCALLTYPE *CreateFromByteArray)(
-        ICryptographicBufferStatics* This,
+        __x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics 
*This,
         UINT32 __valueSize,
         BYTE *value,
-        IBuffer **buffer);
+        __x_ABI_CWindows_CStorage_CStreams_CIBuffer **buffer);
 
     HRESULT (STDMETHODCALLTYPE *CopyToByteArray)(
-        ICryptographicBufferStatics* This,
-        IBuffer *buffer,
+        __x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics 
*This,
+        __x_ABI_CWindows_CStorage_CStreams_CIBuffer *buffer,
         UINT32 *__valueSize,
         BYTE **value);
 
     HRESULT (STDMETHODCALLTYPE *DecodeFromHexString)(
-        ICryptographicBufferStatics* This,
+        __x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics 
*This,
         HSTRING value,
-        IBuffer **buffer);
+        __x_ABI_CWindows_CStorage_CStreams_CIBuffer **buffer);
 
     HRESULT (STDMETHODCALLTYPE *EncodeToHexString)(
-        ICryptographicBufferStatics* This,
-        IBuffer *buffer,
+        __x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics 
*This,
+        __x_ABI_CWindows_CStorage_CStreams_CIBuffer *buffer,
         HSTRING *value);
 
     HRESULT (STDMETHODCALLTYPE *DecodeFromBase64String)(
-        ICryptographicBufferStatics* This,
+        __x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics 
*This,
         HSTRING value,
-        IBuffer **buffer);
+        __x_ABI_CWindows_CStorage_CStreams_CIBuffer **buffer);
 
     HRESULT (STDMETHODCALLTYPE *EncodeToBase64String)(
-        ICryptographicBufferStatics* This,
-        IBuffer *buffer,
+        __x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics 
*This,
+        __x_ABI_CWindows_CStorage_CStreams_CIBuffer *buffer,
         HSTRING *value);
 
     HRESULT (STDMETHODCALLTYPE *ConvertStringToBinary)(
-        ICryptographicBufferStatics* This,
+        __x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics 
*This,
         HSTRING value,
-        BinaryStringEncoding encoding,
-        IBuffer **buffer);
+        enum __x_ABI_CWindows_CSecurity_CCryptography_CBinaryStringEncoding 
encoding,
+        __x_ABI_CWindows_CStorage_CStreams_CIBuffer **buffer);
 
     HRESULT (STDMETHODCALLTYPE *ConvertBinaryToString)(
-        ICryptographicBufferStatics* This,
-        BinaryStringEncoding encoding,
-        IBuffer *buffer,
+        __x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics 
*This,
+        enum __x_ABI_CWindows_CSecurity_CCryptography_CBinaryStringEncoding 
encoding,
+        __x_ABI_CWindows_CStorage_CStreams_CIBuffer *buffer,
         HSTRING *value);
 
     END_INTERFACE
-} ICryptographicBufferStaticsVtbl;
-interface ICryptographicBufferStatics {
-    CONST_VTBL ICryptographicBufferStaticsVtbl* lpVtbl;
+} __x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStaticsVtbl;
+
+interface 
__x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics {
+    CONST_VTBL 
__x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStaticsVtbl* 
lpVtbl;
 };
 
 #ifdef COBJMACROS
 #ifndef WIDL_C_INLINE_WRAPPERS
 /*** IUnknown methods ***/
-#define ICryptographicBufferStatics_QueryInterface(This,riid,ppvObject) 
(This)->lpVtbl->QueryInterface(This,riid,ppvObject)
-#define ICryptographicBufferStatics_AddRef(This) (This)->lpVtbl->AddRef(This)
-#define ICryptographicBufferStatics_Release(This) (This)->lpVtbl->Release(This)
+#define 
__x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics_QueryInterface(This,riid,ppvObject)
 (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
+#define 
__x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics_AddRef(This)
 (This)->lpVtbl->AddRef(This)
+#define 
__x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics_Release(This)
 (This)->lpVtbl->Release(This)
 /*** IInspectable methods ***/
-#define ICryptographicBufferStatics_GetIids(This,iidCount,iids) 
(This)->lpVtbl->GetIids(This,iidCount,iids)
-#define ICryptographicBufferStatics_GetRuntimeClassName(This,className) 
(This)->lpVtbl->GetRuntimeClassName(This,className)
-#define ICryptographicBufferStatics_GetTrustLevel(This,trustLevel) 
(This)->lpVtbl->GetTrustLevel(This,trustLevel)
+#define 
__x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics_GetIids(This,iidCount,iids)
 (This)->lpVtbl->GetIids(This,iidCount,iids)
+#define 
__x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics_GetRuntimeClassName(This,className)
 (This)->lpVtbl->GetRuntimeClassName(This,className)
+#define 
__x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics_GetTrustLevel(This,trustLevel)
 (This)->lpVtbl->GetTrustLevel(This,trustLevel)
 /*** ICryptographicBufferStatics methods ***/
-#define ICryptographicBufferStatics_Compare(This,object1,object2,isEqual) 
(This)->lpVtbl->Compare(This,object1,object2,isEqual)
-#define ICryptographicBufferStatics_GenerateRandom(This,length,buffer) 
(This)->lpVtbl->GenerateRandom(This,length,buffer)
-#define ICryptographicBufferStatics_GenerateRandomNumber(This,value) 
(This)->lpVtbl->GenerateRandomNumber(This,value)
-#define 
ICryptographicBufferStatics_CreateFromByteArray(This,__valueSize,value,buffer) 
(This)->lpVtbl->CreateFromByteArray(This,__valueSize,value,buffer)
-#define 
ICryptographicBufferStatics_CopyToByteArray(This,buffer,__valueSize,value) 
(This)->lpVtbl->CopyToByteArray(This,buffer,__valueSize,value)
-#define ICryptographicBufferStatics_DecodeFromHexString(This,value,buffer) 
(This)->lpVtbl->DecodeFromHexString(This,value,buffer)
-#define ICryptographicBufferStatics_EncodeToHexString(This,buffer,value) 
(This)->lpVtbl->EncodeToHexString(This,buffer,value)
-#define ICryptographicBufferStatics_DecodeFromBase64String(This,value,buffer) 
(This)->lpVtbl->DecodeFromBase64String(This,value,buffer)
-#define ICryptographicBufferStatics_EncodeToBase64String(This,buffer,value) 
(This)->lpVtbl->EncodeToBase64String(This,buffer,value)
-#define 
ICryptographicBufferStatics_ConvertStringToBinary(This,value,encoding,buffer) 
(This)->lpVtbl->ConvertStringToBinary(This,value,encoding,buffer)
-#define 
ICryptographicBufferStatics_ConvertBinaryToString(This,encoding,buffer,value) 
(This)->lpVtbl->ConvertBinaryToString(This,encoding,buffer,value)
+#define 
__x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics_Compare(This,object1,object2,isEqual)
 (This)->lpVtbl->Compare(This,object1,object2,isEqual)
+#define 
__x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics_GenerateRandom(This,length,buffer)
 (This)->lpVtbl->GenerateRandom(This,length,buffer)
+#define 
__x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics_GenerateRandomNumber(This,value)
 (This)->lpVtbl->GenerateRandomNumber(This,value)
+#define 
__x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics_CreateFromByteArray(This,__valueSize,value,buffer)
 (This)->lpVtbl->CreateFromByteArray(This,__valueSize,value,buffer)
+#define 
__x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics_CopyToByteArray(This,buffer,__valueSize,value)
 (This)->lpVtbl->CopyToByteArray(This,buffer,__valueSize,value)
+#define 
__x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics_DecodeFromHexString(This,value,buffer)
 (This)->lpVtbl->DecodeFromHexString(This,value,buffer)
+#define 
__x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics_EncodeToHexString(This,buffer,value)
 (This)->lpVtbl->EncodeToHexString(This,buffer,value)
+#define 
__x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics_DecodeFromBase64String(This,value,buffer)
 (This)->lpVtbl->DecodeFromBase64String(This,value,buffer)
+#define 
__x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics_EncodeToBase64String(This,buffer,value)
 (This)->lpVtbl->EncodeToBase64String(This,buffer,value)
+#define 
__x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics_ConvertStringToBinary(This,value,encoding,buffer)
 (This)->lpVtbl->ConvertStringToBinary(This,value,encoding,buffer)
+#define 
__x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics_ConvertBinaryToString(This,encoding,buffer,value)
 (This)->lpVtbl->ConvertBinaryToString(This,encoding,buffer,value)
 #else
 /*** IUnknown methods ***/
-static FORCEINLINE HRESULT 
ICryptographicBufferStatics_QueryInterface(ICryptographicBufferStatics* 
This,REFIID riid,void **ppvObject) {
+static FORCEINLINE HRESULT 
__x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics_QueryInterface(__x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics*
 This,REFIID riid,void **ppvObject) {
     return This->lpVtbl->QueryInterface(This,riid,ppvObject);
 }
-static FORCEINLINE ULONG 
ICryptographicBufferStatics_AddRef(ICryptographicBufferStatics* This) {
+static FORCEINLINE ULONG 
__x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics_AddRef(__x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics*
 This) {
     return This->lpVtbl->AddRef(This);
 }
-static FORCEINLINE ULONG 
ICryptographicBufferStatics_Release(ICryptographicBufferStatics* This) {
+static FORCEINLINE ULONG 
__x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics_Release(__x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics*
 This) {
     return This->lpVtbl->Release(This);
 }
 /*** IInspectable methods ***/
-static FORCEINLINE HRESULT 
ICryptographicBufferStatics_GetIids(ICryptographicBufferStatics* This,ULONG 
*iidCount,IID **iids) {
+static FORCEINLINE HRESULT 
__x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics_GetIids(__x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics*
 This,ULONG *iidCount,IID **iids) {
     return This->lpVtbl->GetIids(This,iidCount,iids);
 }
-static FORCEINLINE HRESULT 
ICryptographicBufferStatics_GetRuntimeClassName(ICryptographicBufferStatics* 
This,HSTRING *className) {
+static FORCEINLINE HRESULT 
__x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics_GetRuntimeClassName(__x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics*
 This,HSTRING *className) {
     return This->lpVtbl->GetRuntimeClassName(This,className);
 }
-static FORCEINLINE HRESULT 
ICryptographicBufferStatics_GetTrustLevel(ICryptographicBufferStatics* 
This,TrustLevel *trustLevel) {
+static FORCEINLINE HRESULT 
__x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics_GetTrustLevel(__x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics*
 This,TrustLevel *trustLevel) {
     return This->lpVtbl->GetTrustLevel(This,trustLevel);
 }
 /*** ICryptographicBufferStatics methods ***/
-static FORCEINLINE HRESULT 
ICryptographicBufferStatics_Compare(ICryptographicBufferStatics* This,IBuffer 
*object1,IBuffer *object2,boolean *isEqual) {
+static FORCEINLINE HRESULT 
__x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics_Compare(__x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics*
 This,__x_ABI_CWindows_CStorage_CStreams_CIBuffer 
*object1,__x_ABI_CWindows_CStorage_CStreams_CIBuffer *object2,boolean *isEqual) 
{
     return This->lpVtbl->Compare(This,object1,object2,isEqual);
 }
-static FORCEINLINE HRESULT 
ICryptographicBufferStatics_GenerateRandom(ICryptographicBufferStatics* 
This,UINT32 length,IBuffer **buffer) {
+static FORCEINLINE HRESULT 
__x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics_GenerateRandom(__x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics*
 This,UINT32 length,__x_ABI_CWindows_CStorage_CStreams_CIBuffer **buffer) {
     return This->lpVtbl->GenerateRandom(This,length,buffer);
 }
-static FORCEINLINE HRESULT 
ICryptographicBufferStatics_GenerateRandomNumber(ICryptographicBufferStatics* 
This,UINT32 *value) {
+static FORCEINLINE HRESULT 
__x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics_GenerateRandomNumber(__x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics*
 This,UINT32 *value) {
     return This->lpVtbl->GenerateRandomNumber(This,value);
 }
-static FORCEINLINE HRESULT 
ICryptographicBufferStatics_CreateFromByteArray(ICryptographicBufferStatics* 
This,UINT32 __valueSize,BYTE *value,IBuffer **buffer) {
+static FORCEINLINE HRESULT 
__x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics_CreateFromByteArray(__x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics*
 This,UINT32 __valueSize,BYTE 
*value,__x_ABI_CWindows_CStorage_CStreams_CIBuffer **buffer) {
     return This->lpVtbl->CreateFromByteArray(This,__valueSize,value,buffer);
 }
-static FORCEINLINE HRESULT 
ICryptographicBufferStatics_CopyToByteArray(ICryptographicBufferStatics* 
This,IBuffer *buffer,UINT32 *__valueSize,BYTE **value) {
+static FORCEINLINE HRESULT 
__x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics_CopyToByteArray(__x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics*
 This,__x_ABI_CWindows_CStorage_CStreams_CIBuffer *buffer,UINT32 
*__valueSize,BYTE **value) {
     return This->lpVtbl->CopyToByteArray(This,buffer,__valueSize,value);
 }
-static FORCEINLINE HRESULT 
ICryptographicBufferStatics_DecodeFromHexString(ICryptographicBufferStatics* 
This,HSTRING value,IBuffer **buffer) {
+static FORCEINLINE HRESULT 
__x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics_DecodeFromHexString(__x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics*
 This,HSTRING value,__x_ABI_CWindows_CStorage_CStreams_CIBuffer **buffer) {
     return This->lpVtbl->DecodeFromHexString(This,value,buffer);
 }
-static FORCEINLINE HRESULT 
ICryptographicBufferStatics_EncodeToHexString(ICryptographicBufferStatics* 
This,IBuffer *buffer,HSTRING *value) {
+static FORCEINLINE HRESULT 
__x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics_EncodeToHexString(__x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics*
 This,__x_ABI_CWindows_CStorage_CStreams_CIBuffer *buffer,HSTRING *value) {
     return This->lpVtbl->EncodeToHexString(This,buffer,value);
 }
-static FORCEINLINE HRESULT 
ICryptographicBufferStatics_DecodeFromBase64String(ICryptographicBufferStatics* 
This,HSTRING value,IBuffer **buffer) {
+static FORCEINLINE HRESULT 
__x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics_DecodeFromBase64String(__x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics*
 This,HSTRING value,__x_ABI_CWindows_CStorage_CStreams_CIBuffer **buffer) {
     return This->lpVtbl->DecodeFromBase64String(This,value,buffer);
 }
-static FORCEINLINE HRESULT 
ICryptographicBufferStatics_EncodeToBase64String(ICryptographicBufferStatics* 
This,IBuffer *buffer,HSTRING *value) {
+static FORCEINLINE HRESULT 
__x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics_EncodeToBase64String(__x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics*
 This,__x_ABI_CWindows_CStorage_CStreams_CIBuffer *buffer,HSTRING *value) {
     return This->lpVtbl->EncodeToBase64String(This,buffer,value);
 }
-static FORCEINLINE HRESULT 
ICryptographicBufferStatics_ConvertStringToBinary(ICryptographicBufferStatics* 
This,HSTRING value,BinaryStringEncoding encoding,IBuffer **buffer) {
+static FORCEINLINE HRESULT 
__x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics_ConvertStringToBinary(__x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics*
 This,HSTRING value,enum 
__x_ABI_CWindows_CSecurity_CCryptography_CBinaryStringEncoding 
encoding,__x_ABI_CWindows_CStorage_CStreams_CIBuffer **buffer) {
     return This->lpVtbl->ConvertStringToBinary(This,value,encoding,buffer);
 }
-static FORCEINLINE HRESULT 
ICryptographicBufferStatics_ConvertBinaryToString(ICryptographicBufferStatics* 
This,BinaryStringEncoding encoding,IBuffer *buffer,HSTRING *value) {
+static FORCEINLINE HRESULT 
__x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics_ConvertBinaryToString(__x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics*
 This,enum __x_ABI_CWindows_CSecurity_CCryptography_CBinaryStringEncoding 
encoding,__x_ABI_CWindows_CStorage_CStreams_CIBuffer *buffer,HSTRING *value) {
     return This->lpVtbl->ConvertBinaryToString(This,encoding,buffer,value);
 }
 #endif
@@ -289,7 +352,7 @@ static FORCEINLINE HRESULT 
ICryptographicBufferStatics_ConvertBinaryToString(ICr
 
 #endif
 
-#endif  /* __ICryptographicBufferStatics_INTERFACE_DEFINED__ */
+#endif  /* 
____x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics_INTERFACE_DEFINED__
 */
 
 /* Begin additional prototypes for all interfaces */
 
diff --git a/mingw-w64-headers/include/windows.security.cryptography.idl 
b/mingw-w64-headers/include/windows.security.cryptography.idl
index 3defa16b..7032a815 100644
--- a/mingw-w64-headers/include/windows.security.cryptography.idl
+++ b/mingw-w64-headers/include/windows.security.cryptography.idl
@@ -23,7 +23,7 @@ namespace Windows {
   namespace Security {
     namespace Cryptography {
       interface ICryptographicBufferStatics;
-      enum BinaryStringEncoding;
+      typedef enum BinaryStringEncoding BinaryStringEncoding;
     }
   }
 }
@@ -31,15 +31,15 @@ namespace Windows {
 namespace Windows {
   namespace Security {
     namespace Cryptography {
-      typedef enum BinaryStringEncoding {
+      enum BinaryStringEncoding {
         Utf8,
         Utf16LE,
         Utf16BE
-      } BinaryStringEncoding;
+      };
 
       [uuid(320B7E22-3CB0-4CDF-8663-1D28910065EB)]
       interface ICryptographicBufferStatics : IInspectable {
-        HRESULT Compare(IBuffer* object1, IBuffer* object2, boolean* isEqual);
+        HRESULT Compare(Windows.Storage.Streams.IBuffer* object1, IBuffer* 
object2, boolean* isEqual);
         HRESULT GenerateRandom(UINT32 length, IBuffer** buffer);
         HRESULT GenerateRandomNumber(UINT32* value);
         HRESULT CreateFromByteArray(UINT32 __valueSize, BYTE* value,IBuffer** 
buffer);
diff --git a/mingw-w64-libraries/winstorecompat/src/Crypto.c 
b/mingw-w64-libraries/winstorecompat/src/Crypto.c
index 2c3c218a..f19938ff 100644
--- a/mingw-w64-libraries/winstorecompat/src/Crypto.c
+++ b/mingw-w64-libraries/winstorecompat/src/Crypto.c
@@ -43,7 +43,7 @@
 #undef CryptAcquireContextA
 #undef CryptAcquireContextW
 
-#define HCRYPTPROV ICryptographicBufferStatics *
+#define HCRYPTPROV 
__x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics*
 
 BOOL WINAPI CryptAcquireContextW(HCRYPTPROV *phProv, LPCTSTR pszContainer, 
LPCTSTR pszProvider, DWORD dwProvType, DWORD dwFlags)
 {
@@ -58,8 +58,8 @@ BOOL WINAPI CryptAcquireContextW(HCRYPTPROV *phProv, LPCTSTR 
pszContainer, LPCTS
         return FALSE;
     }
 
-    ICryptographicBufferStatics *cryptoStatics = NULL;
-    hr = RoGetActivationFactory(hClassName, &IID_ICryptographicBufferStatics, 
(void**)&cryptoStatics);
+    __x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics 
*cryptoStatics = NULL;
+    hr = RoGetActivationFactory(hClassName, 
&IID___x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics, 
(void**)&cryptoStatics);
     WindowsDeleteString(hClassName);
 
     if (FAILED(hr))
@@ -77,21 +77,21 @@ BOOL WINAPI CryptAcquireContextA(HCRYPTPROV *phProv, 
LPCTSTR pszContainer, LPCTS
 
 BOOL WINAPI CryptReleaseContext(HCRYPTPROV phProv, DWORD dwFlags)
 {
-    HRESULT hr = ICryptographicBufferStatics_Release(phProv);
+    HRESULT hr = 
__x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics_Release(phProv);
     return SUCCEEDED(hr) && dwFlags==0;
 }
 
 BOOL WINAPI CryptGenRandom(HCRYPTPROV phProv, DWORD dwLen, BYTE *pbBuffer)
 {
     IBuffer *buffer = NULL;
-    HRESULT hr = ICryptographicBufferStatics_GenerateRandom(phProv, dwLen, 
&buffer);
+    HRESULT hr = 
__x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics_GenerateRandom(phProv,
 dwLen, &buffer);
     if (FAILED(hr)) {
         return FALSE;
     }
 
     UINT32 olength;
     unsigned char *rnd = NULL;
-    hr = ICryptographicBufferStatics_CopyToByteArray(phProv, buffer, &olength, 
(BYTE**)&rnd);
+    hr = 
__x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics_CopyToByteArray(phProv,
 buffer, &olength, (BYTE**)&rnd);
     if (FAILED(hr)) {
         IBuffer_Release(buffer);
         return FALSE;
-- 
2.29.2



_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to