Re: Help API ZCCRYPT


[ Follow Ups ] [ BasicCard User Forum ]

Posted by christian (84.131.61.148) on January 21, 2006 at 07:35:37:

In Reply to: Help API ZCCRYPT posted by benjamind on January 18, 2006 at 10:28:58:

Hi,

your code is wrong.

DWORD *pVer;

declares a pointer to a DWORD but it doesn't allocate memory for that DWORD. The pointer simply points to nowhere. So if you pass this pointer to ZCCryptGetVer, the function will write to an undefined memory location. In this case an error message is the best outcome.

To solve your problem you'll either have to allocate enough memory for your pointer to point at (and free it afterwards) or you'll have to declare a DWORD and pass its address to ZCCryptGetVer:

DWORD ver;
ZCCryptGetVer(&ver);

No offense intended, but maybe you should read some kind of C tutorial.

Christian



Follow Ups:


[ Follow Ups ] [ BasicCard User Forum ]