gpt4 book ai didi

Windows Mobile API - 找出我正在运行的手机

转载 作者:可可西里 更新时间:2023-11-01 11:40:41 26 4
gpt4 key购买 nike

我正在为摩托罗拉 Q 等 WM 智能手机开发应用程序。有什么办法可以在我的代码中找到我正在运行的手机吗?谢谢,丹

最佳答案

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

    [DllImport("Coredll.dll", EntryPoint = "SystemParametersInfoW", CharSet = CharSet.Unicode)]
static extern int SystemParametersInfo4Strings(uint uiAction, uint uiParam, StringBuilder pvParam, uint fWinIni);

public enum SystemParametersInfoActions : uint
{
SPI_GETPLATFORMTYPE = 257, // this is used elsewhere for Smartphone/PocketPC detection
SPI_GETOEMINFO = 258,
}

public static string GetOemInfo()
{
StringBuilder oemInfo = new StringBuilder(50);
if (SystemParametersInfo4Strings((uint)SystemParametersInfoActions.SPI_GETOEMINFO,
(uint)oemInfo.Capacity, oemInfo, 0) == 0)
throw new Exception("Error getting OEM info.");
return oemInfo.ToString();
}

关于Windows Mobile API - 找出我正在运行的手机,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1714704/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com