use of undefined type 'IActiveDesktop'

来源:互联网 发布:网络恐怖主义 编辑:程序博客网 时间:2024/06/06 09:42

You could try

#include <wininet.h>
#include <shlobj.h>//这样的顺序就可以通过编译了

as I believe there are things in shlobj.h that rely on wininet.h being included first.

After that, you might also consider that by default, #import generates definitions inside a namespace, so if that was where IActiveDesktop was being defined, it wouldn't be in the global namespace.

You can look at the generated tli/tlh files to see what the namespace is called