Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我创建了一个查看器组件,它有助于查看加密的文件。我创建了一个安装程序,它将我的自定义扩展 (.abc) 与查看器应用程序相关联。现在,当我双击该文件时,查看器应用程序会启动,但不会显示数据。我知道我必须编写代码才能完成这项工作。但我不确定我该怎么做。我正在使用 C#。
谢谢,钱德拉塞卡
当您为关联指定路径时,请确保在其后包含 %1(例如,
C:\Program Files\yourApplicationPath %1
这会将正在打开的文件的路径作为命令行参数传递给您的应用程序。然后,您可以在main()函数中检索它。
main()