LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why is my deployed application not executing functions from an external .dll?

My application executes python scripts via function calls made to the python C/API, python24.dll.  It works fine in the development environment, but my deployed application does not seem to find the .dll since the the application crashes at what seems to be the first attempt to access the python shared library.
 
I believe I've included all the necessary support files.  LV automatically included python24.dll into the installer.  And I've tried to make all the paths to script files and other support files point to where the app.exe is located...some debugging windows have shown the paths to be correct in the deployed app.  The call library function nodes are configured to find the python .dll in the win\system32 folder.
 
I feel like I'm missing some step in the build process since it works in the development environment, but perhaps there is some other trick using CLFN's that I don't understand.
 
I using LV7.
 
Thanks.
0 Kudos
Message 1 of 5
(2,442 Views)
Hello CraigerB,
 
It seems like you are doing everything the right way. Click on the following link for a related discussion forum post.
Here is what you can try:
1. Place the dll in the C:\WINDOWS\system32 on your development machine.
2. Make sure your Call Library Function Node VI is pointing to C:\WINDOWS\system32\python24.dll
3. Build your executable
4. LabVIEW will not make a copy of your python24.dll because it will treat it differently
5. Manually copy the python24.dll to the target PC's C:\WINDOWS\system32\
6. Make sure you have all supporting files for your python24.dll to insure the dll itself is working.
7. If you are using relative paths to call your dll, switch to hard paths, or take a look at this KB for relevent information.
 
Hope this helps!
Kalin T.
0 Kudos
Message 2 of 5
(2,425 Views)
Hi folks,
      I don't know what kind of dll "Python24.dll" is - is it possible it needs to be "registered" on target machine - using regsvr32.exe?
 
Cheers.
"Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)
0 Kudos
Message 3 of 5
(2,414 Views)

Generally standard C/C++ dlls do not have to be registered. ActiveX Controls need to be registered.

Best regards,

Kalin T.
0 Kudos
Message 4 of 5
(2,404 Views)

Hi Kalin,


Generally standard C/C++ dlls do not have to be registered. ActiveX Controls need to be registered.

Generally, but (having checked before posting) it seemed possible that python24.dll was not "ActiveX" yet still needed to registered.Smiley Surprised

If I can't find an answer where it's supposed to be, sometimes I'll search where it's not supposed to be.

... though, searching on "register python24.dll" turns-up zip!

So in this case suggesting regsvr32 is probably "barking up the wrong tree". Smiley Wink 

Cheers!

"Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)
0 Kudos
Message 5 of 5
(2,396 Views)