When you need to access windows temp directory, you can get from environment variables. Following is the example to get temporary directory. var m_tempdir:…