Page 1 of 1

ActiveX control - something wrong with 2.2.1

Posted: 18 Apr 2015 18:26
by mmm777
Assumptions:

vlc = new AXVLC.VLCPlugin2();
vfh - WindowsFormsHost

-------------------------------------
wfh.Child = vlc;
-------------------------------------
Now here is an error: Cannot implicitly convert type 'AXVLC.VLCPlugin2Class' to 'System.Windows.Forms.Control'

`vlc.Dispose' - now it is not here

Re: ActiveX control - something wrong with 2.2.1

Posted: 19 Apr 2015 13:05
by Jean-Baptiste Kempf
Please share a project to reproduce.

Re: ActiveX control - something wrong with 2.2.1

Posted: 19 Apr 2015 21:32
by mmm777
Original project is here: http://clipplayer.codeplex.com/
It worked with previous versions of VLC

I made a simple example, for a demonstration:

[MainWindow.xaml]

Code: Select all

<Window x:Class="TestVLC.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:vlc="clr-namespace:AXVLC;assembly=Interop.AXVLC" Title="MainWindow" Height="350" Width="525" Loaded="Window_Loaded"> <Grid> <Grid.RowDefinitions> <RowDefinition x:Name="r1"/> <RowDefinition x:Name="r2" Height="20"/> </Grid.RowDefinitions> <WindowsFormsHost x:Name="wfh" Grid.Row="0" HorizontalAlignment="Stretch" Margin="0,0,0,0" VerticalAlignment="Stretch" Grid.ColumnSpan="3"/> </Grid> </Window>

[MainWindow.xaml.cs]

Code: Select all

namespace TestVLC { /// <summary> /// Interaction logic for MainWindow.xaml /// </summary> public partial class MainWindow : Window { AXVLC.VLCPlugin2 vlc = new AXVLC.VLCPlugin2(); public MainWindow() { InitializeComponent(); } private void Window_Loaded(object sender, RoutedEventArgs e) { wfh.Child = vlc; vlc.Dispose(); } } }
Errors:
Error 1 Cannot implicitly convert type 'AXVLC.VLCPlugin2' to 'System.Windows.Forms.Control'. An explicit conversion exists (are you missing a cast?) c:\users\mmm\documents\visual studio 2013\Projects\TestVLC\TestVLC\MainWindow.xaml.cs 33 25 TestVLC

Error 2 'AXVLC.VLCPlugin2' does not contain a definition for 'Dispose' and no extension method 'Dispose' accepting a first argument of type 'AXVLC.VLCPlugin2' could be found (are you missing a using directive or an assembly reference?) c:\users\mmm\documents\visual studio 2013\Projects\TestVLC\TestVLC\MainWindow.xaml.cs 34 17 TestVLC

Re: ActiveX control - something wrong with 2.2.1

Posted: 20 Apr 2015 23:53
by Jean-Baptiste Kempf
It should be fixed in the trunk of the activeX.

Re: ActiveX control - something wrong with 2.2.1

Posted: 21 Apr 2015 21:40
by mmm777
After recreating those files AXVLC.dll + AxAXVLC.cs is OK

It really worked for a long time without any changes in program, only 2.2.1 caused problems.

(Now VLC and program is 64-bit)

Code: Select all

"c:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\x64\AxImp.exe" "c:\Program Files\VideoLAN\VLC\axvlc.dll"

Re: ActiveX control - something wrong with 2.2.1

Posted: 04 May 2015 16:27
by Jean-Baptiste Kempf
After recreating those files AXVLC.dll + AxAXVLC.cs is OK

It really worked for a long time without any changes in program, only 2.2.1 caused problems.

(Now VLC and program is 64-bit)

Code: Select all

"c:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\x64\AxImp.exe" "c:\Program Files\VideoLAN\VLC\axvlc.dll"

Please test a nightly build from 2.2.2 or 3.0.0