how to enumerate folders in VC++ nonMFC

October 17, 2010 at 05:38:50
Specs: Windows XP
In visual c++ (6.0) I have a non-MFC program that is creating a Directory tree control so I want to enumerate the disk drives and then search all the drives for folders/files etc. I can't find a good way of searching the drives. I tried going thru all drives from A to Z using FindFirstFile and thought that if zero files was returned then I know to ignore the drive. That might not be perfect, but the problem I get is that when it checks drive A:, FindFirstFile errors and displays the message "please insert disk into drive A:". I need to avoid that. What I need is functions that return disk drives and also the appropriate properties so I can tell whether or not to display them. Grateful for any assistance with this.

See More: how to enumerate folders in VC++ nonMFC

Report •

October 18, 2010 at 09:47:37

Report •

October 19, 2010 at 12:39:00
Thanks for previous message - I wasn't aware of that at all. I have tried it out but it doesn't stop the problem - I still get the messagebox saying no Disk. I think I have to evaluate the drives before searching them for files. I have seen a few articles on this but they are for MFC programs - I need more info on what functions to call and what the data structures are that are returned. I get an idea of what to call looking at various articles but I can't tell what fields return the values I'm after.

Report •

Related Solutions

Ask Question