Why using WIC in my 32 bit application fails in Windows 7 32 bit?

拥有回忆 提交于 2019-12-05 20:41:31

There is a breaking change in VS2012 because it targets Windows 8 by default.

The solution is to specify CLSID_WICImagingFactory1 instaed of CLSID_WICImagingFactory because the latter resolves to CLSID_WICImagingFactory2, which does not exist in Windows 7.

So try this

hr = CoCreateInstance(&CLSID_WICImagingFactory1, NULL, CLSCTX_INPROC_SERVER,
         &IID_IWICImagingFactory, &m_pIWICFactory);
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!