[
  {
    "Id": "683235",
    "ThreadId": "275625",
    "Html": "\r\n<p>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\r\n fails.<br>\r\nBelow 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&#43;&#43;/CLI?</p>\r\n<p>The error is this&nbsp;</p>\r\n<p>Error<span> </span>26<span> </span>error C2664: 'Ionic::Zip::ZipFile::SaveProgress::add' : cannot convert parameter 1 from 'System::EventHandler&lt;TEventArgs&gt; ^' to 'System::EventHandler&lt;TEventArgs&gt; ^'</p>\r\n<p>Code:</p>\r\n<p></p>\r\n<div style=\"color:black; background-color:white\">\r\n<pre><span style=\"color:blue\">void</span> somefunction()\r\n{\r\nZipFile ^ zip; \r\nzip = <span style=\"color:blue\">gcnew</span> ZipFile(Gaxx::Inst-&gt;Value-&gt;BackUpOutPutDir &#43;<span style=\"color:#a31515\">&quot;Backup_&quot;</span>&#43; dtb &#43; <span style=\"color:#a31515\">&quot;.zip&quot;</span>);\r\nzip-&gt;CompressionLevel = Ionic::Zlib::CompressionLevel::Level5;\r\n<span style=\"color:blue\">unsigned</span> <span style=\"color:blue\">long</span> Count1=0;\r\n<span style=\"color:blue\">for</span>(;Count1 &lt; Gaxx::Inst-&gt;Value-&gt;BackupDirsArrayCount;Count1&#43;&#43;)\r\n    {\r\n        zip-&gt;AddDirectory(Gaxx::Inst-&gt;Value-&gt;BackupDirsArray[Count1]);\r\n    };\r\nzip-&gt;SaveProgress &#43;= <span style=\"color:blue\">gcnew</span> System::EventHandler&lt;Ionic::Zip::ZipProgressEventArgs^&gt;( &amp;::SaveProgress1);<span style=\"color:#008000\">//offending line</span>\r\nzip-&gt;ZipErrorAction = Ionic::Zip::ZipErrorAction::Skip;<span> </span> &nbsp; &nbsp; &nbsp; &nbsp;</pre>\r\n<pre>zip-&gt;Save(Gaxx::Inst-&gt;Value-&gt;BackUpOutPutDir &#43; dtb &#43; &quot;.zip&quot;);\r\n}\r\n\r\n<span style=\"color:blue\">static</span> System::Void SaveProgress1(System::Object^  sender, Ionic::Zip::ZipProgressEventArgs^  e)\r\n{\r\n<span style=\"color:green\">//Process events here</span>\r\n}\r\n</pre>\r\n</div>\r\n&nbsp;\r\n<p></p>\r\n",
    "PostedDate": "2011-10-12T09:44:11.13-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  }
]