LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW Programming with calling class(DLL File)

LabVIEW Programming with calling class(DLL File)

Two questions : (About LabVIEW Class Object)
(1)How to use LabVIEW Class object in other LabVIEW project?(The LabVIEW Class must be compiled to DLL file, without source code)
(2)How to inherit from this Class in DLL file?

Step :
(a)Cearte one LabVIEW Class , then compile to DLL file.
(b)Create another project to reference this DLL file.....??????

Thanks.

 

0 Kudos
Message 1 of 3
(4,518 Views)

Hello,

You can use any language to write shared libraries as long as the shared libraries can be called using one of the calling conventions LabVIEW supports, either stdcall or C. Examples and troubleshooting information help you build and use shared libraries and successfully configure the Call Library Function Node in LabVIEW.

LabVIEW loads shared libraries in a unique application instance. Opening a shared library in a unique application instance prevents naming conflicts with VIs in the shared library, and VIs outside of the shared library.

Refer to the labview\examples\dll directory for examples of using shared libraries.

Hope this helps.

    Benjamin R.


Senior LabVIEW Developer @Neosoft


Message 2 of 3
(4,393 Views)


@Jacky576 wrote:

LabVIEW Programming with calling class(DLL File)

Two questions : (About LabVIEW Class Object)
(1)How to use LabVIEW Class object in other LabVIEW project?(The LabVIEW Class must be compiled to DLL file, without source code)
(2)How to inherit from this Class in DLL file?

Step :
(a)Cearte one LabVIEW Class , then compile to DLL file.
(b)Create another project to reference this DLL file.....??????

Thanks.


Have you tried to use the Adapt to Type possibility for the DLL Node? Sorry can't help you more, haven't ventured into LabVIEW OOP yet.

Of course you will have to make sure that the Caller uses the same OOP refnum type as does the callee. The DLL Interface does not allow for typed interface descriptions and the caller and callee have to agree themselves about the type of individual parameters for each function. If they don't you get a crash and that's just how the DLL interface was designed and works.

For more strictly typed interfaces you need things like ActiveX or .Net. Or you call the VI directly through VI server. I think that would be the best and you still can create a VI library with your VIs and the diagram removed.

Rolf Kalbermatter


Message Edited by rolfk on 02-18-2008 02:08 PM
Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 3 of 3
(4,381 Views)