Author: GekyGeky
Date: May 14, 2007 10:51
I'm trying to use BZip2 library but I receive always an access
violation error. I use two different codes:
bz_stream bzstream;
ZeroMemory(&bzstream, sizeof(bzstream));
bzstream.bzalloc=NULL;
bzstream.bzfree=NULL;
bzstream.opaque=NULL;
int x = BZ2_bzCompressInit(&bzstream, 5, 0, 30);
BZ2_bzCompressInit(&bzstream, 5, 0, 30); <-- HERE IT RETURN
THE ERROR
if I use "bz_stream* bzstream" in place of "bz_stream bzstream" my
compiler says that "local variable 'bzstream' used without having been
initialized" :-(.
+++++++++++++++++++++++++++++
char pOrig[256], pComp[256], pDec[256];
unsigned int OrigLen, CompLen, DecLen;
|