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