From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to handle dll pointer

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
 

Detailed Description

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

 

0 Kudos
Message 1 of 5
(2,660 Views)

LabVIEW cannot access to memory pointer. You will need a wrapper.

Benoit

0 Kudos
Message 2 of 5
(2,656 Views)
0 Kudos
Message 3 of 5
(2,649 Views)

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.

 

Rolf Kalbermatter
My Blog
0 Kudos
Message 4 of 5
(2,626 Views)

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.

0 Kudos
Message 5 of 5
(2,615 Views)