LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

The application has failed to start because my1.dll was not found

I compiled my0.dll by vistual c++ 2005, linking my1.lib with /MD compiler switch (my1.dll will be dynamically loaded).

It doesn't work with my0.dll at "e:\tmp" and my1.dll at "c:\windows\system32". The error is "the file is not a valid directory".

 

 

0 Kudos
Message 11 of 17
(1,293 Views)
Yes, but is the link, regardless of being dynamically loaded pointed to a specific path for it to be loaded (e:\tmp\mydll1.dll) or does it just say mydll1.dll.

You didn't test what I asked.  Have mydll1.dll in e:\tmp.  Mydll0.dll in c:\windows\system32.
0 Kudos
Message 12 of 17
(1,281 Views)
I test the way you suggested, it doesn't work.
0 Kudos
Message 13 of 17
(1,273 Views)
I created a new test.dll by visual c++ 2005, and compiled to x64 binary.
 
Put the dll file to c:\windows\system32, open Labview8.5 with a blank vi, drag a "call library function node" to the block diagram, config the node with library path and name set to "c:\windows\system32\test.dll", an error poped up "the file can not be found!".
 
Put the dll file to different directory, config the node with the new path, different error message "the file isn't a valid library!".
 
I tried to compile the dll to 32bit binary and did the same steps as above, the result is:
 
leave it at directory "c:\windows\system32", error "the file can not be found!".
at other directory, work well.
 
The dll file is a Win32 dll library, not using MFC, ATL.
Labview8.5 is a evaluate version downloaded from ni website.
The os is Vista 64 on AMD.
 
From the above, I think the problems may be related with both Labview8.5 and Vista 64. Labview8.5 doesn't support vista 64 well or Vista has some new mechanism with the directory of c:\windows\system32.
 
 
0 Kudos
Message 14 of 17
(1,266 Views)
Try SysWOW64 with the 32bit dll. It's backwards system32 holds 64bit binaries and SysWOW64 holds 32bit. I'm surprised that putting the dll's and exe in the same folder didn't work though (I'm guessing this is due to some twised combination of backwards compatibility and folder redirecting that WOW64 uses).


Message Edited by Matt W on 12-28-2007 04:31 AM
0 Kudos
Message 15 of 17
(1,262 Views)


@BadgerSoft wrote:

You can also put the dll anywhere.  It does not need to be in the system32 folder.


What you say is only correct for ActivX DLLs. They are registered and then their location is known to the system through its information in the registry that is used to instantiate the ActiveX object(s).

For standard C DLLs your advise is completely wrong and for .Net assemblies, which are also inside DLL files, it is mostly wrong.

Rolf Kalbermatter
Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 16 of 17
(1,254 Views)

Thanks for Matt W, it is the problem of SysWow64.

Labview8.5 can only reference 32bit dll by "call library funtion node" on Vista64. And the dll is redirected to directory "c:\windows\SysWow64\". That's why Labview can not find the 64bit dll which only resides in directory system32.

0 Kudos
Message 17 of 17
(1,240 Views)