LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Need to reconfigure the DLL every time during start up of Labview

The DLL configuration need to be done every time eventhough I had set the search path correctly. The DLL is working fine after I reconfigure the DLL. I have no idea where the problem is.
0 Kudos
Message 1 of 6
(3,067 Views)
I am not real sure on what you are seeing or what your question is however it sounds like whenever you open a VI it searchs for a dll or you must reconfigure a call library function node. If that is the case you should be able to configure it the way you want or point to the dll once and then save the main VI. I suggest selecting Save All. From that point on you should not have to redo it.
0 Kudos
Message 2 of 6
(3,067 Views)
Hi,

If you mean you have to browse for the dll every time, you could try to

a) register the dll (regsvr32.exe),
b) put the dll in the system path, or
c) put it in a sub directory of the main.

LabVIEW should then be able to find it.

Regards,

Wiebe.


"ky" wrote in message
news:506500000008000000B3A10000-1042324653000@exchange.ni.com...
> The DLL configuration need to be done every time eventhough I had set
> the search path correctly. The DLL is working fine after I reconfigure
> the DLL. I have no idea where the problem is.
0 Kudos
Message 3 of 6
(3,067 Views)
Hi Wiebe,

You are right, I need to browse for the dll every time. But, I had the problem to register the dll as you suggested, i.e LoadLibrary("FLASH_START.dll") failed. "One of the library files needed to run this application cannot be found." Do you have any idea about this? It cannot works if the dll put in the system path. Could you explain further on method (c)?
Thanks.
0 Kudos
Message 4 of 6
(3,067 Views)
Hi Evan,

Yes, I need to reconfigure at the call library function node every time. It cannot work also after I select Save All. Do you have any idea? Thanks.
0 Kudos
Message 5 of 6
(3,067 Views)
Hi,

LoadLibrary doesn't register the DLL. Registering can be done in two ways:
calling the dll's function DllRegisterServer, or by calling the commandline
command regsvr32 "dll path". The second way it easier.

LabVIEW uses the LoadLibrary function internally to load the library. If you
do it yourself, you'll fail in the same way LabVIEW does. From the error you
get, there is a second dll that cannot be found, on which the first dll
depends.

LabVIEW (LoadLibrary) searches for a dll in the following order
Windows SDK>:

1.. The directory from which the application loaded.
2.. The current directory.
Windows XP: If
HKLM\System\CurrentControlSet\Control\SessionManager\SafeDllSearchMode is 1,
the current directory is the last directory searched. The default value is
0.

3.. The Windows system directory. Use the GetSystemDirectory function to
get the path of this directory.
Windows NT/2000/XP: The name of this directory is System32.

4.. Windows NT/2000/XP: The 16-bit Windows system directory. There is no
function that obtains the path of this directory, but it is searched. The
name of this directory is System.
5.. The Windows directory. Use the GetWindowsDirectory function to get the
path of this directory.
6.. The directories that are listed in the PATH environment variable.


If it cannot be found in one of these places, LabVIEW (or perhaps windows)
prompts the user for it.

So you need to put the dll (and any libraries needed by it) in one of there
places.

Regards,

Wiebe.


"ky" wrote in message
news:50650000000500000070230100-1042324653000@exchange.ni.com...
> Hi Wiebe,
>
> You are right, I need to browse for the dll every time. But, I had the
> problem to register the dll as you suggested, i.e
> LoadLibrary("FLASH_START.dll") failed. "One of the library files
> needed to run this application cannot be found." Do you have any idea
> about this? It cannot works if the dll put in the system path. Could
> you explain further on method (c)?
> Thanks.
0 Kudos
Message 6 of 6
(3,067 Views)