Determine if Platform is Smartphone

Do you need a registry key to do a specific task? Would you like to customize the way your PocketPC/Smartphone looks and works? This is the right place.

Moderators: Teksoft, admin

Determine if Platform is Smartphone

Postby sad_ghost » Sat Jun 24, 2006 4:23 pm

Simple bool returning function to determine if the platform you're searching for is a Smartphone or not:

static BOOL IsSmartphone()
{
TCHAR tszPlatform[64];

if (TRUE == SystemParametersInfo(SPI_GETPLATFORMTYPE,
sizeof(tszPlatform)/sizeof(*tszPlatform),tszPlatform,0))
{
if (0 == _tcsicmp(TEXT("Smartphone"), tszPlatform))
{
return TRUE;
}
}
return FALSE;
}
sad_ghost
TEK-Giant
TEK-Giant
 
Posts: 269
Joined: Thu Apr 06, 2006 11:04 am

Return to Developers

Who is online

Users browsing this forum: No registered users and 1 guest


cron