Home > Net >  OPC in connecting OPCServer HRESULTE_FAIL of COM component invocation returns the error
OPC in connecting OPCServer HRESULTE_FAIL of COM component invocation returns the error

Time:10-17

IPHostEntry IPHostEntry=Dns. GetHostByAddress (" 172.31.88.80 ");
//access opc server problems within the local area network (LAN)

StrHostName=ipHostEntry. The HostName. The ToString ();
//get on the local computer OPCServerName
Try
{
KepServer=new OPCServer ();
object serverList=KepServer. GetOPCServers (strHostName);
Foreach (string turn in (Array) serverList)
{
CmbServerName. Items. The Add (turn);
}
CmbServerName. SelectedIndex=0;
BtnConnServer. Enabled=true;
}
Catch Exception (err)
{
MessageBox. Show (" enumeration local OPC server error: "+ err. The Message," Message ", MessageBoxButtons. OK, MessageBoxIcon. Warning).
}

CodePudding user response:

Ladies and gentlemen, is like this, I have here a OPC client Demo, when connecting the OPCServer appeared for HRESULTE_FAIL COM component invocation returns the error of the error, an error is marked red, there is something wrong with the environment that is local client or server problem, please inform,

CodePudding user response:

If you can use the server environment can run normally wincc software development using prove your server no problem..


Otherwise the server has a problem is certainly not,. Try to use third party software even.
  • Related