32-bit client cannot connect to 64-bit server|Classic OPC: DA, A&E, HDA, XML-DA, etc.|Forum|OPC Foundation

Avatar
Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
Lost password?
sp_Feed sp_PrintTopic sp_TopicIcon
32-bit client cannot connect to 64-bit server
Avatar
Andrew Thomas
Member
Members
Forum Posts: 6
Member Since:
03/04/2014
sp_UserOfflineSmall Offline
1
04/05/2018 - 05:21
sp_Permalink sp_Print

I am writing a 64-bit OPC DA classic server.  I can connect to it without trouble with a 64-bit DA client.  However, I cannot connect with a 32-bit client.  The attempt to open the connection from the 32-bit client produces “Server execution failed”.  The 64-bit server is already running.

I have installed the latest version of OPCEnum, 64-bit version (V3.00.107).

The 32-bit client can see the 64-bit server in OPCEnum, so it is not a problem with OPCEnum.

Is there something that I need to do to register the 64-bit server in the Windows registry?  A 32-bit server registers in HKCR\Wow3264Node\CLSID, while a 64-bit server registers in HKCR\CLSID.  Does a 64-bit server need to appear in both places in the registry?

Is there some other reason why a 32-bit client cannot connect but a 64-bit client can?  For what it’s worth I’ve tried several 32-bit clients and they all fail in the same way.

Avatar
Randy Armstrong
Admin
Forum Posts: 1579
Member Since:
05/30/2017
sp_UserOfflineSmall Offline
2
04/05/2018 - 12:44
sp_Permalink sp_Print sp_EditHistory

It depends on how the 64-bit server registers itself. If it manually creates keys then they will need to manually create registrations in both locations. If it used Microsoft provided ATL APIs the the dual registration may occur automatically (not sure about this).

No matter which I believe the dual registration is required because, from the perspective of a 32-bit application, the 64-bit registry keys do not exist.

Note that a 32-bit process cannot load a 64-bit inproc DLLs and could have problems launching a 64-bit EXE (the 64-bit Program Files also does not exist). I would try testing with a pre-started 64 bit EXE and see if that makes a difference.

Avatar
Andrew Thomas
Member
Members
Forum Posts: 6
Member Since:
03/04/2014
sp_UserOfflineSmall Offline
3
04/17/2018 - 12:01
sp_Permalink sp_Print

Thank you, Randy.  I added the registry entries manually to Wow3264Node and I was able to make the connection.  Now I just need to figure out how to add them through code.  It does not appear that the ATL registration functions are going to do it for me automatically.

Forum Timezone: America/Phoenix
Most Users Ever Online: 510
Currently Online:
Guest(s) 45
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Forum Stats:
Groups: 2
Forums: 10
Topics: 1445
Posts: 4889