Re: copyFileEx() hanging

new topic     » goto parent     » topic index » view thread      » older message » newer message

> There are a few problems with your code.  First, pbCancel is really a poi=
nter
> to a boolean.  You're supposed to be able to set that at any time during
> progress to cancel the transfer.  Seems like it's duplicating the purpose
> of the callback, but there you go.  (Technically, lpData is supposed to
> be a pointer, but it probably doesn't really matter since Windows doesn't
> use it for anything).
>
> Second, the first 4 parameters are defined as LARGE_INTEGERs, which means
> that they're actually 64-bit integers.  You need to use 2 32-bit paramete=
rs
> to properly accept them.  Then you can multiply the high value by
> #100000000 and add together.
>
> But this means that you're over the 9-parameter limit, so you can use fpt=
r.e
> (http://www.rapideuphoria.com/fptr.zip) to get around this.  Finally,
> the callback should actually be a cdecl callback.  Here's how I reworked
> the file so that it works (however, even copying a 10MB file, it happens =
so
> quickly that no progress calls are actually made)--I've omitted the
> createDir() routine, since I didn't change anything there:


Ok -- I applied the changes you made to my code, and it still crashes.
Maybe I missed something. I am making progress however, now I get a
machine-level crash instead of an all-out hang. :) The zip file
contains the changes to filecopy.ew as well as the ex.err file from
the crash.

Here's the file (again): http://www.freewebtown.com/ghaberek/copy_crash.zip

~Greg

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu