本文介绍了媒体播放器全屏显示E_UNEXPECTED的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 限时删除!! 您好, 我一直试图让媒体播放器全屏播放。我在下面的代码中获得了hrFull的运行时异常,其中说E_UNEXPECTED灾难性故障。我看到这个,当我提出一个断点,其他明智的代码运行良好,虽然它没有全屏幕。通过右键单击正在运行的媒体播放器并选择全屏缩放,我可以全屏播放。 我的目标是点击一个按钮,全屏播放。 以下代码就是我正在使用的代码。此代码位于OnInitDialog中。 LPUNKNOWN pUnknown = m_MediaPlayer.GetControlUnknown(); // LPUNKNOWN pUnknown1 = m_MediaPlayer1.GetControlUnknown(); HRESULT hr = pUnknown-> QueryInterface( __ uuidof (IWMPPlayer),( void * *)及m_pWMPPlayer); // HRESULT hr1 = pUnknown1-> QueryInterface(__ uuidof(IWMPPlayer),(void **)& ; m_pWMPPlayer1); if (SUCCEEDED(hr)) { CComBSTR strMovie = _T( C:\\movie \\Hero 2004.mp4 ); m_pWMPPlayer-> put_URL(strMovie); VARIANT_BOOL bSc = VARIANT_TRUE; HRESULT hrFull; hrFull = m_pWMPPlayer-> put_fullScreen(bSc); } 任何方向都是最受欢迎的。 问候, Rakesh 解决方案 Hello,I have been trying to get the media player to play in full screen. I get a runtime exception for hrFull )below in code) which says E_UNEXPECTED catastrophic failure. I see this when I put a break point other wise the code runs fine though it doesnt go to full screen. By right clicking on the running media player and selecting zoom full screen I am able to play in full screen.My objective is to have a button clicking which should play full screen.The code below is what I am using. This code is in OnInitDialog.LPUNKNOWN pUnknown = m_MediaPlayer.GetControlUnknown();//LPUNKNOWN pUnknown1 = m_MediaPlayer1.GetControlUnknown();HRESULT hr = pUnknown->QueryInterface(__uuidof(IWMPPlayer), (void**)&m_pWMPPlayer);//HRESULT hr1 = pUnknown1->QueryInterface(__uuidof(IWMPPlayer), (void**)&m_pWMPPlayer1);if (SUCCEEDED(hr)){CComBSTR strMovie = _T("C:\\movie\\Hero 2004.mp4");m_pWMPPlayer->put_URL(strMovie);VARIANT_BOOL bSc = VARIANT_TRUE;HRESULT hrFull;hrFull = m_pWMPPlayer->put_fullScreen(bSc);}Any direction is most appreciated.Regards,Rakesh 解决方案 这篇关于媒体播放器全屏显示E_UNEXPECTED的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 1403页,肝出来的..
09-06 18:06