Ever wanted to know what your clock-speed was or what brand/model processor you had in your Windows Mobile device?
If you have Platform Builder, then include
pkfuncs.h. If not, then do some Internet searching for the definitions you need.
DWORD returned = 0;
PROCESSOR_INFO pi = { 0 };
if( ::KernelIoControl( IOCTL_PROCESSOR_INFORMATION,
NULL,
0,
&pi,
sizeof( PROCESSOR_INFO ),
&returned ) )
{
NKDbgPrintfW( L"%s, %s - %s, %d MHz\r\n",
pi.szProcessCore,
pi.szVendor,
pi.szProcessorName,
pi.dwClockSpeed );
}
For me, this prints:
ARM Cortex-A8, TI - OMAP3, 600 MHz
Enjoy!
-PaulH