From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

LoadLibrary fails with error code 8

Hello all,

 

I'm trying to load an external DLL module using the LoadLibrary function and when I do this the LoadLibrary function returns 0x8  Error: Not enough storage is available to process this command.

 

Does anyone knows something regarding this error, looks like it is related to the windows heap, but after several changes in the windows registry all looks like the same.

 

I'll appreciate all you comments.

 

0 Kudos
Message 1 of 8
(6,615 Views)

Hello Martin!

 

Tell me about you the memory behavior when you try call this DLL?

 

Which the LabVIEW version are you using?

 

Best Regards.

Rita Souza
Engenharia de Aplicações
National Instruments Brazil

0 Kudos
Message 2 of 8
(6,587 Views)

Hi!

 

I am using Labwindows CVI 2013 but the error appears in several versions of CVI.

What do you mean with "Memory behavior"?

 

Thanks in advance

 

0 Kudos
Message 3 of 8
(6,576 Views)

Hello MartinCarrá,

 

Are you loading a DLL that was built with CVI? How big is the DLL? Did you try installing the f1 Patch for LabWindows/CVI 2013?

Do you think you could send us a small project that reproduces this behavior? 

 

Thank you and best regards,

=Nelu F. || National Instruments.

Message 4 of 8
(6,552 Views)

I can send all the project if you want. but it is a big one. The dll is called from Teststand 

I think that the f1 patch is already installed. The version says: 13.0.0.0 (647)

 

The DLL compiled as release is 500Kb large.

 

 

 

0 Kudos
Message 5 of 8
(6,521 Views)

Hello MartinCarrá,

 

I'm not sure I understood the issue correctly. You have a project that you're building as a DLL in CVI 2013 with the Patch f1 installed. Do you load that DLL using LoadLibrary in another CVI application, when the error appears?

You said "The dll is called from Teststand". Is the problem in TestStand, then?

 

If you want, you could send us the DLL that's causing the problem, if the project in not very large or you could try to send us a reduced (simplified) version of your project that exhibits the erroneous behavior.

 

Best regards,

Nelu F. || National Instruments.

0 Kudos
Message 6 of 8
(6,515 Views)

The DLL is a communication module that is used in test stand.

 

The DLL itself is called from a second DLL. This one is directly called from test stand.

 

Sometimes I can put a single step in teststand and jump it, teststand will load the library and as the library is already loaded and the process is the same, everything works. 

But sometimes it doesn´t work at all.

 

All of this is compiled with CVI 2013 f1

 

I'm attaching a sequence that shows the problem and the complete code.

U can ignore the rest of the steps. it should not work at all showing the error 17004 in teststand. If you delete the dummy action the action "Initialize Protocol Library" will fail due to a loadlibrary error.

 

Thanks a lot for your support

0 Kudos
Message 7 of 8
(6,509 Views)

Hey Martin,

 

I'm looking into this a bit from the TestStand side, but I'm having some trouble reproducing the issue with the code you attached. Specifically, it seems like I'm missing a few components. One of these is the GLManProtocol DLL; while I have the source project for it, I was unable to build it into a DLL. Would you be able to send your DLL so I can be sure that my version is the same as yours? 

 

Another one I didn't have was the PreSteps.dll, which looks like a code module used in one of your custom step types. I'm hoping you have a folder of common shared DLLs that you could include--if so, it'd help us make sure we have everything we need to run the sequence.

 

 

Finally, as a troubleshooting step, I noticed that there were several steps in the sequence calling into other DLLs. It sounds like this issue is related only to the two DLLs you mentioned (the one TestStand calls, and the DLL that the first DLL calls). Could you try creating a test sequence that only contains these steps to see if the problem still occurs? If we can create a very simple file exhibiting the same behavior, it will help us reproduce the issue and narrow down what could be causing it.

 

I will continue to look into it, and will look forward to your reply!

0 Kudos
Message 8 of 8
(6,474 Views)