请教OPCITEMDEF结构中szAccessPath的作用 点击:2253 | 回复:2



周星星

    
  • 精华:0帖
  • 求助:0帖
  • 帖子:4帖 | 32回
  • 年度积分:0
  • 历史总积分:45
  • 注册:2003年8月25日
发表于:2003-09-23 16:37:00
楼主
请教OPCITEMDEF结构中szAccessPath的作用,为什么我填个NULL则在有的OPC服务器上会出错,而乱填个任意字符串在任何OPC服务器上都不出错?既然可以乱填那它有什么作用?



zhangfei24

  • 精华:0帖
  • 求助:0帖
  • 帖子:0帖 | 24回
  • 年度积分:0
  • 历史总积分:62
  • 注册:2007年4月23日
发表于:2011-11-25 16:43:29
1楼

多老的帖子!

表示楼主已经老去!

 

不过总有人遇到类似问题。

zhangfei24

  • 精华:0帖
  • 求助:0帖
  • 帖子:0帖 | 24回
  • 年度积分:0
  • 历史总积分:62
  • 注册:2007年4月23日
发表于:2011-11-25 17:06:48
2楼

Description:

The access path the server should associate with this item. By convention a pointer to a NUL string specifies that the server should selec t    the access path. Support for accesspath is optional
NOTE: version 1 indicated that a NULL pointer would allow the server to pick the path however passing a NULL pointer will cause a fault in the proxy/stub code and thus is not allowed.

可以试试下面代码:(C#)

OPCITEMDEF[] Itemdefs = new OPCITEMDEF[1];

Itemdefs[0].szAccessPath = "";


热门招聘
相关主题

官方公众号

智造工程师