LV 6.0.2: an App-built dll gives a runtime error when called by C 
Author Message
 LV 6.0.2: an App-built dll gives a runtime error when called by C

I want to use labview 6.0.2 VIs as DLL's in a Borland C++ Project.
Starting with the simple I have made a VI that returns a constant
int32 then built a dll with the Application Builder and put the dll
and include file in a BC++ project directory. Compile and link seems
to run well. But when excuting the call to the LV fuction gives Fatal
Error: labview.lib was not called from a Labview process.
It seems this question was posted before, but answer didn't help me,
Sorry.


Tue, 25 Nov 2003 22:44:19 GMT  
 LV 6.0.2: an App-built dll gives a runtime error when called by C
Hi Gabriela -

This question is answered in the KB article entitled : "LabVIEW.LIB
Error When Calling a DLL Built with LabVIEW"

The link for this document is ->
http://ae.natinst.com/operations/ae/public.nsf/fca7838c4500dc10862567...

Or you can go directly to www.ni.com/support and search for this
document and others to help.

The reason for this is that the old labview.lib does not know how to
correctly locate the LabVIEW Run-Time Engine when called.
From the document I posted ->
Your dll is most likely making a call If you want to call a Windows
DLL or CIN built with a version of cintools before LabVIEW 6.0, you
must relink the DLL with the labview.lib from 6.0. If you call an old
DLL or CIN in your LabVIEW DLL, you receive the aforementioned error
and the application terminates, because the old labview.lib does not
know how to correctly locate the LabVIEW Run-Time Engine when called
in this situation.

Good luck-
ben schulte
national instruments



Sat, 29 Nov 2003 04:50:31 GMT  
 LV 6.0.2: an App-built dll gives a runtime error when called by C
Thanks so far.
But the given answer is not working for me. I am using a very simple
VI that in itself does  not call any specific WIN or CIN dll's, at
least not to my knowledge. Instead, I am calling this VI, translated
into the form of an app-builder-built dll. I have moved all possible
LV-system-dlls and libs to the C-program directory and it still does
not help. So I am sorry Ben, but "this question is _not_ answered in
the KB article" and btw the given link is not accesible from here.
Gabi


Fri, 12 Dec 2003 19:37:42 GMT  
 LV 6.0.2: an App-built dll gives a runtime error when called by C
The answer to my problem did not lie in the DLL calling Win
subfunctions of it's own.
Instead you'll have to take account that all parameters, that are not
plain vanilla have to be handled (allocated, freed) by specials calls
to labview runtime functions. This is already true for a
structure(Labview Cluster), who's space cannot be just allocated in
your C-main program. You have to allocate that space by calling
DSNewHandle. Here you'll get back a type that'll make that funny
pointer to a pointer to a pointer thing that App-builder defines as
parameter more sensble.

Gabriela



Fri, 13 Feb 2004 15:30:59 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. LV 6.0.2: an App-built dll gives a runtime error when called by C

2. LV 5.1 App Build and Dynamic Loading

3. Call a sequence of VIs (not .exe)) in VB. only LV runtime engine Installed

4. Intel complier for calling DLL and build Dll

5. visual C++ giving runtime heap-check error in Py_Finalize(x)

6. 5.2e app giving DOS error 4:Too many open files

7. Visual ST 3.10 Pb: Overflow Error when building new Runtime image

8. CW4-app and Runtime error 502:WSLDIAL

9. Runtime Error opening an APP

10. Runtime can't be found when calling function in DLL

11. dlls and runtime calling

12. Help - DLL runtime error

 

 
Powered by phpBB® Forum Software