当前位置: 代码迷 >> Windows Mobile >> 急待
  详细解决方案

急待

热度:209   发布时间:2016-04-25 07:53:32.0
急急急,在线等待
HDC hdc;
RECT rcWnd;
IImage * m_pImage;
IImagingFactory * m_pImagingFactory;
HRESULT hr;
//COM初始化
if (FAILED(hr = CoInitializeEx(NULL, COINIT_MULTITHREADED)))
{  
goto END;
}
//创建COM实例
if(FAILED(hr = CoCreateInstance(CLSID_ImagingFactory,NULL,CLSCTX_INPROC_SERVER,IID_IImagingFactory,(void**) &m_pImagingFactory)))
{
goto END;
}
//从文件中创建图片
if(FAILED(hr = m_pImagingFactory->CreateImageFromFile(L"\\My Documents\\My Pictures\\play.gif", &m_pImage)))
{
goto END;
}
//绘制图片
if(FAILED(hr = m_pImage->Draw(hdc,&rcWnd,NULL)))
{
goto END;
}
END:
//释放资源
if(m_pImage != NULL)
{
m_pImage->Release();
m_pImage = NULL;
}

if(m_pImagingFactory != NULL)
{
m_pImagingFactory->Release();
m_pImagingFactory = NULL;
}
CoUninitialize();

报告1>ShowPicture.obj : error LNK2001: unresolved external symbol CLSID_ImagingFactory
1>ShowPicture.obj : error LNK2001: unresolved external symbol IID_IImagingFactory这个错误,是怎么回事啊,谢谢了啊


------解决方案--------------------
#include <INITGUID.h> 
#include <imaging.h> 

有问题可以问问
www.devdiv.net
  相关解决方案