We had a visual studio 6.0 project, where we used... FCI.LIB FDI.LIB and the APIs FCICreate, FCIAddFile, and FCIFlushCabinet.
it worked good. But as switched to VS2015, we had to replace FCI.LIB and FDI.LIB with Cabinet.Lib.
It builds fine and executes till FCICreate and FCIAddFile. But FCIFlushCabinet() throws the below runtime error. Exception thrown at 0x5DCADE7E (vcruntime140.dll) in CabProject.exe: 0xC0000005: Access violation reading location 0x57EC8B55.
Please suggest, what's wrong over here.
Please, follow Rita Han's helpful comments. Even after setting 312617 as value of m_cabParams.cbFolderThresh was overflowing with someother file.
Later it's changed 1024 * 128 = 131072. Further, it was failing with a particular XML file compression.
Then, found we have a call back function "FNFCISTATUS" and there some unnecessary manipulation is done. Commenting out that code helped to resolve the issue.
FNFCISTATUS(progress)
{
client_state *cs;
cs = (client_state *) pv;
if (typeStatus == statusFile)
{
/*
cs->total_compressed_size += cb1;
cs->total_uncompressed_size += cb2;
*/
User contributions licensed under CC BY-SA 3.0