保存 Windows XP 和 Vista 应用程序用户信息的最佳位置 [英] Best place to save user information for Windows XP and Vista applications

查看:28
本文介绍了保存 Windows XP 和 Vista 应用程序用户信息的最佳位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要为我正在构建的这个应用程序以加密形式保存用户的登录信息,但我不确定保存文件的最佳位置.我不想按照每个用户的需要将其保存到程序应用程序文件夹中.

I need to save a user's login information in encrypted form for this application I'm building, but I'm not sure of the best place to save the file. I don't want to save it into the program application folder as I want it per user.

那么保存它的最佳文件夹(或方法)是什么?

So what is the best folder (or way) to save it into?

使用 C++.

推荐答案

好像C:Documents and Settings\%username%Local SettingsApplication Data 根据维基百科.文章称此位置用于特定于用户和特定于计算机的应用程序设置".

Seems like C:Documents and Settings\%username%Local SettingsApplication Data may be the appropriate place according to Wikipedia. The article says this location is used for "User-specific and computer-specific application settings".

Cruizer 在评论中指出(我会在那里回复,但我还不能评论)在 Vista 中它是 C:Users\%username% 并且它不应该是硬编码的.谢谢.

Cruizer pointed out in the comments (I'd reply there but I can't comment yet) that in Vista it is C:Users\%username% and that it shouldn't be hard-coded. Thanks.

这篇关于保存 Windows XP 和 Vista 应用程序用户信息的最佳位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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