09-05-2007 01:19 PM
09-05-2007 02:34 PM
09-05-2007 07:10 PM
09-05-2007 08:10 PM
09-06-2007 10:29 AM
http://zone.ni.com/reference/en-XX/help/371361D-01/lvhowto/callcodefromotherproglangs/-Bob
09-06-2007 01:37 PM
There have been several suggestions but they all are not likely to work without some extra wrapper DLL code or similar thing.
Alex Chee wrote:I have an issue here. I need to have C++ (or other low level language) to interface specially made equipments. A C++ developer is doing that. But I also need to have Labview control a group RF equipments. Over the years, we have built a big number programs. I would like to have these two different program together. I perfer to use Labview to call C++ module.I looked Labview 8.5 and it seems possible to do that. An example is great.Thanks,Alex
#include <iostream> using namespace std; class CRectangle { int x, y; public: void set_values (int,int); int area () {return (x*y);} } * PRectangle; void CRectangle::set_values (int a, int b) { x = a; y = b; }:
extern "C" {
PRectangle CRectangle_cnstructor(void);
void CRectangle_destructor(PRectangle o);
void CRectangle_set_values(PRectangle o, int a, int b);
int CRectangle_area(void);
}
PRectangle CRectangle_cnstructor(void) {
return new CRectangle;
}
void _set_values(PRectangle o, int a, int b) {
o->set_values(a, b);
}
int CRectangle_area(PRectangle o) {
return o->area();}
void CRectangle_destructor(PRectangle o) {
delete o;
}
09-07-2007 03:40 AM