Click here to Skip to main content
15,901,122 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:

Using this dll for WMPlayer.
C#
using AxWMPLib;
using WMPLib;

C#
public static AxWMPLib.AxWindowsMediaPlayer wplayer = new AxWMPLib.AxWindowsMediaPlayer();
public static WMPLib.WindowsMediaPlayer wplayer_1 = new WMPLib.WindowsMediaPlayer();

Try to access this method, which is working...
C#
//state changed event handler
wplayer_1.PlayStateChange += new WMPLib._WMPOCXEvents_PlayStateChangeEventHandler((NewState) => wplayer_playstate_change(NewState, media, playlist));

I am changing the player DLL and in this code it gives me an error for invoke.
C#
wplayer.PlayStateChange += new AxWMPLib._WMPOCXEvents_PlayStateChangeEventHandler((NewState) =>  wplayer_playstate_change(NewState,media,playlist));

This is a method which I want to invoke:
C#
private void wplayer_playstate_change(int NewState, OmnisignMedia media, IEnumerable<OmnisignMedia> partialList)
{
}


Can u plz help in that case.
Posted
Updated 19-Feb-15 0:07am
v2

1 solution

Are you aware that the delegate for AxWMPLib (Activex Control Wrapper)

player_PlayStateChange(object sender, AxWMPLib._WMPOCXEvents_PlayStateChangeEvent e). So you might have to rewrite your code accordingly.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900