Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remote connect problem #5

Open
mzillgith opened this issue Jun 26, 2017 · 3 comments
Open

Remote connect problem #5

mzillgith opened this issue Jun 26, 2017 · 3 comments

Comments

@mzillgith
Copy link
Contributor

Hi,
I have a problem connecting to the Matrikon simulation server with the OPCClientDemo. The local connect works fine but the remote connect doesn't work. After showing the remote servers correctly and selecting the desired server the function GetCLSIDFromRemoteRegistry fails. It seems the RegQueryValueEx call returns only garbage and the CLSIDFromString call fails. Then later throwing an exception in makeRemoteObject.

Does anybody have an idea what might be the reason? From wireshark it seems that the remote registry access works.

I wonder why the remote registry access is required at all. When using some other clients (e.g. Softing demo client) the connection works also without using remote registry. I guess they are using the OpcEnum.exe for getting the clsid?

@mzillgith
Copy link
Contributor Author

I have not yet figured out why the remote registry access doesn't work. But I refactored the code so that the connectDAServer call can now be called using the CLSID directly and added a method to get the CLSID by using the CLSIDFromProgID call of IOPCServerList. This way the remote registry service is not required and the OPC means are used instead of accessing the registry directly.

@dontsovcmc
Copy link

@dontsovcmc
Copy link

See our solution: dontsovcmc@29090df#diff-fa9728931b02835223e8215008ea12f9R77

We call CoCreateInstanceEx with athn.dwAuthnLevel = RPC_C_AUTHN_LEVEL_NONE; if RPC_C_AUTHN_LEVEL_CONNECT error

gc87 added a commit to gc87/OPC-Client-X64 that referenced this issue Aug 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants