win32 posix
Dang, that took a while to find. The functions you want are apparently FindFirstFile, FindNextFile, and FindClose. In the Feb 2003 MSDN library, you can find an example of listing the files in a directory under MSDN Library->Windows Development->Windows Base Services->Files and I/O->SDK Documentation->Storage->Storage Overview->Directory Management->Obtaining Directory Information->Listing the Files in a Directory.
I feel like I just beat a kitten to death... with a bag of puppies.