Well, if there is an undocumented function in windows and anyone can tell me about it then I'd love to hear about it! At the moment I am forced to walk through all the files on disk with FindFirstFile() and then call FSCTL_GET_RETRIEVAL_POINTERS for each and every file to discover where it is physically located and wether it is fragmented. Which is very slow. By the way, most of the time is spent in the FindFirstFile() function.
See the Microsoft website
for more information.