Ok, so is your code working? If not, what errors are you getting (e.g., compiler, linker, runtime)? Is the value of count, mark, and nItem correct? Have you considered SHGetFolderPath() with either CSIDL_COMMON_DESKTOPDIRECTORY or CSIDL_DESKTOPDIRECTORY? With the path, you can then use FindFirstFile() and FindNextFile() to "find" each file in the folder. Then you can use ExtractIcon() to get the icon used by the file. I've not tried this specifically, so your mileage may vary.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen