07-24-2012 04:01 PM
Hello,
I would like to ask you if there is a sollution to the following problem.
I have a PC (let us say PC1) on which I am using MathScript to write some code. From this code I created a Shared Library which resides on PC1.
On a remote PC2, I have a Labview program which performs some calculations. In order to perform the calculations I need to load in that program the Shared Library from PC1.
The program running on PC2 uses a Call Library Function Node which as input has the path of the dll.
Now if I move the library to PC2, all works fine.
Using the Run Time Engine and a Web Browser, I am calling the application from PC1. Before running the application, I provide the path for the library which resides on PC1.And I get an error which says that the library can not be found.
In my opinion, the application takes the path which I feed (corresponding to PC1) and searches for this path on PC2 where it executes. My path looks like:
E:\Remote data webserver\builds\CreateDLL\My DLL\SharedLib.dll
Should I include something else in this path so the application knows that it should take the dll from PC1??
Thank you and have a nice day.
07-24-2012 04:15 PM
The DLL must be on the same computer that is executing the VI, regardless of how you access that VI. You could possibly share the folder containing the DLL so that both PC1 and PC2 have access to it, but it will be slower than having it on the local disk.
07-25-2012 02:14 AM - edited 07-25-2012 02:16 AM
Is E: a mapped share to the PC1 computer? And are you sure you can see the DLL at that path location in explorer on PC2? Even if these two questions are answered positively, there might be in newer Windows OSes built in restrictions about loading shared libraries from remote locations!
Also, a LabVIEW generated DLL always runs in the according Runtime Engine with the same version as the LabVIEW version used to create the DLL. This means in order for a LabVIEW DLL to be loadable, you need to have that LabVIEW runtime engine installed on the computer you want to load the DLL into. PC2 has ABSOLUTELY no way to locate the LabVIEW runtime engine on PC1 so you need to install that on PC2 too, at which point you should ask yourself if it would be not a lot easier to copy the DLL itself as well to your PC2 instead of relaying on a potentially unreliable network connection.
07-25-2012 03:16 AM
Thank you for the answers.
I will create a directory so that the remote user can transfer his dll files from PC1 to PC2. Then, from the PC1 I will access via a web browser the application residing on PC2 and load the dll previously stored at the given path.
Thank you again and have a nice day.