CryptUnprotectData

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.
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.
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
Seems you've got the wrong wincrypt.
it's the one included in the Dev-C++ 5 beta
You think I could just replace mine with a working one (like the one included in Visual Studio 2010)?
Your choice of IDE is crippling you.

http://www.cplusplus.com/articles/36vU7k9E/

I think you should dump it and get something that works.

Alright, thanks.
Topic archived. No new replies allowed.