无法转换类型为' System .__ ComObject'的COM对象。接口类型' IImageList'

时间:2012-05-18 19:11:59

标签: c# shell

我正在使用this article code来提取超大图标。只要我从UI线程调用其方法GetIcon,一切正常。但是,如果我从其他线程调用,它会抛出此错误

Unable to cast COM object of type 'System.__ComObject' to interface type 'IImageList'. 
This operation failed because the QueryInterface call on the COM component for the interface with IID 
'{46EB5926-582E-4017-9FDF-E8998DAA0950}' failed due to the following error: 
No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).

我无法使用UI线程来提取数千个图标。任何解决方案?

0 个答案:

没有答案