在Windows中获取用户临时文件夹路径 [英] Getting user temporary folder path in Windows

查看:419
本文介绍了在Windows中获取用户临时文件夹路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在C ++中获取用户的临时文件夹路径?我的程序必须在Windows Vista和XP上运行,并且它们具有不同的临时路径。

解决方案

有没有理由不能使用Win32 GetTempPath API? p>



此API可从W2K开始提供,因此将可用于您列出的所有目标。


How I can get the user's temp folder path in C++? My program has to run on Windows Vista and XP and they have different temp paths. How I can get it without losing compatibility?

解决方案

Is there a reason you can't use the Win32 GetTempPath API?

This API is available starting with W2K and hence will be available on all of your listed targets.

这篇关于在Windows中获取用户临时文件夹路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆