[2/2] kernel32: implement callback and cancellation in CopyFileEx

Nikolay Sivov nsivov at codeweavers.com
Sun Sep 15 00:40:42 CDT 2013

On 09/14/2013 11:46 PM, Daniel Jeliński wrote:
> 2013/9/14 Nikolay Sivov <nsivov at codeweavers.com 
> <mailto:nsivov at codeweavers.com>>
>     Could you implement necessary part of CopyFile2 instead, and use
>     it in CopyFileEx? I think CopyFile2 has everything to do that.
> I suppose I could, but then, CopyFile2 uses a different callback than 
> CopyFileEx:
> CopyFile2: 
> http://msdn.microsoft.com/en-us/library/windows/desktop/hh449407%28v=vs.85%29.aspx
> CopyFileEx: 
> http://msdn.microsoft.com/en-us/library/windows/desktop/aa363854%28v=vs.85%29.aspx
> Not sure how to handle that. Any hints?
You could add CopyFile2 style callback function in our code, pass 
everything you need as 'pvCallbackContext', that could be CopyFileEx 
callback pointer or pointer to a structure that contains
pointer to user callback (and anything else you might need).

I didn't look deep at this, but looks like CopyFile2 callback is called 
more often than CopyFileEx expects,
this could be easily implement by filtering unwanted events in your 
CopyFile2 callback (that will reside in kernel32).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20130915/e5cd8259/attachment.html>

More information about the wine-devel mailing list