wincc实例project_taghandling中用按钮实现启动外部可执行程序excel的例子不能够运行,总是出现“Please enter\r\ncorrect path to Excel”本实例中excel路径用一个I/O fields来输入,并与字符变量T16x_varia_impexp_00连接,其按钮左键c语言程序如下:
#include "apdefap.h"
void OnLButtonDown(char* lpszPictureName, char* lpszObjectName, char* lpszPropertyName, UINT nFlags, int x, int y)
{
char excelpath[200];
int result;
//build path to excel
strcpy(excelpath,GetTagChar("T16x_varia_impexp_00"));
strcat(excelpath,"\\excel.exe");
//execute excel
result=ProgramExecute(excelpath);
//if not able to execute set visible message box
if (result<32) {
MessageBox(NULL,"Please enter\r\ncorrect path to Excel","ececution error",MB_OKMB_ICONSTOPMB_SETFOREGROUND);
}
}
请各位高手帮忙解决一下。