int error = hw_BeginDirScan(APTR handle, APTR *dirhandle);
APTRto this function in parameter 2. This pointer will receive a special directory handle that you have to pass to hw_EndDirScan() once you are finished with the directory scanning. See hw_EndDirScan for details.
To iterate over the single directory entries, call hw_NextDirEntry(). See hw_NextDirEntry for details.
APTRto receive the scan handle