I'm trying to write a program that will save the positions of all my icons on my desktop so that if they get jumbled up, I don't have to spend five minutes putting them back where they should be (about 2/3 of my screen is icons). This is my first time using COM, so I decided to try a simple program first using GetDesktopItemCount(). After searching the tubes for tutorials, I wrote this code:
I have two questions. 1. Is IActiveDesktop the correct/best way to do what I want to do? 2. Why do I get the error E_NOTIMPL after the call to GetDesktopItemCount() on line 21 and what can I do to fix it? So far, MSDN and Google have been all but useless so any help would be appreciated.
I needed to do it as I plugged the code into an old project that I use for checking syntax and so on for the forum related code. If yours compiled at all, you probably don't need it.
Without _WIN32_IE being defined to a value greated than 0x0400, the IActiveDesktop stuff isn't defined. I presume that's because the Active Desktop was introduce in NT 4.0. I built and ran this on XP (NT 5.1).