سؤال

I am trying to use AxVLCPlugin1/AxVLCPlugin2 in my WinForm. After some research, I've downloaded VideoLan 2.00, registered the axvlc.dll in my system, copied the plugins as well as dll's into project's output folder and added the control to my WinForm. If I try to run the code, I get:

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

The environment is under Windows 7 32bit, Visual Studio 2008 and its all running on .NET 3.5.

I've read that the problem might be due to VLC library not supporting the newer Windows 7, but that shouldn't be a problem with VLC 2+ versions. I have also tried older/newer versions of VLC but still no luck.

My sample code to start the video (using 2nd plugin):

  this.vlcMediaPlayer.Volume = 50;    
  this.vlcMediaPlayer.playlist.add(@"file:///C:\Users\Public\Videos\Sample Videos\Wildlife.wmv", "wildlife", " ");    
  this.vlcMediaPlayer.playlist.play();
هل كانت مفيدة؟

المحلول

The problem can be related to security feature of Windows called DEP (Data Execution Prevention), see link.

You can control its setting from here:

enter image description here

This explains the problem fairly well, see link.

نصائح أخرى

It is not necessary to copy dll files to your project dir. Simply add reference to AXVLC and AxAXVLC. Search for a video instruction on Youtube.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top