Page 1 of 1

Use of the VLanControl.dll in C#?

Posted: 02 Jul 2007 08:45
by CodeZilla
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.

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

Posted: 03 Jul 2007 09:58
by CodeZilla
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?

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

Posted: 18 Jul 2007 22:12
by cmacholz
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.

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

Posted: 19 Jul 2007 10:09
by CodeZilla
I didn't get it working :(

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

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

Posted: 30 Jul 2007 21:05
by manjeet.soor
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

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

Posted: 31 Jul 2007 19:32
by CodeZilla
I will upload an example tomorrow which is using the ActiveX Control. I hope this will help you then.

Brgds

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

Posted: 01 Aug 2007 11:05
by CodeZilla
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.

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

Posted: 10 Aug 2007 09:01
by CodeZilla
Was the example I've made helpful/working for you?

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

Posted: 31 Aug 2007 13:14
by xkudos
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

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

Posted: 02 Sep 2007 16:08
by LonePirate
Has anyone gotten this to work NOT being an ActiveX control? If so how, and could you perhaps post some sample code?

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

Posted: 02 Sep 2007 20:04
by CodeZilla
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.

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

Posted: 09 Sep 2007 16:24
by Archon^^
I've got it working - you've got to put plugins in right directory.

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

Posted: 09 Sep 2007 17:26
by CodeZilla
Which I actually did. Can you please upload an example?

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

Posted: 17 Sep 2007 16:30
by videolan_user
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!

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

Posted: 02 Apr 2008 05:16
by swatforce
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!

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

Posted: 02 Apr 2008 18:25
by kobe08
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.

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

Posted: 03 Apr 2008 04:30
by swatforce
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!

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

Posted: 04 Apr 2008 11:01
by badubo
@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.

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

Posted: 29 Apr 2008 23:18
by jjrai
Did you copy the plugins folder to your bin directory?

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

Posted: 29 Apr 2008 23:21
by jjrai
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.

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

Posted: 08 Aug 2010 21:02
by davemaster
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

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

Posted: 08 Aug 2010 21:04
by davemaster
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