Nov 5, 2011 at 4:40pm UTC
I have included wincrypt.h but when I try to compile I get an error.
`CryptUnprotectData' undeclared (first use this function)
I am using bloodsheds Dev-C++ IDE.
Thanks in advance.
Nov 5, 2011 at 4:43pm UTC
Open up wincrypt.h and check that the function exists in there, and that you're spelling it correctly, and that you're passing it the correct variables.
Nov 5, 2011 at 5:10pm UTC
I have checked and the CryptUnprotectData function is not in there while it should be.
This is my wincrypt.h:
http://pastebin.com/d6TW8bL2
it should look something like
1 2 3 4 5 6 7 8 9 10 11 12
WINCRYPT32API
BOOL
WINAPI
CryptUnprotectData(
__in DATA_BLOB* pDataIn,
__deref_opt_out_opt LPWSTR* ppszDataDescr,
__in_opt DATA_BLOB* pOptionalEntropy,
__reserved PVOID pvReserved,
__in_opt CRYPTPROTECT_PROMPTSTRUCT* pPromptStruct,
__in DWORD dwFlags,
__out DATA_BLOB* pDataOut
);
Last edited on Nov 5, 2011 at 5:11pm UTC
Nov 5, 2011 at 5:26pm UTC
Seems you've got the wrong wincrypt.
Nov 5, 2011 at 6:00pm UTC
it's the one included in the Dev-C++ 5 beta
Nov 5, 2011 at 6:08pm UTC
You think I could just replace mine with a working one (like the one included in Visual Studio 2010)?