I am currently using FindFirstFile, the FindNextFile API for recursively iterating over directories to search for files based on specific criteria. I noticed that the dir / s command gives better performance than my program. I am trying to check for events on a process monitor, and it looks like the cmd.exe / dir command is directly requesting a disk device driver. Is there a way I can achieve something similar with DeviceIOControl () ?. I am very new to device drivers, but not new to programming. Attaching procmon output for reference:

Hi,
source share