Good afternoon, I CryptQueryObject trying to compile a C program, it uses the CryptQueryObject function. I understand it should be in Wincrypt.h , but it is not there. The question itself is exactly what to do? Where to connect it from?
- and what, actually you, except MinGW have? - Sublihim
- MSDN says that it should be connected from Wincrypt.h, they will not lie. - Vladimir Martyanov
- I suspect that no one knows what else to add the lib file :) - KoVadim
- Well, I use a non-Microsoft compiler - Corle
- @Corle, and the library itself is? - Sublihim
|
1 answer
Apparently, you have an outdated version of MinGW. Download and install the current version of MinGW-w64 , there is a description of the CryptQueryObject function in the header of CryptQueryObject (line 4438):
WINIMPM WINBOOL WINAPI CryptQueryObject (DWORD dwObjectType, const void *pvObject, DWORD dwExpectedContentTypeFlags, DWORD dwExpectedFormatTypeFlags, DWORD dwFlags, DWORD *pdwMsgAndCertEncodingType, DWORD *pdwContentType, DWORD *pdwFormatType, HCERTSTORE *phCertStore, HCRYPTMSG *phMsg, const void **ppvContext); - Can I ask a question ... what version should I download? in the sense that there are some seh, siji, something else. If I have to get an output on the output that runs on both 86 and 64 bit systems - Corle
- I downloaded MinGW-w64 posix siji, installed ... set it in Code :: block in the x86_64-w64-mingw32-gcc.exe compiler settings for C, x86_64-w64-mingw32-g ++. exe for pluses and thereafter points by point. .but in the error log Code :: block writes: "execution of x86_64-w64-mingw32-gcc.exe failed" - Corle
- @Corle I didn’t collect projects for x64, so I can’t tell you exactly. Apparently, you need to make 2 installations of MinGW-w64, for each platform (and Windows, of course, you should have x64). In Code :: Blocks, I simply specified
gcc.exeandg++.exeand a path similar toC:\dev\mingw-w64\mingw32. About exception model - DWARF for win32 and SEH for win64 are recommended . More details can be found here: wiki.qt.io/MinGW-64-bit - zed - @Corle Maybe I misunderstood you and you don’t need a 64-bit binary? If you compile the application as 32-bit, it will be fine to run on both x64 and x86. In this case, when installing MinGW, you need to choose the i686 platform, DWARF exceptions and win32 / posix streams to choose from. - zed
- Yes, I need version x86 to run a program on 2 platforms - Corle
|