2013/9/30 Nikolay Sivov <bunglehead@gmail.com>
On 9/30/2013 00:51, Daniel Jeliński wrote:
+struct progress_list {I don't see a point making them 'const'.
+ const DWORD progress_retval_init; /* value to return from progress routine */
+ const BOOL cancel_init; /* value to set Cancel flag to */
+ const DWORD progress_retval_end; /* value to return from progress routine */
+ const BOOL cancel_end; /* value to set Cancel flag to */
+ const DWORD progress_count; /* number of times progress is invoked */
+ const BOOL copy_retval; /* expected CopyFileEx result */
+ const DWORD lastError; /* expected CopyFileEx error code */
+} ;
I'm matching the formatting of existing code:Also, what's the point of not making them const?
Good point about lpData. Still, does that make the patch invalid? Why didn't you mention that on the first review?+static DWORD WINAPI progress(LARGE_INTEGER TotalFileSize,Please pass all globals as context data with lpData, and please use 'void*' instead of LPVOID.
+ LARGE_INTEGER TotalBytesTransferred,
+ LARGE_INTEGER StreamSize,
+ LARGE_INTEGER StreamBytesTransferred,
+ DWORD dwStreamNumber,
+ DWORD dwCallbackReason,
+ HANDLE hSourceFile,
+ HANDLE hDestinationFile,
+ LPVOID lpData)
+{
+ progressInvoked++;
About LPVOID - I'm matching the headers:for the third patch: