I think that https://sourceforge.net/p/mingw-w64/mingw-w64/ci/master/tree/mingw-w64-headers/include/sal.h is missing #define __deref_out_ecount_full(x)
It's my understanding that it is normally provided by SAL headers, but seems to be missing from MinGW's. Noticed when trying to compile these MAPI headers for pywin32: https://github.com/microsoft/MAPIStubLibrary