2

我正在使用这篇文章代码来提取超大图标。只要我从 UI Thread 调用它的方法 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 线程来提取数千个图标。有什么解决办法吗?

4

0 回答 0