LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DLL 1097 Error Call When running executable

Solved!
Go to solution

Hello,

 

I have a vi that is running great until I compile it, and then I get 1097 errors from my DLL call.  I am calling the DLL from the SW folder in program files, and I have the dll path coded into the vi (as shown in the screenshot) so It isn't getting packaged up with the .exe.  However, when I move the .exe to the file directory in program files that has the dll in it, everything works great.

 

I expect there is a problem with my build settings, but I can't for the life of me find it.  I have searched the forums for other topics, but none of them seem to address this specific snafu.  Any help would be greatly appreciated, and thanks in advance!

 

Nate

 

0 Kudos
Message 1 of 3
(1,274 Views)
Solution
Accepted by topic author nrosenberg340

Your swdll.dll almost certainly has other dll dependencies that are located alongside the swdll.dll. However Windows knows nothing about this and when trying to load the dll it can not resolve the dependencies and fails.

 

When you move your exe into your sw folder, the Windows dll search path changes since the directory in which an exe is located is one of the first places Windows will check for dlls, when they get requested. And voila, everything starts to work.

 

Your swdll with its dependencies is obviously meant to be installed in a calling processes installation directory to work properly!

Rolf Kalbermatter
My Blog
Message 2 of 3
(1,225 Views)

Hmm, the mfg seemed to think that I should only need the swdll.dll but you're right that does make sense.  I will try that and let you know how I go, thanks for the help!

0 Kudos
Message 3 of 3
(1,194 Views)