01-18-2019 03:58 AM
After some searching in the forum I was not able to handle the pointer from a DLL(in my situation).
The DLL function is the 'audio_get_track_description' from the VLC DLL(libvlc), this function returns a pointer.
Below VLC described the struct where the pointer points to.
Data Fields |
|
int | i_id |
char * | psz_name |
struct libvlc_track_description_t * | p_next |
Description for video, audio tracks and subtitles.
It contains id, name (description string) and pointer to next record.
I tried to make use of the moveblock function, the struct I put into this function contains 3 int.
Bart
01-18-2019 04:10 AM
LabVIEW cannot access to memory pointer. You will need a wrapper.
Benoit
01-18-2019 04:23 AM - edited 01-18-2019 04:27 AM
Is this not possible with moveblock?
01-18-2019 06:16 AM
How much C programming knowledge do you have?
This data structure is a so called linked list with embedded data pointer too. There are several problems to integrate that with LabVIEW. While it could be done it requires in fact more detail knowledge about C programming and data types than it would need to write a DLL wrapper in C to translate between this structure and a more LabVIEW friendly array of string handles. Also since there are pointers in the structure you would end up with conditional compile structures to handle the 32-bit and 64-bit case seperately. With a wrapper DLL you would simply recompile the DLL as 64-bit DLL.
While creating a wrapper DLL is an initial effort, the VLC API has other such functions so you will have to go through these troubles again sooner or later if you solve it all in the LabVIEW diagram. With a wrapper DLL the initial effort will be a little higher but adding new translation functions to such a wrapper will be mostly a copy/paste exercise.
01-18-2019 07:51 AM
Reading your comment I think it will not be easy.
I will leave for now, I saw that when using the activex of VLC it is much easier to use, so if the need is high I will use the activex components.
thatnks for you time.