How about enumerating the running processes and look for a instance of "explorer.exe"?

Basically explorer.exe is the desktop, so that should do it for you.