Active X and .NET - Has anyone got it working?

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
markEmark
Blank Cone
Blank Cone
Posts: 10
Joined: 26 May 2005 10:49

Active X and .NET - Has anyone got it working?

Postby markEmark » 31 May 2005 16:21

Hi Everyone,

I was wondering if anyone has got the VLC ActiveX component working with a .NET windows application?

Just so you know, I am doing this in Windows XP, with .net framework 1.1 using VS.NET 2003

I have tried this so far.....

1. Installing VideoLan 0.8.2
2. Running a RegSvr32 AXVLC.dll
3. aximp c:\programe files\videolan\vlc\axvlc.dll
4. Then Including the output DLLS in my VS.NET project
5. Then the below code

Code: Select all

AxVLCPlugin vlcPlugin = new AxVLCPlugin(); //vlcPlugin.CreateControl(); //vlcPlugin.setVariable("SRC", ""); //vlcPlugin.setVariable("height", 100); //vlcPlugin.fullscreen(); vlcPlugin.addTarget("http://vthr.videolan.org/~dionoea/april/theo256-vorbis32.ogg", new string[] {":input-repeat"}, AXVLC.VLCPlaylistMode.VLCPlayListGo, -666); vlcPlugin.Visible = true; vlcPlugin.play();
The error I get from this particular code (ignoring all the commented out code) is ... InvalidActiveXStateException thrown...

If anyone has some simple code working it would be much appreciated if they could pass it on...

Regards

M

Quovodis
Cone that earned his stripes
Cone that earned his stripes
Posts: 271
Joined: 16 Jun 2004 11:13
Location: Cork, Ireland

Postby Quovodis » 31 May 2005 22:53

the activex plugin is currenty designed to work from within an OleContainer, (such as Internet Explorer) and not standlone. unfortunately, I am not a .NET expert, but I think you may need to add it to a WinForm , or any graphical container.

markEmark
Blank Cone
Blank Cone
Posts: 10
Joined: 26 May 2005 10:49

Thanks...

Postby markEmark » 31 May 2005 22:59

Hi Quovodis,

Thanks for that, I was trying to add it to a win form, but I did not realise it was designed to work within an OLE container... I will now try and figure out how to do that ;)

If anyone else has figured it out if you would please give me a simple code sample it would be much appreciated.

Regards

M

Quovodis
Cone that earned his stripes
Cone that earned his stripes
Posts: 271
Joined: 16 Jun 2004 11:13
Location: Cork, Ireland

Postby Quovodis » 31 May 2005 23:12

what I tried to say is that you may have to add the plugin to a WinForm (which is an Ole Container, as far as I now) before you use any functions or properties

shinji

Postby shinji » 14 Jun 2005 15:55

Has anyone found a solution to that problem?
I tried drag'n'dropping the COM Component on to a Windows Form and get this error:

"Unable to get the window handle for the ''AxVLPlugin' control. Windowless ActiveX controls are not supported."

Visual Studio 2005 beta 2 crashes on this error using VLC 0.8.2-test2.
Any ideas or code snippets to get this working???

Best Regards,

shinji

markEmark
Blank Cone
Blank Cone
Posts: 10
Joined: 26 May 2005 10:49

Postby markEmark » 14 Jun 2005 15:59

Hi Shinji,

I had the same problem with VS.NET 2003.

So if anyone knows how to get around this any example would be much appreciated....

Maybe this question would be better posted in a .NET forum.

I will do so and see what comes back and keep this thread updated.

Regards

M

orix_

Postby orix_ » 15 Jun 2005 08:53

VideoLan 0.8.2
could anyone kindly tell me where can i get one copy?

shinji

Postby shinji » 15 Jun 2005 10:32

Hi markEmark,

I will also try to find a workaround on this error and really appreciate if you keep this thread updated!
I worked with some ActiveX controls before, that have a window "mode" like the MediaPlayer control. Other controls with such a window mode could also be used the way you posted before. But vice versa seems to fail, now. :cry:

Do you know what this autogenerated code does?

Code: Select all

((System.ComponentModel.ISupportInitialize)(this.axSomeControl)).BeginInit(); this.SuspendLayout(); ... ... ((System.ComponentModel.ISupportInitialize)(this.axSomeControl)).EndInit(); this.ResumeLayout(false);
This is added to InitializeComponent() dropping an ActiveX control to a Form.


Regards,

shinji


@orix_
you can find here: viewtopic.php?t=9757

not_logged

Postby not_logged » 23 Jun 2005 13:43

I had the same problem working with delphi. The control is imported well, and a delphi-wrapper auto generated, but when I try to add it to an OLE container it gives a bad pointer exception.

This works well for other ActiveX controls, so I think it is something in the axvlc.dll initialization code.

Any clue??

markEmark
Blank Cone
Blank Cone
Posts: 10
Joined: 26 May 2005 10:49

Not nice workaround....

Postby markEmark » 23 Jun 2005 13:48

Hi Everyone,

The only work around I used (it was for a demo only) was embed the VLC ActiveX in a web page and load a browser control in my winform app.

Like I say its not really a nice work around but it worked...

Regards

Mark

fred131
New Cone
New Cone
Posts: 3
Joined: 18 Aug 2004 10:00

How to use videolan 0.8.2 activex component in vs2003/vs2005

Postby fred131 » 27 Jun 2005 11:06

I am a newbie in videolan hope someone can help.
videolan 0.8.2 as downloaded from the 'sourcecode' section named
vlc-0.8.2.tar.gz or vlc-0.8.2.tar.bz2 seems not compilable in vs2003 or 2005. so we could only use axvlc vlc-200503082225.dll downloaded from
http://vthr.via.ecp.fr/~videolan/build/activex/

but where is the api and example of how to use active x 0.8.2 in window form in dot net framework 2.0 and if we want to recompiled a new activeX based on the source code how to we do it, can someone explained in details ?

Thanks :lol:

markEmark
Blank Cone
Blank Cone
Posts: 10
Joined: 26 May 2005 10:49

Postby markEmark » 27 Jun 2005 12:35

Hi Fred131,

Basically, I downloaded the binaries of the VLC 0.8.2 with the windows installer.

Then make sure you check the ActiveX installation, you are then left with AXVLC.dll in the install path.

This is what I have been using to try and integrate .NET and VLC.

I am only guessing but.......
I am assuming the source code is in either C or C++ which are not manage code in this case that is why they will not comple the source (or the libraries needed are not there)... I have never tried the source.

Regards

markEmark

Quovodis
Cone that earned his stripes
Cone that earned his stripes
Posts: 271
Joined: 16 Jun 2004 11:13
Location: Cork, Ireland

Postby Quovodis » 27 Jun 2005 13:53

I've fixed a few bugs in the ActiveX plugin and it looks like it works fine with VB 6. Unfortunately, those fixes didn't make their way into 0.8.2
however they are available in 0.8.3-svn (as of Monday, the 27th of June)

I do not own a copy of VB .NET (or any other .NET products), hence I would be grateful if someone test the plugin with .NET and report back

fred131
New Cone
New Cone
Posts: 3
Joined: 18 Aug 2004 10:00

HI everyone

Postby fred131 » 27 Jun 2005 16:06

Yah I can give it a try but most likely i would have to go through the documentation first.
By the way "Quovodis" you said you have some debugged components but do you have documentation of how you have modified it and also where to download it the "vlc 0.8.3-svn". Actually I don't know how to compile the source code, they say using Cygwin or something but if it can be converted to managed code it would be much easier...or we have to use c++ interop or IJW to make it work in a mixed managed and unmanaged code
If it is small enough you can email to me the relevant file at tot6164@hotmail.com I would be glad to look at it.

:oops:

dionoea
Cone Master
Cone Master
Posts: 5157
Joined: 03 Dec 2003 23:09
Location: Paris, France

Re: HI everyone

Postby dionoea » 27 Jun 2005 16:15

If it is small enough you can email to me the relevant file at tot6164@hotmail.com I would be glad to look at it.
:oops:
or just put it on vhtr so everybody can have a look :p
Antoine Cellerier
dionoea
(Please do not use private messages for support questions)

Quovodis
Cone that earned his stripes
Cone that earned his stripes
Posts: 271
Joined: 16 Jun 2004 11:13
Location: Cork, Ireland

Postby Quovodis » 27 Jun 2005 19:32

I would suggest that you use the nightly build and re-register the activex control by executing: regsvr32 <absolute path to>\axvlc.dll

Guest

vlc vs vb6

Postby Guest » 12 Jul 2005 14:46

HI,

i've downloaded VLC version vlc-0.8.4-svn-20050701.
It has sub directory ActiveX with axvlc.dll. I was able to added it to VB6 form but i'm not able to make it play.

Call VLCPlugin1.addTarget("c:\media.wmv", Null, 12, -666)
Call VLCPlugin1.play

Any suggestion ?

Regards,
Rok

yanivz
New Cone
New Cone
Posts: 1
Joined: 06 Feb 2007 07:23

How to activate VLC in .Net

Postby yanivz » 06 Feb 2007 07:26

Please contact me by EMail & I explain you how it works 100%

ZMan


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: No registered users and 18 guests