This project is read-only.

zip->SaveProgress problem in C++/CLI

Oct 12, 2011 at 5:44 PM

I'm trying to add a saveprogress event to my code in order to figure out which file this library is hanging the process on... That's another discussion, but in the mean time I need to know the progress of the save, however, no matter what I try the compiler fails.
Below is my code I am using, minus any other uneeded stuff. I'm at my wits end, any one know how to get this to work in C++/CLI?

The error is this 

Error 26 error C2664: 'Ionic::Zip::ZipFile::SaveProgress::add' : cannot convert parameter 1 from 'System::EventHandler<TEventArgs> ^' to 'System::EventHandler<TEventArgs> ^'


void somefunction()
ZipFile ^ zip; 
zip = gcnew ZipFile(Gaxx::Inst->Value->BackUpOutPutDir +"Backup_"+ dtb + ".zip");
zip->CompressionLevel = Ionic::Zlib::CompressionLevel::Level5;
unsigned long Count1=0;
for(;Count1 < Gaxx::Inst->Value->BackupDirsArrayCount;Count1++)
zip->SaveProgress += gcnew System::EventHandler<Ionic::Zip::ZipProgressEventArgs^>( &::SaveProgress1);//offending line
zip->ZipErrorAction = Ionic::Zip::ZipErrorAction::Skip;         
zip->Save(Gaxx::Inst->Value->BackUpOutPutDir + dtb + ".zip");

static System::Void SaveProgress1(System::Object^  sender, Ionic::Zip::ZipProgressEventArgs^  e)
//Process events here