LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

calling a labview dll with CVI/Problems with LStrHandle

Hello,
 
I'm trying to use a labview DLL (which I can't modify since I've no access to the source) in CVI. The function I use needs 1 LStrHandle as input and 2 LStrHandle as output. But I'm getting the following error message when I'm executing the function :
"error #3: "memory.cpp", line 563, labview 6.1"
 
I've tried to allocate memory to the handle but I'm not sure at all what I'm doing (when not doing this, I receive a general protection error) :
 
  hraw = (LStr**)DSNewHandle(sizeof(LStr));
  hout = (LStr**)DSNewHandle(sizeof(LStr));
  houtp = (LStr**)DSNewHandle(sizeof(LStr));
 
 
Thanks for helping,
Arnaud
0 Kudos
Message 1 of 4
(2,731 Views)
Hello Arnaud,

I find the following forum post that discuss the
Error #3 memory.cpp line 563
The error seems to be causesd from the LabVIEW DLL and not a CVI/Problems with LStrHandle
But could you post the cvi-project and the LabVIEW DLL, so that we can reproduce the error.


Best Regards
Benjamin
0 Kudos
Message 2 of 4
(2,702 Views)

Hi Benjamin,

Thank you for your answer.

Unfortunately, the other post didn't help me much.

The dll is provided by another company and so I cannot put it on the web without their agreement. Concerning CVI, I've tried to just declare the handles and to call the function contained in the dll. So basically I have juste this:

 LStrHandle hraw, hout, houtp;   

hraw = (LStr**)DSNewHandle(sizeof(LStr));
hout = (LStr**)DSNewHandle(sizeof(LStr));
houtp = (LStr**)DSNewHandle(sizeof(LStr));

dll_function('parameters'); 

Thanks again.

Best regards,

Arnaud

 

0 Kudos
Message 3 of 4
(2,698 Views)
Hello Arnaud,

take a look at the following
KnowledgeBase
"Error 3: memory.c line 593" When Passing an Array Handle to a LabVIEW DLL from External Code

Best Regards
Benjamin
0 Kudos
Message 4 of 4
(2,670 Views)