你好,我是b $ b我怎么读&写一个在我的项目设置中添加的.txt文件。 我只能读取我的config.txt&程序文件中的readme.txt。 是否有任何属性/设置可以更改为InstallShield的VS 2015? 提前致谢。
hello, how can i read & write a .txt file added in my project setup. I can only read my config.txt & readme.txt in the program files. Is there any properties/setting to change into InstallShield's VS 2015? Thanks in advance.
推荐答案
嗨Nizoux,
Hi Nizoux,
感谢您在这里发帖。
>>怎么样?我阅读&写一个在我的项目设置中添加的.txt文件。 我只能阅读我的config.txt&程序文件中的readme.txt。 是否有任何属性/设置可以更改为InstallShield的VS 2015?
要编写txt文件,您可以使用 WriteFile函数或 FileStream :: 写 方法。
To write txt file, you could use WriteFile function or FileStream::Write Method.
对于config.txt,其中包含我们的EXE配置的XML文件。它可以是连接字符串,参数值,Web服务URL,用户首选项,自定义控件等...元素是为您定义的,并且它是可扩展的,因此您可以添加自己的元素(如果标准的那些元素)不符合您的需求。
For config.txt whichis a XML file that contain our EXE configuration. It can be a connection string, param values, web services URLs, user preferences, custom controls, etc... The elements are defined for you, and it's extendable so that you can add your own elements if the standard ones aren't meeting your needs.
如果你正在处理.Net Framework,你可以使用 System.Configuration 命名空间。
If you're dealing with .Net Framework, you could use System.Configuration namespace.
以下是您作为参考的一些示例。
Here are some examples for you as references.
http:/ /www.codeguru/cpp/cpp/cpp_managed/asp/article.php/c4873/Using-Configuration-Files-in-Visual-C.htm
www.codeproject/articles/21036/working -with-configuration-files-app-config-in-cc
希望这可以帮到你。
最好的问候,$ Sera Yu
Best Regards, Sera Yu
更多推荐
Project InstallShield Visual Studio 2015
发布评论