如何在VC++中调用外部程序?
你可以使用Windows API函数WinExec、ShellExecute。这两个函数可以调用Windows和DOS程序。WinExec主要运行EXE文件。如:
WinExec("Notepad.exe Readme.txt", SW_SHOW);
ShellExecute不仅可以运行EXE文件,也可以运行已经关联的文件。如:
ShellExecute(0, "open", "http://askpro.yeah.net", NULL, NULL, 0)
WinExec("Notepad.exe Readme.txt", SW_SHOW);
ShellExecute不仅可以运行EXE文件,也可以运行已经关联的文件。如:
ShellExecute(0, "open", "http://askpro.yeah.net", NULL, NULL, 0)
浙公网安备 33010602011771号