Page 1 of 1

WIN32_FIND_DATAW, FindFirstFileW and so on

Posted: Sat Jan 13, 2018 5:44 am
by GenRabbit
Hi
I'm testing something where I need access to these "WinAPI" FindFirstFileW , FindNextFileNameW, FindFirstFileW and some other? can they be added myself and if so how? And the structure WIN32_FIND_DATAW(which I presume is identical to WIN32_FIND_DATA, except for use of unicode chars for filenames.

Re: WIN32_FIND_DATAW, FindFirstFileW and so on

Posted: Sun Jan 14, 2018 7:18 pm
by fryquez
If you compile as unicode, PB will automaticly use the "W" Api versions.

Code: Select all

Define hSearch, WinFind.WIN32_FIND_DATA

hSearch = FindFirstFile_("*", @WinFind)
If hSearch <> #INVALID_HANDLE_VALUE
  Repeat
    Debug PeekS(@WinFind\cFileName[0])
  Until FindNextFile_(hSearch, @WinFind) = #False
  FindClose_(hSearch)
EndIf 

Re: WIN32_FIND_DATAW, FindFirstFileW and so on

Posted: Mon Jan 15, 2018 8:12 pm
by GenRabbit
Ah, oki.. Thanks for that info.