0

When I load an image in windows media player using Windows 10 it freezes(in the Connecting state) and if I click the UI it crashes sometimes.

When It freezes I break out in Visual Studio and it takes me to this line wmpTest.Ctlcontrols.pause(); when I look at the state of Ctlcontrols in wmpTest it says "cannot evaluate expression because a native frame is on top"

UPDATE: when it crashes I get this message in the output window- The program '[6672] MyApp.exe' has exited with code -1073741819 (0xc0000005) 'Access violation'.

private void wmpTest_PlayStateChange(object sender, AxWMPLib._WMPOCXEvents_PlayStateChangeEvent e)
{
    if (e.newState == 3)
    {
        // playing

        wmpTest.Ctlcontrols.pause();//FEEZES here
        wmpTest.Ctlcontrols.currentPosition = 0;
        wmpTest.PlayStateChange -= wmpTest_PlayStateChange;
    }
}
Dev
  • 1,780
  • 3
  • 18
  • 46
  • Many existing questions about PlayStateChange trouble, like [this one](https://stackoverflow.com/questions/13770806/unable-to-call-wmps-controls-play-function-in-visualbasic/13792759#13792759) – Hans Passant Oct 21 '20 at 16:43
  • @HansPassant Thanks, Ill look into this, whats Bizarre is that this works for four other colleges and we all uses Windows 10. – Dev Oct 21 '20 at 16:52
  • @HansPassant I have added an update to my question, We have been using this code and it works for over 4 years but it does not work on my machine, I am not sure if am missing DLL, codecs etc? – Dev Oct 21 '20 at 21:05

0 Answers0