debug error File i386\chkesp.c
The valueof ESP was not properly saved across fucntion call.This is usally a result of calling a fucntion declared with one calling convention with a function pointer
declared witha declared calling convention..
In C/C++ settings it is _cdecl convention.
the code is which i am coverting bmp to png format
char *inBuffer = new char[inStreamSize];
uncompressedBufferSize = inStreamSize*40;
unCompressedBuffer = new char[uncompressedBufferSize];
inFile.read (inBuffer, inStreamSize);
zs = new z_stream;
zs->next_in = (unsigned char *)inBuffer; zs->avail_in = inFile.gcount(); zs->next_out = (unsigned char *)unCompressedBuffer; zs->avail_out = uncompressedBufferSize; zs->zalloc = (alloc_func)0;
zs->zfree = (free_func)0;
zs->data_type = Z_BINARY;
ret = inflateInit(zs);
ret = inflate(zs, Z_FINISH);
if(ret != Z_OK && ret != Z_STREAM_END)
AfxMessageBox("Failed to decompress file");
ret = inflateEnd (zs);
if(ret == Z_OK)
outFile.write (unCompressedBuffer, zs->total_out);
delete  zs;
SetDlgItemText(IDC_PROGRESS_TEXT, "1 File Converted");
after this the error occurs.