Use Activex with Visual studio 2003

All you've ever wanted to know about the ActiveX, Mozilla plugins, the web interface and various PHP extensions
Guest

Use Activex with Visual studio 2003

Postby Guest » 13 Jan 2006 22:57

Hello,
I load the vlc activex and the simples command without parameter like play() work. But the addTarget command return an error from the activex :

Code: Select all

addTarget("rtsp://mafreebox.freebox.fr/freeboxtv/201", "", 12, -666);
Have you an idea ?
Thanks

Guest

Postby Guest » 14 Jan 2006 02:32

I used VS Express 2005 for the exact same thing (freebox powaaaaa!) like this :
Player.addTarget(url, null, AXVLC.VLCPlaylistMode.VLCPlayListInsertAndGo, 0);

Worked like a charm ;-)

jlbrd

Postby jlbrd » 14 Jan 2006 22:20

This code :

Code: Select all

char url[] = "rtsp://mafreebox.freebox.fr/freeboxtv/201"; ax->addTarget(url, 0, VLCPlayListAppendAndGo, 0);
return on visual studio 2003 output :

Code: Select all

Error calling IDispatch member addTarget: Exception thrown by server.
and

Code: Select all

int i = ax->PlaylistCount();
return 0.

I don't understand where is the problem !

MRTrevorF
Blank Cone
Blank Cone
Posts: 12
Joined: 03 Nov 2005 14:02

Postby MRTrevorF » 16 Jan 2006 15:11

I use Visual Studio.NET 2003 (VB), and this is what I use to play a local file:

Code: Select all

movMain.addTarget(targetPath, Nothing, AXVLC.VLCPlaylistMode.VLCPlayListReplaceAndGo, -666)
Null didn't work for me, I had to use the keyword Nothing... I don't know if this helps in your situation or not.

tonsofpcs
Cone that earned his stripes
Cone that earned his stripes
Posts: 363
Joined: 04 Jan 2006 10:03
Location: Binghamton, NY, USA
Contact:

Postby tonsofpcs » 17 Jan 2006 01:11

I'm starting to document the ActiveX control here: http://wiki.videolan.org/index.php/ActiveX

Also, the options section should be an empty char if you don't want to send any options, not a 0. I haven't tried with VB.Net or VB 2005, but I do remember an issue with the way the two handle 'null', try using a 'null' value in the proper type (like "" for a null string, or 0 for a null integer). I think part of the problem might be your use of 12 (AppendAndGo), it may be that the control doesn't like appending to an empty playlist.


Return to “Web and scripting”

Who is online

Users browsing this forum: No registered users and 3 guests