可变存储位置 - 最佳实践?

发布于 2025-02-08 16:34:31 字数 459 浏览 3 评论 0原文

我正在尝试学习如何更好地将我的变量存储在我工作的当前应用程序之外。我主要致力于为诸如Excel的 autolisp ,我的大部分工作都不需要我存储这些应用程序以外的任何内容。有一些坚持,我需要在这两个应用程序之外存储设置。

为了帮助范围缩小我的要求的范围,我想了解有关个人机器中存储应用程序和附加变量的信息。

问题

  1. 变量应该放在哪个目录中?类别将有所帮助。
  2. 应该使用哪些文件扩展名来保存变量信息?
  3. 如果一个变量包含敏感信息,则该信息应如何存储?
  4. 如果应用程序缺少专门为其存储加载项文件的地方,那么加载程序应该最好放置在哪里?

I'm trying to learn how to be better at storing my variables outside of the current application in which I'm working. I mostly work in building add-ins for applications such as Excel's VBA and DraftSight's AutoLisp, and most of my work doesn't require me to store anything outside of these applications. There have been a few insistence where I've needed to store settings outside of these two applications.

To help narrow the scope of what I'm asking, I'm wanting to learn about storing application and add-in variables in the Windows OS, for personal machines.

Questions

  1. Where should variables be place in which directories? Categories would be helpful.
  2. What file extension(s) should be used to save the variable information?
  3. If a variable contained sensitive information, how and where should that information be stored?
  4. If an application lacks a dedicated place to store add-in files for itself, where should the add-in file be best placed?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

春夜浅 2025-02-15 16:34:31

将重要的每个用户数据存储在%appData%和不重要的数据中%localappdata%中。 shell.namespace >脚本方法应该让您在VBA中访问这些方法。

您可以看到 MSDN 。简单的设置可以存储在注册表中。

您可以决定文件扩展名。

如果您可以正确访问Windows API,则可以调用CryptProtectData存储加密数据。

Store important per-user data in %appdata% and unimportant data in %localappdata%. The Shell.NameSpace scripting method should let you access these in VBA.

You can see a list of all the special locations on MSDN. Simple settings can be stored in the registry instead.

You get to decide the file extension.

If you have proper access to the Windows API you can call CryptProtectData to store encrypted data.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文