Posted by christian
(188.8.131.52) 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:
your code is wrong.
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:
No offense intended, but maybe you should read some kind of C tutorial.