Applications can obtain unique filenames for temporary files with the GetTempFileName function. The GetTempPath function retrieves the path to the directory where temporary files are to be created.