Open file with another application
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 cho开发者_运维问答ose the application to start with.
Thanks in advance!
Usually applications allow command line arguments for file opening. For example, to open a file with notepad you can use command line :
notepad.exe a.txt
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:
system("application.exe file.xml");
精彩评论