使用另一个应用程序打开文件
嘿!
我想使用指定的应用程序从 C++ 打开 .xml 文件(知道文件的路径和应用程序的路径)。与右键单击文件并单击“打开方式...”相同,然后选择要启动的应用程序。
提前致谢!
Hy!
I want to open an .xml file from c++ with a specified application (knowing the path of the file and the path of the application). Same way as you would right-click the file and click "Open with..." and choose the application to start with.
Thanks in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
通常应用程序允许使用命令行参数打开文件。例如,要使用记事本打开文件,您可以使用命令行:
这就是为什么您可以在 Windows 中使用此功能(允许指定参数)或其他操作系统中的类似功能。华泰
Usually applications allow command line arguments for file opening. For example, to open a file with notepad you can use command line :
That's why you can use this feature with
CreateProcess
in Windows (which allows specifying arguments) or analogous function in other OS . HTH简单地怎么样:
how about simply: