using IO_IOCTL_FIND_NEXT_FILE

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

using IO_IOCTL_FIND_NEXT_FILE

ソリューションへジャンプ
1,307件の閲覧回数
Wanderer
Contributor II

I want to be able to scroll through available files on a disk without knowing the file names beforehand.

 

I am trying to modify the MFSUG example, "List all files and subdirectories in a directory", by creating subroutines for both IO_IOCTL_FIND_FIRST_FILE and IO_IOCTL_FIND_NEXT_FILE.  For example, main() calls find_first_file() then subsequently calls find_next_file() each time I want to know the next file.

 

For some reason, MFS_SEARCH_DATA struct gets reset each time I call IO_IOCTL_FIND_NEXT_FILE so the required previous file is not saved.

 

Any ideas?

 

Thanks, gj

ラベル(1)
タグ(1)
0 件の賞賛
返信
1 解決策
790件の閲覧回数
PetrM
Senior Contributor I

Hello,

 

it does not create a list of any kind. The search data only contain information about one (last) file that matched your search criteria. You have to save the information needed yourself after each find-next-search.

 

PetrM

 

元の投稿で解決策を見る

0 件の賞賛
返信
3 返答(返信)
790件の閲覧回数
oliviachristyva
Contributor III

Hi guys,

I am working with the same thing. I reached till directory listing all the files but I dont know how to configure IO_IOCTL_FIND_FIRST_FILE and IO_IOCTL_FIND_NEXT_FILE to find the file I want from a USB stick .Please share your snippet to find the files and save it in a buffer.

Regards,

Olivia

0 件の賞賛
返信
791件の閲覧回数
PetrM
Senior Contributor I

Hello,

 

it does not create a list of any kind. The search data only contain information about one (last) file that matched your search criteria. You have to save the information needed yourself after each find-next-search.

 

PetrM

 

0 件の賞賛
返信
790件の閲覧回数
Wanderer
Contributor II

Thanks PetrM,

 

Defining MFS_SEARCH_DATA struct as STATIC worked.  


Cheers, gj

0 件の賞賛
返信