Hi, I am new here, and new with LV.
I am developing a project with LabView 2013 SP1 f5 32bit. On windows 7 and windows 8.1. From my LabView application I need to call a VLC dll library for streaming of a video. VLC is open source and written in C. The first function I need to use has this prototype.
libvlc_instance_t * libvlc_new(int argc, int const char *const * argv);
And I need to call it with this ‘C’ parameters
libvlc_new(0, NULL);
It looks simple but I am having headaches with this.
This function should return a pointer to the new created instance, but calling libvlc_new() from LV using “call library function†VI returns NULL instead of a valid pointer, which means that an error occurred, therefore the call library function generate error 1097.
I placed the libvlc.dll, which contains the funtion libvlc_new(), and the related libvlccore.dll inside the data folder of the project as you can see in the attachment. Also the mp4 file to play is in the data folder.
I read on the community forum of LV that I need to create a wrapper in order to pass to a C function an array of pointers (to const char). I tried to do it but it doesn’t work
I don’t understand how to create the wrapper to the libvlc_new() function. There are many different opinions and strategy about this on the web, so I feel confused. I just need to call the libvlc_new() with this parameters: libvlc_new(0, NULL).
I tried many different option for the parameter setting and also tried the Ned’s solution, but unfortunately it didn’t work for me.
Can anyone give me an example about this? Attached you can find the VI that I wrote and that is NOT working. On this VI I am not using any wrapper.
Calling 'C style' argv argc from LabView.zip