Paul T.
"Peter B" <pe...@data.se> wrote in message
news:%23OuNeZD...@tk2msftngp13.phx.gbl...
For an example in C++, see
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnppc2k/html/ppc_hpocket.asp.
Hope that helps,
Darren
"Peter B" <pe...@data.se> wrote in message
news:%23OuNeZD...@tk2msftngp13.phx.gbl...
"Darren Beckley" <darren....@nointermecspam.com> wrote in message
news:%23J4aKyG...@TK2MSFTNGP11.phx.gbl...
Any C# sample code?
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
public class MyWinAPI
{
private MyWinAPI()
{
//
// TODO: Add constructor logic here
//
}
internal const int SPI_GETPLATFORMTYPE = 257;
internal const int SPI_GETOEMINFO = 258;
[DllImport("coredll.dll")]
internal static extern int SystemParametersInfo (
int uiAction,
int uiParam,
string pvParam,
int fWinIni );
public enum Platform
{
PocketPC2000,
PocketPC2002,
PocketPC2003,
Unknown
}
public static Platform GetPlatform()
{
string szPlatform = " ";
string strPlatform = "";
//Get OSVersion
System.OperatingSystem osVersion = Environment.OSVersion;
// Get Platform
int ret = SystemParametersInfo(SPI_GETPLATFORMTYPE, szPlatform.Length ,
szPlatform, 0);
if (ret != 0)
{
strPlatform = szPlatform.Substring(0, szPlatform.IndexOf('\0'));
}
if (osVersion.Version.Major == 3) //PPC2000 or PPC2002
{
if (strPlatform == "PocketPC")
return Platform.PocketPC2002;
else
return Platform.PocketPC2000;
}
else if (osVersion.Version.Major == 4) //WinCE.NET
{
if (strPlatform == "PocketPC")
return Platform.PocketPC2003;
else
return Platform.Unknown;
}
return Platform.Unknown;
}
public static string GetOEMInfo()
{
string szOEMInfo = " ";
string strOEMInfo = "";
// Get OEM Info
int ret = SystemParametersInfo(SPI_GETOEMINFO, szOEMInfo.Length , szOEMInfo,
0);
if (ret != 0)
{
strOEMInfo = szOEMInfo.Substring(0, szOEMInfo.IndexOf('\0'));
}
return strOEMInfo;
}
}
"chora" <cho...@hotmail.com> wrote in message
news:uPTHJtN5...@TK2MSFTNGP11.phx.gbl...
In the meantime I discovered that in most cases the Vendor name is in
the registry under LOCAL_MACHINE\Platform.
"chora" <cho...@hotmail.com> wrote in message
news:exk2F$P5DHA...@TK2MSFTNGP09.phx.gbl...
HKEY_LOCAL_MACHINE->Platform->Name
Device value
Intermec "Intermec 740"
Dell "Microsoft Windows CE Hardware Reference Platform"
iPAQ "Microsoft Windows CE Hardware Reference Platform"
/ Peter
"chora" <cho...@hotmail.com> wrote in message
news:exk2F$P5DHA...@TK2MSFTNGP09.phx.gbl...
Sorry if that "most cases" was misleading. At the office we use mostly
Symbol and Intermec and I only checked
several models of these two vendors.