Use of the VLanControl.dll in C#?

All you've ever wanted to know about the ActiveX, Mozilla plugins, the web interface and various PHP extensions
CodeZilla
Blank Cone
Blank Cone
Posts: 11
Joined: 28 Jun 2007 15:40

Use of the VLanControl.dll in C#?

Postby CodeZilla » 02 Jul 2007 08:45

Hi there,

I have managed to build the VLanControl.dll according to the WIKI http://wiki.videolan.org/.Net_Interface_to_VLC. However there was an error shown during compilation on the following line:

Code: Select all

Error 1 'VLanControl.VlcUserControl' does not contain a definition for 'VlcUserControl_Resize' C:\C#\VLCUserControl\VlcUserControl.Designer.cs 112 57 VLanControl
Therefore I removed the line

Code: Select all

this.Resize += new System.EventHandler(this.VlcUserControl_Resize);
and then I could build the DLL file.
But I am not sure if everything is correct with that DLL file, as I can't get it working. Maybe someone can share his DLL. My VLanControl.dll is 61.440 bytes large.

Then the next steps I've tried:
1. Copy VLanControl.dll into my VLC Test Project folder "C:\C#\VLCTest\VLCTest\bin\Debug"
2. Copy libvlc.dll from the VLC application folder (I have version 0.8.6c installed) into "C:\C#\VLCTest\VLCTest\bin\Debug"
3. Copy "plugins" flolder with all files from the VLC application folder into "C:\C#\VLCTest\VLCTest\bin\Debug\plugins"
4. In my VLC Test C# project I doa "Add as Reference" the "VLanControl.dll"

Then all my next steps are not successful, I can't run any video, futhermore I get only empty controls and nothing is displayed :(

How to proceed? Can someone share some code how to run/show a video in my project?

I can't find and any hint on the WIKI page.

I am using Visual Studio 2005 on Win XP.

Thanks.

CodeZilla
Blank Cone
Blank Cone
Posts: 11
Joined: 28 Jun 2007 15:40

Re: Use of the VLanControl.dll in C#?

Postby CodeZilla » 03 Jul 2007 09:58

No idea or hint form anyone?

I have tried now to add the DLL into the Toolbox of VS, I get the InnerVlcWindow and VlcUserControl but inside these controls nothing is displayed and they are empty.
Also trying to play a Movie doesn't work.

Who has got that working and how?

cmacholz
New Cone
New Cone
Posts: 4
Joined: 18 Jul 2007 21:43

Re: Use of the VLanControl.dll in C#?

Postby cmacholz » 18 Jul 2007 22:12

I ran into the same problem today. I also commented out

1) //this.Resize += new System.EventHandler(this.VlcUserControl_Resize);
That compiled the project and created the dll.

2)Then you have to register the dll. So in the debug or release folder, at a command prompt type this:
%WINDIR%\Microsoft.net\Framework\v2.0.50727\regasm VLanControl.dll /codebase

3) Then I created another windows app and used the control. Seem to be working. I loaded a mpg file and access a video stream from another computers web cam.

Hope that helps.

CodeZilla
Blank Cone
Blank Cone
Posts: 11
Joined: 28 Jun 2007 15:40

Re: Use of the VLanControl.dll in C#?

Postby CodeZilla » 19 Jul 2007 10:09

I didn't get it working :(

I am now using the VLC ActiveX control which works fine.

manjeet.soor
New Cone
New Cone
Posts: 2
Joined: 30 Jul 2007 18:37

Re: Use of the VLanControl.dll in C#?

Postby manjeet.soor » 30 Jul 2007 21:05

I still can't get it to work.

I am using C# in VS2005. I don't see any video, no matter what file (.mpg, .mov, .wmv) I select.

Can you help me how to run video files?

I have built VLanControl.dll and installed the ActiveX controls. I dropped the VLCUserControl on the form (vlcUC)

In form_Load event, I am doing

vlcUC.AddAndPlay(@"C:\Temp\chapters.mov", "");

But nothing happens.

TIA

CodeZilla
Blank Cone
Blank Cone
Posts: 11
Joined: 28 Jun 2007 15:40

Re: Use of the VLanControl.dll in C#?

Postby CodeZilla » 31 Jul 2007 19:32

I will upload an example tomorrow which is using the ActiveX Control. I hope this will help you then.

Brgds

CodeZilla
Blank Cone
Blank Cone
Posts: 11
Joined: 28 Jun 2007 15:40

Re: Use of the VLanControl.dll in C#?

Postby CodeZilla » 01 Aug 2007 11:05

Ok guys,

as said yesterday, here is the download of the small example I've made in C#:
http://www.megaupload.com/de/?d=WF9E7EII

To run this application, it requires you to have VLC application installed (including the ActiveX control). I am using version 0.8.6c and it works fine.

Hope that code helps you.

Brgds.

CodeZilla
Blank Cone
Blank Cone
Posts: 11
Joined: 28 Jun 2007 15:40

Re: Use of the VLanControl.dll in C#?

Postby CodeZilla » 10 Aug 2007 09:01

Was the example I've made helpful/working for you?

xkudos
New Cone
New Cone
Posts: 2
Joined: 31 Aug 2007 11:18

Re: Use of the VLanControl.dll in C#?

Postby xkudos » 31 Aug 2007 13:14

Hya gents, great job done so far, if i wanted to go a bit further, instead of reading a file from my local c, if i wish to read a file from a DB, how can i do that.


tks

Jack

LonePirate
New Cone
New Cone
Posts: 1
Joined: 02 Sep 2007 16:05

Re: Use of the VLanControl.dll in C#?

Postby LonePirate » 02 Sep 2007 16:08

Has anyone gotten this to work NOT being an ActiveX control? If so how, and could you perhaps post some sample code?

CodeZilla
Blank Cone
Blank Cone
Posts: 11
Joined: 28 Jun 2007 15:40

Re: Use of the VLanControl.dll in C#?

Postby CodeZilla » 02 Sep 2007 20:04

No, I didn't get it working. A small sample download would really be helpful! Maybe someone else could assist, the WIKI page does not really help here.

Archon^^
New Cone
New Cone
Posts: 3
Joined: 09 Sep 2007 14:11

Re: Use of the VLanControl.dll in C#?

Postby Archon^^ » 09 Sep 2007 16:24

I've got it working - you've got to put plugins in right directory.

CodeZilla
Blank Cone
Blank Cone
Posts: 11
Joined: 28 Jun 2007 15:40

Re: Use of the VLanControl.dll in C#?

Postby CodeZilla » 09 Sep 2007 17:26

Which I actually did. Can you please upload an example?

videolan_user
New Cone
New Cone
Posts: 4
Joined: 17 Sep 2007 16:12

Re: Use of the VLanControl.dll in C#?

Postby videolan_user » 17 Sep 2007 16:30

Hi All,

I am facing some similar issues. i have to connect videolan and labview using C DLL. Could anybody please tell me how should i do it. If you have any sample code, please share it here.
million thanks!

swatforce
Blank Cone
Blank Cone
Posts: 21
Joined: 12 Mar 2008 06:31

Re: Use of the VLanControl.dll in C#?

Postby swatforce » 02 Apr 2008 05:16

Hi Codezilla!
Have you resolved your problem? I meet the problem totally the same with you!
VLanControl.dll is loaded successfully in test page, but it can't play video. However myVLan.AddAndPlay() returns success!
I see some friends say the dll should be in the right dir. Can I get some more detail info about it?
Also you can email me to: dongbi_lei#yahoo.com
Thx in advance!

kobe08
Blank Cone
Blank Cone
Posts: 16
Joined: 12 Nov 2007 03:06

Re: Use of the VLanControl.dll in C#?

Postby kobe08 » 02 Apr 2008 18:25

I am facing similar problems...
I managed to compile the VLanControl.dll, with comment on the line of resize_something_bla_bla_bla

Then I copyied this dll and the plugins folder to the /bin/debug
I added the reference on my C# application but i can´t get the control in the toolbox and when i tryied to compile my application it gives-me this error:

Code: Select all

The type 'System.Windows.Forms.UserControl' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
can anyone help here?

Code: Select all

public partial class Form6 : Form { VLanControl.VlcUserControl vlc = new VLanControl.VlcUserControl(); Timer timer; bool sizingNeeded; public Form6() { InitializeComponent(); vlc.Parent = this; vlc.Dock = DockStyle.Fill; } (...)
Could it be because i am trying to develope a smartdevice application??...
with the activex i am facing this problem...i can´t use the control in a smartdevice application but i can use it in a windows application.

swatforce
Blank Cone
Blank Cone
Posts: 21
Joined: 12 Mar 2008 06:31

Re: Use of the VLanControl.dll in C#?

Postby swatforce » 03 Apr 2008 04:30

Hi kobe , what do you mean that put the plugin folder into the debug dir? What's the 'plugin folder'? I just put libvlc.dll into debug dir, my test js page can find the dll but cannot play video...
thx!

badubo
Blank Cone
Blank Cone
Posts: 17
Joined: 18 Jan 2006 23:06

Re: Use of the VLanControl.dll in C#?

Postby badubo » 04 Apr 2008 11:01

@kobe08
Are you sure you added "System.Windows.Forms" in the references of your project?

Also, it is better to put this code :

Code: Select all

vlc.Parent = this; vlc.Dock = DockStyle.Fill;
in the onload event of your form and not in the constructor because in the contructor, the handle of the form is (at least on vista) not yet created.

jjrai
New Cone
New Cone
Posts: 4
Joined: 07 Apr 2008 18:00

Re: Use of the VLanControl.dll in C#?

Postby jjrai » 29 Apr 2008 23:18

Did you copy the plugins folder to your bin directory?

jjrai
New Cone
New Cone
Posts: 4
Joined: 07 Apr 2008 18:00

Re: Use of the VLanControl.dll in C#?

Postby jjrai » 29 Apr 2008 23:21

Hi kobe , what do you mean that put the plugin folder into the debug dir? What's the 'plugin folder'? I just put libvlc.dll into debug dir, my test js page can find the dll but cannot play video...
thx!
If you look under C:\Program Files\VideoLAN\VLC which is the default location for your VLC installation, you will see a plugin folder. This plugin folder needs to be copied and pasted to the same folder level as your exe.

davemaster
New Cone
New Cone
Posts: 2
Joined: 08 Aug 2010 20:55

Re: Use of the VLanControl.dll in C#?

Postby davemaster » 08 Aug 2010 21:02

Hi there,

I have managed to build the VLanControl.dll according to the WIKI http://wiki.videolan.org/.Net_Interface_to_VLC. However there was an error shown during compilation on the following line:

Code: Select all

Error 1 'VLanControl.VlcUserControl' does not contain a definition for 'VlcUserControl_Resize' C:\C#\VLCUserControl\VlcUserControl.Designer.cs 112 57 VLanControl
Therefore I removed the line

Code: Select all

this.Resize += new System.EventHandler(this.VlcUserControl_Resize);
and then I could build the DLL file.
But I am not sure if everything is correct with that DLL file, as I can't get it working. Maybe someone can share his DLL. My VLanControl.dll is 61.440 bytes large.

Then the next steps I've tried:
1. Copy VLanControl.dll into my VLC Test Project folder "C:\C#\VLCTest\VLCTest\bin\Debug"
2. Copy libvlc.dll from the VLC application folder (I have version 0.8.6c installed) into "C:\C#\VLCTest\VLCTest\bin\Debug"
3. Copy "plugins" flolder with all files from the VLC application folder into "C:\C#\VLCTest\VLCTest\bin\Debug\plugins"
4. In my VLC Test C# project I doa "Add as Reference" the "VLanControl.dll"

Then all my next steps are not successful, I can't run any video, futhermore I get only empty controls and nothing is displayed :(

How to proceed? Can someone share some code how to run/show a video in my project?

I can't find and any hint on the WIKI page.

I am using Visual Studio 2005 on Win XP.

Thanks.
Greetings,

I'll try last night, the same as you. Just comment that line... a reference to a function not yet implemented...

best regards

davemaster
New Cone
New Cone
Posts: 2
Joined: 08 Aug 2010 20:55

Re: Use of the VLanControl.dll in C#?

Postby davemaster » 08 Aug 2010 21:04

I am facing similar problems...
I managed to compile the VLanControl.dll, with comment on the line of resize_something_bla_bla_bla

Then I copyied this dll and the plugins folder to the /bin/debug
I added the reference on my C# application but i can´t get the control in the toolbox and when i tryied to compile my application it gives-me this error:

Code: Select all

The type 'System.Windows.Forms.UserControl' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
can anyone help here?

Code: Select all

public partial class Form6 : Form { VLanControl.VlcUserControl vlc = new VLanControl.VlcUserControl(); Timer timer; bool sizingNeeded; public Form6() { InitializeComponent(); vlc.Parent = this; vlc.Dock = DockStyle.Fill; } (...)
Could it be because i am trying to develope a smartdevice application??...
with the activex i am facing this problem...i can´t use the control in a smartdevice application but i can use it in a windows application.
Greetings,

Try removing from project properties the vlancontrol.sdk reference (password reference)

Best regards


Return to “Web and scripting”

Who is online

Users browsing this forum: Bing [Bot] and 1 guest