The best way for apps to detect if they are running on the Device Emulator is to use this snippet of code:
WCHAR wszMachineName[128]; SystemParametersInfo(SPI_GETOEMINFO, sizeof(wszMachineName), &wszMachineName, 0);
On the DeviceEmulator, it will return with wszMachineName set to "Microsoft DeviceEmulator".
For a more complete code sample, follow the MSDN article: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnppcgen/html/ppc_hpocket.asp.