怎么调用COM对象。
HMIRuntime 为接口
CoHMIRuntime 类
怎样来实例化HMIRuntime?
[解决办法]
#include <vcl.h>
#include "CCHMIRUNTIME_TLB.h "
TForm1 *Form1;
void __fastcall TForm1::FormCreate(TObject *Sender)
{
HMIRuntime *x;
int y;
x = new CoHMIRuntime();
y = x-> Tags-> Item[ "NewTag1 "]-> Read(hmiReadCache);
}
[解决办法]
如楼上
x = CoHMIRuntime.Create();
调用其创建方法!