从函数中获得了类没有注册的异常 [英] Got class not registered exception from function
本文介绍了从函数中获得了类没有注册的异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
朋友们,
我是VC ++领域的新手,我从
Hello friends,
I am new in VC++ area and I got class not registered exception from the
AVIFileOpen()
函数中获得了类未注册的异常。
function.
HRESULT CAviExtract::OpenAviFile(CString szFile)
{
int nNumAudioStreams = 0;
try
{
hr = AVIFileOpen(&m_pAviFile, szFile, OF_READWRITE, NULL);
if(hr != S_OK)//Got Class not registered exception here.
return hr;
hr = AVIFileInfo(m_pAviFile, &m_pAviFileInfo, sizeof(m_pAviFileInfo));
if(hr != S_OK)
return hr;
hr = AVIFileGetStream(m_pAviFile, &m_pAVIVideoStream, streamtypeVIDEO, 0);
if(hr == AVIERR_NODATA || hr == AVIERR_MEMORY)
return hr;
hr = AVIStreamInfo(m_pAVIVideoStream, &m_pStreamInfo, sizeof(m_pStreamInfo));
if(hr != S_OK)
return hr;
}
catch(...)
{
}
return hr;
}
请帮我解决。我没有使用任何关于功能的COM和使用VS2005的Windows XP 32位。
Please help me to resolve it. I am not using any COM regarding functionality and using Windows XP 32 bit with VS2005.
推荐答案
文档 [ ^ ]说明一切:
Documentation[^] says it all:
根据注册表,AVIFileOpen中指定的文件类型没有处理它的处理程序。
According to the registry, the type of file specified in AVIFileOpen does not have a handler to process it.
粗略地说:你的系统无法为你提供一个能够播放那种类型文件的界面。
Roughly: your system cannot provide you an interface able to play files of that type.
这篇关于从函数中获得了类没有注册的异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文