Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Using FindFirstFile and FindNextFile
#7
str s.ansi(&struFind.cFileName) is OK.

int threadFind=FindFirstFileW(trueFilter,&struFind) is OK if trueFilter is BSTR, but easier to pass str or lpstr with @: int threadFind=FindFirstFileW(@trueFilter,&struFind).

Do all string manipulation with str. Convert to Unicode using @, and Unicode to str using ansi. BSTR is probably not needed in your code.

_____________

FYI: dir also uses FindFirstFileW etc. It stores find data in a special local variable _dir. Example:

dir ...
out "0x%X" _dir.fd.dwFileAttributes


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)