Menu

#326 CRYPTPROTECT_PROMPT_ON_PROTECT dwPromptFlags missing from wincrypt.h

None
open
nobody
None
1
2017-07-08
2017-07-08
No

TDM-GCC installed via CodeBlocks on 32-bit Win7 pro, version:

PS src-c:\tmp> gcc -v
Using built-in specs.
COLLECT_GCC=c:\Program Files\CodeBlocks\MinGW\bin\gcc.exe
COLLECT_LTO_WRAPPER=c:/Program\ Files/CodeBlocks/MinGW/bin/../libexec/gcc/mingw32/4.9.2/lto-wrapper.exe
Target: mingw32
Configured with: ../../../src/gcc-4.9.2/configure --build=mingw32 --enable-languages=ada,c,c++,fortran,lto,obj
c,obj-c++ --enable-libgomp --enable-lto --enable-graphite --enable-libstdcxx-debug --enable-threads=posix --en
able-version-specific-runtime-libs --enable-fully-dynamic-string --enable-libstdcxx-threads --enable-libstdcxx
-time --with-gnu-ld --disable-werror --disable-nls --disable-win32-registry --disable-symvers --enable-cxx-fla
gs='-fno-function-sections -fno-data-sections -DWINPTHREAD_STATIC' --prefix=/mingw32tdm --with-local-prefix=/m
ingw32tdm --with-pkgversion=tdm-1 --enable-sjlj-exceptions --with-bugurl=http://tdm-gcc.tdragon.net/bugs
Thread model: posix
gcc version 4.9.2 (tdm-1)

Attempting to compile the CryptProtectData example program from

https://msdn.microsoft.com/en-us/library/windows/desktop/aa382377%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396

The following error is received:

.\crypt_protect.c: In function 'main':
.\crypt_protect.c:31:34: error: 'CRYPTPROTECT_PROMPT_ON_PROTECT' undeclared (first use in this function)
PromptStruct.dwPromptFlags = CRYPTPROTECT_PROMPT_ON_PROTECT;
^
.\crypt_protect.c:31:34: note: each undeclared identifier is reported only once for each function it appears in

The needed CRYPTPROTECT_PROMPT_ON_PROTECT should be defined in wincrypt.h according to:

https://msdn.microsoft.com/en-us/library/windows/desktop/aa380263(v=vs.85).aspx

Discussion

Anonymous
Anonymous

Add attachments
Cancel