LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

failure to load DLL

I am at the final stage of deploying my first build of my application and I keep getting the same problem over and over again ( to the point of madness almost) . I have a number of non- realtime menus, which provide set-up parameters login etc, prior to initiating a control loop on my RT target. I am using the invoke nodes to call a reference on my target hard-drive, ( I have built the full library including everthing I think I need + DLL's and ftp'ed this to my target hard-drive). I have run small example programmes with this, but when I try this using my real application I get a problem with the DLL's for the NAII boards( n75SD1rt.dll and n75ldrt.dll). I get the error message 1003,caused by a bad execution state, and I have followed the directions o
n your website which should resolver this ( as this does with my example ) placing the DLL's in the ni-rt\system directory and alternatively the ni-rt\system ( this looks to be correct considering the \PATH directory within the ni-rt.ini. After this fails I then target the RT machine and get the failed to load shared DLL error message for these two DLL's a number of times within the error box. I am convinced that the whole problem resolves around how these are called and where they are located. I have examined the ni-rt.dll file in detail and these are not called there in the startup path. I have even re-formatted the drive and installed everything fresh on my RT target with the hope of getting rid of this error. Once I'm over this, my application can be completed in a couple of days, it's just this integration issue that I have been stuck on. I am using the outputs of the RT comms wizard with modifications as the basis for the host/target interface and this works fine when I target th
e RT engne and run from there - the problems seems to be loading up from the hard/drive.
0 Kudos
Message 1 of 6
(4,453 Views)
My first thought would be that the DLL you are calling has dependencies that are missing. For example, I believe the NAII DLLs you are referencing require the CVI Run-Time Engine DLL for LabVIEW RT, "cvi_lvrt.dll". I believe putting this DLL, along with the ones mentioned above, in the ni-rt/system folder would resolve the issue.

There is a 3rd party utility called Dependency Walker (depends.exe) that shows DLL dependencies. Any DLL that your "top-level" DLL requires to run will be listed here. You don't need to worry about the OS-specific DLLs so much (kernel32.dll, user32.dll, gdi32.dll, ntdll.dll, etc) but the ones that do not come with the OS are required.

When calling VIs on the RT system by loading them from disk by reference, you must ensure *ALL* mod
ules required (including DLLs, any of that DLL's dependencies, vi.lib VIs, etc) are all in the same location on the RT system. The best way to ensure this is to build a startup.exe out of your dynamic VIs, and then call them by reference from within the startup executable.

There is more information about this here:
Bad Execution State and Error 1003 when Using VI Server to Start VIs Stored on an RT Controller

You can get Dependency Walker here:
Dependency Walker

Hope this helps,
Jeff Boettcher
Applications Engineering
National Instruments
0 Kudos
Message 2 of 6
(4,453 Views)
Jeff,
thanks for this. I tried this earlier actually whilst fiddling around and found that this does remove the error. I now have the joy of debugging error 63 and 66, but I think this is a timing issue with the TCP/IP. I have tried test applications which use similar code to call the remote application and these work fine, but I think the remote VI is either not being given enought time to load, of is failing to load for some reason. Any tips on this would be helpful but I am getting somewhere though on this. You where spot-on with this one though.

ta
0 Kudos
Message 3 of 6
(4,453 Views)
Hello,

The error 63 & 66 (sometimes 56 too) with the host VI of the RT Communication Wizard is often caused by FIFO errors on the RT side (which you don't see until the host VI actually runs). The cause of these FIFO errors is usually because one or more of the controls or indicators in the original time-critical VI is within a case structure that does not execute on the first iteration of the loop. Because of this, the FIFO does not get properly created. See the following document for more information on this.

RT Communication Wizard Creates RT FIFOs that May Not Get Initialized Correctly
0 Kudos
Message 4 of 6
(4,453 Views)

I have the same problem with the CEI-830. The system fails to deploy some functions although i installed the dll required (interface.dll, user32.dll and winmm.dll). I still have an error of deployment and my target displays the following message : Error loading "WINMM.DLL" : Missing export 'GetWinStationInfo' from USER32.DLL.

 

Thanks for your replies 

0 Kudos
Message 5 of 6
(3,656 Views)

Hi Fayet,

 

What software do you have running on the target? How have you installed the dll you need?

 

It sounds like the dll need wrappers for you to use them. How are you deploying your LabVIEW to the CEI-830?

Sappster
0 Kudos
Message 6 of 6
(3,624 Views)