I'm using FindFirstFile to get the first test jpg in the directory,
and then FindNextFile to get the next test jpg....

But when I call FindNextFile the program halts for about 20 seconds and then crashes..

Does anybody know whats wrong?
Posted on 2002-01-23 00:04:59 by matthew
Use this...

.data?

hfindfirstfile dd ?

invoke FindFirstFile, ADDR file, ADDR FindFileData
mov hfindfirstfile, eax
invoke MessageBox, NULL, ADDR FindFileData.cFileName, ADDR MsgTitle, MB_OK
invoke FindNextFile, hfindfirstfile, ADDR FindFileData

===============================
In Win32api.hlp first param is

"Identifies a search handle returned by a previous call to the FindFirstFile function. "
Posted on 2002-01-23 00:31:03 by muzidowa
Ahh i cant believe i didnt see that... all my api errors have
something to do with me missing something when i read it!

thank you
Posted on 2002-01-23 00:41:21 by matthew
maybe this can still be of some assistance to you :)

I used a search routine in a little app lately.
Posted on 2002-01-23 02:13:22 by Hiroshimator
Ahh thats a nice piece of code ;)

I've learnt alot in the last 20 seconds... now i'm using


.REPEAT
;stuff in here
.UNTIL eax == 0


I'll refer back to it when i have problems, but i'm not going
use the whole thing :) Have to do it myself you see.
Posted on 2002-01-24 00:42:24 by matthew
that's always best to learn it :)
Posted on 2002-01-24 00:45:53 by Hiroshimator