<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
On 09/14/2013 11:46 PM, Daniel JeliĆski wrote:
<blockquote
cite="mid:CAMrH03KD5gTp8WxCt5rOvX-zsWLz_kXekbZcqVhLf84Mf8-33Q@mail.gmail.com"
type="cite">
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">2013/9/14 Nikolay Sivov <span
dir="ltr"><<a moz-do-not-send="true"
href="mailto:nsivov@codeweavers.com" target="_blank">nsivov@codeweavers.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">
Could you implement necessary part of CopyFile2 instead,
and use it in CopyFileEx? I think CopyFile2 has everything
to do that.<br>
<br>
</blockquote>
</div>
<br>
<div>
<div>
<div>I suppose I could, but then, CopyFile2 uses a
different callback than CopyFileEx:<br>
</div>
CopyFile2: <a moz-do-not-send="true"
href="http://msdn.microsoft.com/en-us/library/windows/desktop/hh449407%28v=vs.85%29.aspx">http://msdn.microsoft.com/en-us/library/windows/desktop/hh449407%28v=vs.85%29.aspx</a><br>
</div>
CopyFileEx: <a moz-do-not-send="true"
href="http://msdn.microsoft.com/en-us/library/windows/desktop/aa363854%28v=vs.85%29.aspx">http://msdn.microsoft.com/en-us/library/windows/desktop/aa363854%28v=vs.85%29.aspx</a><br>
</div>
Not sure how to handle that. Any hints?</div>
</div>
</blockquote>
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<br>
pointer to user callback (and anything else you might need).<br>
<br>
I didn't look deep at this, but looks like CopyFile2 callback is
called more often than CopyFileEx expects,<br>
this could be easily implement by filtering unwanted events in your
CopyFile2 callback (that will reside in kernel32).<br>
</body>
</html>