Hi,
I am getting an error 323 (The filemask or file entry did not match any existing file) in the Xceed Zip Compression Library when I try to add a folder via AddFilesToProcess(). The obvious problem would be that I am forgetting the trailing backslash, but I am not. I have verified this in the debugger. Individual files are added without any problem, but it chokes on folders.
Can anyone offer any suggestions as to what I am doing wrong? My app is running on a Windows Vista machine, and is written in VC++ 6.0. Here is the relevant code:
IXceedZipPtr piXceedZip(CLSID_XceedZip);
piXceedZip->License(myLicense);
CXceedZipEventSink sink;
sink.DispEventAdvise(piXceedZip);
sink.SetXceedZip(piXceedZip);
piXceedZip->ZipFilename = _bstr_t(LPCTSTR(m_strFilePNE));
piXceedZip->PreservePaths = false;
piXceedZip->ProcessSubfolders = true;
POSITION pos = m_listFileNames.GetHeadPosition();
while ( pos != NULL )
{
CString fileNamePNE = m_listFileNames.GetNext(pos);
piXceedZip->AddFilesToProcess(_bstr_t(LPCTSTR(fileNamePNE)));
}
pos = m_listFolderNames.GetHeadPosition();
while ( pos != NULL )
{
CString folderNamePath = m_listFolderNames.GetNext(pos);
folderNamePath += "\\";
piXceedZip->AddFilesToProcess(_bstr_t(LPCTSTR(folderNamePath)));
}
// Create the new ZIP file
long xErr = piXceedZip->Zip();
Thanks!
JAB