该代码部分源自网络,一个老外的站点找的, 起初并不能编译通过, 改了几处错误才能完美运行!
编译环境:windows xp sp3, vs.net 2008, windows mobile 5.0 SDK
using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;
using System.Windows.Forms;
namespace Optidiy.OptiApplication
{
class OptiCPUClockSpeed
{
[DllImport("coredll.dll")]
private static extern bool KernelIoControl(Int32 IoControlCode, IntPtr InputBuffer, Int32 InputBufferSize, byte[] OutputBuffer, Int32 OutputBufferSize, ref Int32 BytesReturned);
internal const Int32 IOCTL_PROCESSOR_INFORMATION = 0x01010064;
private struct ProcessorInfo
{
public const int SIZE = 576;
public ushort Version;
public string Core;
public ushort