Search the Community
Showing results for tags 'shared library'.
-
I am trying to pass a 2d array initialized with large data in my c dll to labview, but no matter what I only get a pointer to the array at best shot. I want to get the array as return type from the function I get when I use labview shared library wizard. #include<stdlib.h> #include<stdio.h> #include<stdint.h> __declspec(dllexport) int* get_results(){ int *array; array=malloc(3*3*sizeof(int8_t)); int a=0; for (int y=0;y<3;y++){ for(int x=0;x<3;x++){ int index=y*3+x; array[index]=a; a++; } } return array; } for this I get "get results.vi" which after running it I only get a negative number. and for this one : __declspec(dllexport) int get_results(){ int *array; array=malloc(3*3*sizeof(int8_t)); int a=0; for (int y=0;y<3;y++){ for(int x=0;x<3;x++){ int index=y*3+x; array[index]=a; a++; } } return *array; } I got get results1.vi which I get nothing after running the vi. I don't know how should I make the function or dll that I get the array from the vi that shared library wizard gives me please help me get results1.vi get results.vi
- 8 replies
-
- dll
- external code
-
(and 1 more)
Tagged with:
-
Hi everybody, I am wondering whether or not it is possible to call the functions of a dynamic library over a LAN connection, without needing to control a VI on the server using the LV remote server (my server is Win7 embedded on an SSD, so not much resources to waste running the RTE). Does the "Shared library file is not on the local machine" checkbox allow that when using the Import Shared Library wizard? Is there any easier solution than implementing a protocol over a TCP connection to access my DLL's functions? Thanks in advance, Sylvain F.
- 6 replies
-
- dlllan
- shared library
-
(and 1 more)
Tagged with:
-
I'm trying to automate dll import using Jenkins. So the question is: is it possible to import dll in Labview using some sort of command line? Right now i have to do it manually by going to Tools>>Import>>Shared library (.dll). Then i have to select dll itself and .h file, wait a little and get my library. Every time dll and .h file changes (which happens with every new revision) process has to be repeated. It would be nice to automate it though. Any thoughs? Thank you in advance!
-
I need to provide a customer with a dll library with function prototypes that exactly match a provided .c header file. I would like to use LabVIEW if at all possible, as fast turnaround on source code modificaiton may be required. LabVIEW cannot export a function with a char* return type (verified by LabVIEW R&D), thus the customer application directly calls a thin wrapper dll (written in CVI) which then calls into the LabVIEW based dll. I have a subvi that is called by one of the exported VIs. This subvi acquires and analyzes waveform data from an instrument. Memory for a significant waveform (on the order of a MB) is thus dynamically allocated within the subvi. The waveform is not passed up to the caller, and the exported VI returns only a scalar double. If I remove the subvi from the exported VI's block diagram, other Exported functions behave as expected, However if the offending subVI is added to the block diagram of the exported VI, other exports in the DLL always return a value of "0" (default value for most numeric data types?). This is regardless of whether the Export that includes the SubVI is even called within the client application. It seems that the mere inclusion of the offending SubVI breaks the entire dll. Both the LabVIEW DLL and the wrapper DLL(which is in CVI) use only the cdecl calling convention. I get the same behavior for LabVIEW 2011 and 2011 SP1, and for CVI 2009 and 2010. I'm testing using MS Visual Studio C++, since that is the environment for the client application. Behavior is the same in VS 2005 and VS 2010. I definitely appreciate any insights or ideas regarding how to seek a resolution.
- 2 replies
-
- dll
- shared library
-
(and 1 more)
Tagged with: