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
本文介绍了一种解决wininet.h与shlobj.h头文件包含顺序冲突的方法,确保正确编译,避免定义空间错误。通过调整包含顺序及检查命名空间可以有效解决该问题。

1万+

被折叠的 条评论
为什么被折叠?



