LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

NI Advanced HTTP Client - Cant use DLL in Executable

I am using the NI Advanced HTTP Client and have been for many months now.  Recently after updating LV, I am seeing an issue where when I use the code in an EXE or PPL, the code can no longer use the DLL.

 

I am currently working in LabVIEW 2025 Q3 64 bit. 


I found this article, and made the change to the Open Session.vi: https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019XJwSAM&l=en-US

Kenny_K_1-1770209996584.png

 

I then created an EXE that is JUST the Open Session.vi.

Kenny_K_2-1770210038606.png

Kenny_K_0-1770209949274.png

 


If I run the same Open Session.vi directly in the LabVIEW Development environment, I am able to execute the VI without issues.  NOTE: My development machine is different than the machine I was running the EXE on.

Kenny_K_3-1770210175005.png

 

 

 

 



Kenny

0 Kudos
Message 1 of 11
(314 Views)

I think it might be referring to the second error cause: file not found. Seems like the path to the DLL changed?

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 2 of 11
(243 Views)

If I make the path the same as what is on the DEV machine, the loading of the DLL gives the same error.

 

Kenny_K_0-1770729658901.png

 

I also tried adding the viSearchPath to the application ini file:

 

Kenny_K_1-1770729744731.png

I also tried leaving the DLL in the built EXE data folder.

Kenny_K_2-1770729832333.png

 

 

Kenny

0 Kudos
Message 3 of 11
(195 Views)

What is on the error cluster right after the DLL call ? 

What is the return code value from the DLL? 

0 Kudos
Message 4 of 11
(179 Views)

Kenny_K_0-1770739411016.png


Error out 2 is the error wire right from the dll node, and the DLL return is the number returned.

 

Kenny_K_1-1770739453701.png

 

 

Kenny

0 Kudos
Message 5 of 11
(170 Views)

The ni_httpClient.dll library is only a relatively thin wrapper around the curlimpl.dll installed elsewhere on the system. "C:\<program files>\National Instruments\Shared\nicurl\curlimpl.dll". That in turn needs the correct Microsoft C Runtime library installation, although since about Windows 10 this should be all upwards compatible, so is seldom the problem.

 

In older versions it used to reference nicurl and niopenssl in similar locations but that was somewhere around LabVIEW 2012 or so.

 

I'm not quite sure what makes you believe that lvwebclient.dll is a valid DLL. Is that your own DLL? Who made it? With which C compiler version? Ahhhh I see that is Darrens Advanced HTTP library. Seems you need to tag him about this, his compilation is most likely using some features of curimpl.dll that may have changed in a recent security update to that library. NI is since some time pretty aggressive about addressing any CVE security advisory fairly quickly and that could for sure cause compatibility breakage.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 6 of 11
(163 Views)

@Kenny_K wrote:

Kenny_K_0-1770739411016.png


Error out 2 is the error wire right from the dll node, and the DLL return is the number returned.

 

Kenny_K_1-1770739453701.png

 

 


So the return code is 2 from the dll. 

Dll can then be found, and can be called. The question is then why it returns 2 as a return code. 

Might be something else is missing.

0 Kudos
Message 7 of 11
(155 Views)

A built EXE with the Advanced HTTP API works fine for me in both LabVIEW 2025 Q3 and 2026 Q1 64-bit.

What is your specific version of Windows? Mine is Windows 11 Enterprise 23H2 build 22631.6491.

0 Kudos
Message 8 of 11
(119 Views)

Both PCs (Development and EXE) are Windows 11 24H2, 26100.7634.

 

I attached NI Max reports for software from both PCs.

 

I also did an uninstall and reinstall of the NI Adv HTTP package to reset any DLL linkage and did a Mass compile.

Kenny

Download All
0 Kudos
Message 9 of 11
(115 Views)

Kenny_K_0-1770756490085.pngKenny_K_1-1770756510442.png

Kenny_K_2-1770756531068.png

Kenny_K_3-1770756555343.png

Kenny_K_4-1770756594921.png

 

 

Kenny

0 Kudos
Message 10 of 11
(114 Views)