09-19-2007 03:30 PM
09-20-2007 03:28 AM
@AIM-USA wrote:
Here is a twist to the problem of a DLL hanging LabView. Our development group sent me a set of vi's that call C functions from a DLL. When I try to open the vi's LabView hangs. I had the vi's changed so the 'Specify path on diagram' was checked. This resolved the problem of the vi's opening. Only problem is they wouldn't run when downloaded to PXI target running LabView RT. Now for the interesting twist. I kept trying to run the vi's with the 'Specify path on diagram' box checked but I never had any luck getting them to run. I then went back to original vi's ('Specify path on diagram' not checked) and they would now load and not hang LabView. On top of that, they downloaded to the target and executed without any problems.My question is what could changed in Labview? I didn't change any options or any parameters in the .ini file. I am trying to run the same vi's on a second machine and I'm having the DLL hang problem on that machine. Again, I've compared .ini files and LabView options and there are no differences. Any ideas?Thanks!
LabVIEW ini files and options have little to do with such kind of problems. It is most likely something the DLL in question tries to do on loading, that is causing this problem. A possibilitiy is that it is using C runtime libraries that are not present on the target system. If the DLL was compiled with VS 2005 it will almost always reference the mscvr70.dll or similar DLLs unless you go to great lengths when compiling and linking that DLL. Now are these Visual C runtime libraries sometimes standard part of Windows but seldom of a non MS OS like the RT targets are. Also the VS 2005 runtime libraries aren't delivered with Windows XP and older (not sure about Vista) so need to be installed from the Visual C Distributables Installer (but this will likely not work on RT systems since those runtime libraries have again dependencies on (privat and undocumented) functions in the Windows kernel.
Now if it would be just a simple dependency you should get an error when trying to dynamically load that DLL ('Specify path on diagram' checked) or an error box telling you that the DLL in question could not be found (when unchecked). The error is sligthly misleading since the DLL itself could be found but LabVIEW was not able to load it into memory since Windows refused to load it into memory because of missing dependancies.
The fact that loading the DLL does hang LabVIEW makes me guess that the DLL in question does try to do some magic in it's own loading function (DLL_PROCESS_ATTACH) and hangs in there because of missing Windows components or something.
This goes deep into Windows internals and without seeing the source code of the DLL in question it is almost impossible to give more detailed advice.
Rolf Kalbermatter
03-21-2008 07:02 AM
ERROR_TOO_MANY_MODULES 214 0xD6
Too many dynamic-link modules are attached to this program or dynamic-link module.
ERROR_NESTING_NOT_ALLOWED 215 0xD7
Cannot nest calls to LoadModule.03-24-2008 06:45 PM
05-15-2008 07:11 AM
05-15-2008 07:16 AM
05-15-2008 09:36 AM
05-15-2008 04:19 PM
05-15-2008 11:53 PM
05-16-2008 12:04 AM