Reputation: 665
I'm writing some .NET CF code that will sometimes run on Motorola devices and other times on Intermec devices. Depending on which device I'm running on, I want to use that manufacturers libraries for what I am doing. Is there an easy way in .NET CF to determine the hardware manufacturer (and ideally model)?
Upvotes: 4
Views: 690
Reputation: 3748
Try using SystemParametersInfoString method from coredll.dll.
StringBuilder sb = new StringBuilder(256);
if (SystemParametersInfoString(SPI_GETPLATFORMTYPE, sb.Capacity, sb, 0) != 0)
{
String name = sb.ToString();
}
Change SPI_GETPLATFORMTYPE to SPI_GETOEMINFO or play with it. you might fine more..
Upvotes: 2