When trying to connect to RSLinx Remote OPC Server, the vb2010 debugger points to dll.connect and gives this error message
CoCreateInstanceEx: Access is denied.
Source: opcnetapi.dll Err code: -2147467259
I think the err code translate to 0x80004005 = Unspecified error
This is what I entered for the opcDACom.vb:
where OPCServer = RSLinx Remote OPC Server
Private Sub CreateDLLInstance()
If DLL Is Nothing Then
DLL = New Opc.Da.Server(fact, Nothing)
DLL.Url = New Opc.URL("opcda://192.168.0.1/" & m_OPCServer)
'DLL.Connect(DLL.Url, New Opc.ConnectData(New System.Net.NetworkCredential()))
DLL.Connect()
'* Give time to startup
Threading.Thread.Sleep(2000)
End If
End Sub
When using Rockwell's RSLinx OPC Tester, I am able to connect to the remote opc server at 192.168.0.1 and read the items that I want. Is this because the OPC Tester have the correct DCOM permission and the Debug version of the Advanced HMI exe does not?
Is this entirely a DCOM permission problem, and if so how do I troubleshoot?
Regards,
Noob