09-24-2015 09:59 AM
Hi,
I asked this some time ago but no reply.. So I try again.
The target is to make an OPC server client connection by using the DataSocket as described in NI documentation.
But now there is the following error when running our SW in 64 bit mode:
Additional information: Could not load file or assembly 'NationalInstruments.Net, Version=15.0.45.49153, Culture=neutral, PublicKeyToken=4febd62461bf11a4' or one of its dependencies. An attempt was made to load a program with an incorrect format.
Is it possible that NationalInstruments.Net assembly has only a 32 bit version? At least in my PC it is only in 32 bit GAC. We prefer a 64 bit application..
BR,
Ilkka
09-25-2015 04:30 AM
Hi Ilkka,
From the following link, it seems that you cannot use the datasocket for a 64bit OS:
http://zone.ni.com/reference/en-XX/help/372636F-01/mstudiowebhelp/html/64bitsupport/
So the only way is to stay into a 32bit mode.
Hope that is helping!
09-25-2015 04:57 AM
Hi Jean,
Thanks for the clarification.
Yes.. the only way is to stay in 32 bit mode.. Or maybe the 32 bit code can be isolated into own process. It is already in own in-process assembly (dll) but now I need to make own exe and then some communication mechanism.. 😉 Or..
br,
Ilkka
09-25-2015 07:04 PM
Hi,
This is now the solution.. works fine. 64 bit application and 32 bit Windows service which encapsulates the 32 bit NationalInstruments.Net library.
The communication link is based on WCF (Windows Communication Foundation).
br,
Ilkka