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;
}
}