Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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: https://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnppcgen/html/ppc_hpocket.asp.
Comments
- Anonymous
January 21, 2009
PingBack from http://www.keyongtech.com/1797630-how-to-determine-if-running