0

使用 C# 如何知道我是在设备还是模拟器上运行?我使用设备名称来检索数据,模拟器将没有数据;所以我将操纵模拟器名称来检索数据。

4

2 回答 2

2

Since you mentioned the words C# and device in your question I'm assuming you mean a Windows CE or Windows Mobile device. If that is the case the following link will help. It details how to PInvoke the SystemParametersInfo function to determine the OEM name for the device.

https://blogs.msdn.com/netcfteam/archive/2006/09/15/756755.aspx

于 2009-10-29T03:53:34.527 回答
1

我认为如果它是一个非常好的模拟器,你的程序永远不会知道其中的区别。;)

于 2009-10-29T02:57:40.177 回答