suntongtong
HRESULT hr;
hr = opcSvr.CreateInstance( __uuidof( OPCServer ) );
if( FAILED( hr ) ) {
cerr << "OPCServer CreateInstance failed, hr = " << hr << endl;
exit(1);
}
opcSvr->Connect( opcSvrName );
上面的代码执行失败,请高人指点原因。