VC中调用外部EXE程序
我是想在VC里面做的个界面,在界面上添加一个按钮,点击按钮就能调用外部的一个exe程序。voidCSCOMMDlg::OnButton2(){//TODO:Addyour...
我是想在VC里面做的个界面,在界面上添加一个按钮,点击按钮就能调用外部的一个exe程序。
void CSCOMMDlg::OnButton2()
{
// TODO: Add your control notification handler code here
UINT WinExec("com.exe",SW_SHOW);
}
在网上有的人说这样就可以,但我这样就提示错误了。
C:\Users\zhoufeng\Desktop\界面0\SCOMMDlg.cpp(1595) : error C2078: too many initializers
执行 cl.exe 时出错.
求各路大仙解答 展开
void CSCOMMDlg::OnButton2()
{
// TODO: Add your control notification handler code here
UINT WinExec("com.exe",SW_SHOW);
}
在网上有的人说这样就可以,但我这样就提示错误了。
C:\Users\zhoufeng\Desktop\界面0\SCOMMDlg.cpp(1595) : error C2078: too many initializers
执行 cl.exe 时出错.
求各路大仙解答 展开
2个回答
展开全部
The command line (file name plus optional parameters) for the application to
be executed. If the name of the executable file in the lpCmdLine
parameter does not contain a directory path, the system searches for the
executable file in this sequence:
The directory from which the application loaded.
The current directory.
The Windows system directory. The
GetSystemDirectory
function retrieves the path of this directory.
The Windows directory. The
GetWindowsDirectory
function retrieves the path of this directory.
The directories listed in the PATH environment variable
com.exe路径对不对?写成绝对路径试试。com.exe这个exe是不是个有效的可执行程序,双击能运行起来嘛
be executed. If the name of the executable file in the lpCmdLine
parameter does not contain a directory path, the system searches for the
executable file in this sequence:
The directory from which the application loaded.
The current directory.
The Windows system directory. The
GetSystemDirectory
function retrieves the path of this directory.
The Windows directory. The
GetWindowsDirectory
function retrieves the path of this directory.
The directories listed in the PATH environment variable
com.exe路径对不对?写成绝对路径试试。com.exe这个exe是不是个有效的可执行程序,双击能运行起来嘛
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询