有关返回CUP信息的API函数(0分)

  • 主题发起人 主题发起人 追梦人0818
  • 开始时间 开始时间

追梦人0818

Unregistered / Unconfirmed
GUEST, unregistred user!
[:(!]个为高手<br>我知道有一个API函数可返回CUP,版本号,频率,等信息<br>可我不知道怎么使用。我不知道其中参数怎么用,<br>望指教。<br>谢谢
 
Do you want these?<br><br>GetSystemInfo<br>The GetSystemInfo function returns information about the current system. <br>VOID GetSystemInfo(<br>&nbsp; LPSYSTEM_INFO lpSystemInfo &nbsp; // address of system information <br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;// structure<br>);<br>Parameters<br>lpSystemInfo <br>&nbsp; &nbsp; &nbsp;Pointer to a SYSTEM_INFO structure to be filled in by this function. <br>Return Values<br>&nbsp; &nbsp; &nbsp;This function does not return a value. <br><br>SYSTEM_INFO<br>&nbsp; &nbsp; The SYSTEM_INFO structure contains information about the current<br>computer system. This includes the architecture and type of the<br>processor, the number of processors in the system, the page size,<br>and other such information. <br><br>typedef struct _SYSTEM_INFO { // sinf <br>&nbsp; &nbsp; union { <br>&nbsp; &nbsp; &nbsp; &nbsp; DWORD &nbsp;dwOemId; <br>&nbsp; &nbsp; &nbsp; &nbsp; struct { <br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; WORD wProcessorArchitecture; <br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; WORD wReserved; <br>&nbsp; &nbsp; &nbsp; &nbsp; }; <br>&nbsp; &nbsp; }; <br>&nbsp; &nbsp; DWORD &nbsp;dwPageSize; <br>&nbsp; &nbsp; LPVOID lpMinimumApplicationAddress; <br>&nbsp; &nbsp; LPVOID lpMaximumApplicationAddress; <br>&nbsp; &nbsp; DWORD &nbsp;dwActiveProcessorMask; <br>&nbsp; &nbsp; DWORD &nbsp;dwNumberOfProcessors; <br>&nbsp; &nbsp; DWORD &nbsp;dwProcessorType; <br>&nbsp; &nbsp; DWORD &nbsp;dwAllocationGranularity; <br>&nbsp; &nbsp; WORD &nbsp;wProcessorLevel; <br>&nbsp; &nbsp; WORD &nbsp;wProcessorRevision; <br>} SYSTEM_INFO; <br>&nbsp;<br>Members<br>dwOemId &nbsp; An obsolete member that is retained for compatibility<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; with previous versions of Windows NT. Beginning with<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Windows NT 3.51 and the initial release of Windows 95,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; use the wProcessorArchitecture branch of the union. <br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Windows 95: The system always sets this member to zero,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; the value defined for PROCESSOR_ARCHITECTURE_INTEL. <br>wProcessorArchitecture <br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Specifies the system's processor architecture. This value<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; can be one of the following values: Value <br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PROCESSOR_ARCHITECTURE_INTEL <br>&nbsp; &nbsp; &nbsp; Windows NT: PROCESSOR_ARCHITECTURE_MIPS <br>&nbsp; &nbsp; &nbsp; Windows NT: PROCESSOR_ARCHITECTURE_ALPHA <br>&nbsp; &nbsp; &nbsp; Windows NT: PROCESSOR_ARCHITECTURE_PPC <br>&nbsp; &nbsp; &nbsp; Windows NT: PROCESSOR_ARCHITECTURE_UNKNOWN &nbsp;<br>wReserved <br>&nbsp; &nbsp; &nbsp; Reserved for future use. <br>dwPageSize <br>&nbsp; &nbsp; &nbsp; Specifies the page size and the granularity of page<br>&nbsp; &nbsp; &nbsp; protection and commitment. This is the page size used<br>&nbsp; &nbsp; &nbsp; by theVirtualAlloc function. <br>lpMinimumApplicationAddress <br>&nbsp; &nbsp; &nbsp; Pointer to the lowest memory address accessible to<br>&nbsp; &nbsp; &nbsp; applications and dynamic-link libraries (DLLs). <br>lpMaximumApplicationAddress <br>&nbsp; &nbsp; &nbsp; Pointer to the highest memory address accessible to<br>&nbsp; &nbsp; &nbsp; applications and DLLs. <br>dwActiveProcessorMask <br>&nbsp; &nbsp; &nbsp; Specifies a mask representing the set of processors<br>&nbsp; &nbsp; &nbsp; configured into the system. Bit 0 is processor 0;<br>&nbsp; &nbsp; &nbsp; bit 31 is processor 31. <br>dwNumberOfProcessors <br>&nbsp; &nbsp; &nbsp; Specifies the number of processors in the system. <br>dwProcessorType <br>&nbsp; &nbsp; &nbsp; Windows 95: Specifies the type of processor in the system. <br>&nbsp; &nbsp; &nbsp; Windows NT: This member is no longer relevant, but is<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; retained for compatibility with Windows 95<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; and previous versions of Windows NT. Use<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; the wProcessorArchitecture, wProcessorLevel,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; and wProcessorRevision members to determine<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; the type of processor. <br>&nbsp; &nbsp; &nbsp; &nbsp; This member is one of the following values: Value <br>&nbsp; &nbsp; &nbsp; PROCESSOR_INTEL_386 <br>&nbsp; &nbsp; &nbsp; PROCESSOR_INTEL_486 <br>&nbsp; &nbsp; &nbsp; PROCESSOR_INTEL_PENTIUM <br>&nbsp; &nbsp; &nbsp; Windows NT: PROCESSOR_MIPS_R4000 <br>&nbsp; &nbsp; &nbsp; Windows NT: PROCESSOR_ALPHA_21064 <br>dwAllocationGranularity <br>&nbsp; &nbsp; &nbsp; Specifies the granularity with which virtual memory<br>&nbsp; &nbsp; &nbsp; is allocated. For example, a VirtualAlloc request to<br>&nbsp; &nbsp; &nbsp; allocate 1 byte will reserve an address space of<br>&nbsp; &nbsp; &nbsp; dwAllocationGranularity bytes. This value was hard<br>&nbsp; &nbsp; &nbsp; coded as 64K in the past, but other hardware<br>&nbsp; &nbsp; &nbsp; architectures may require different values. <br>wProcessorLevel <br>&nbsp; &nbsp; &nbsp; Windows 95: This member is not used. <br>&nbsp; &nbsp; &nbsp; Windows NT: Specifies the system's<br>&nbsp; &nbsp; &nbsp; architecture-dependent processor level. <br>&nbsp; &nbsp; &nbsp; If wProcessorArchitecture is<br>&nbsp; &nbsp; &nbsp; PROCESSOR_ARCHITECTURE_INTEL,<br>&nbsp; &nbsp; &nbsp; wProcessorLevel can be one of the following<br>&nbsp; &nbsp; &nbsp; values:<br>&nbsp; &nbsp; &nbsp; Value &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Meaning <br>&nbsp; &nbsp; &nbsp; &nbsp;3 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Intel 80386 <br>&nbsp; &nbsp; &nbsp; &nbsp;4 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Intel 80486 <br>&nbsp; &nbsp; &nbsp; &nbsp;5 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Pentium <br>&nbsp; &nbsp; &nbsp; If wProcessorArchitecture is<br>&nbsp; &nbsp; &nbsp; PROCESSOR_ARCHITECTURE_MIPS, wProcessorLevel<br>&nbsp; &nbsp; &nbsp; is of the form 00xx, where xx is an 8-bit<br>&nbsp; &nbsp; &nbsp; implementation number (bits 8-15 of the PRId<br>&nbsp; &nbsp; &nbsp; register). The member can be the following<br>&nbsp; &nbsp; &nbsp; value:<br>&nbsp; &nbsp; &nbsp; Value &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Meaning <br>&nbsp; &nbsp; &nbsp; 0004 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;MIPS R4000 <br>&nbsp; &nbsp; &nbsp; If wProcessorArchitecture is<br>&nbsp; &nbsp; &nbsp; PROCESSOR_ARCHITECTURE_ALPHA,<br>&nbsp; &nbsp; &nbsp; wProcessorLevel is of the form xxxx,<br>&nbsp; &nbsp; &nbsp; where xxxx is a 16-bit processor version<br>&nbsp; &nbsp; &nbsp; number (the low-order 16 bits of a version<br>&nbsp; &nbsp; &nbsp; number from the firmware). The member can<br>&nbsp; &nbsp; &nbsp; be one of the following values:<br>&nbsp; &nbsp; &nbsp; Decimal Value &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Meaning <br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;21064 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Alpha 21064 <br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;21066 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Alpha 21066 <br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;21164 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Alpha 21164 <br>&nbsp; &nbsp; &nbsp; &nbsp; If wProcessorArchitecture is<br>&nbsp; &nbsp; &nbsp; &nbsp; PROCESSOR_ARCHITECTURE_PPC,<br>&nbsp; &nbsp; &nbsp; &nbsp; wProcessorLevel is of the form xxxx,<br>&nbsp; &nbsp; &nbsp; &nbsp; where xxxx is a 16-bit processor version<br>&nbsp; &nbsp; &nbsp; &nbsp; number (the high-order 16 bits of the<br>&nbsp; &nbsp; &nbsp; &nbsp; Processor Version Register). The member<br>&nbsp; &nbsp; &nbsp; &nbsp; can be one of the following values:<br>&nbsp; &nbsp; &nbsp; &nbsp; Decimal Value &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Meaning <br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;PPC 601 <br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 3 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;PPC 603 <br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 4 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;PPC 604 <br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 6 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;PPC 603+ <br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 9 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;PPC 604+ <br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;20 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;PPC 620 <br>wProcessorRevision <br>&nbsp; &nbsp; &nbsp; &nbsp; Windows 95: This member is not used. <br>&nbsp; &nbsp; &nbsp; &nbsp; Windows NT: Specifies an architecture-dependent<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; processor revision. The following<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; table shows how the revision value<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; is assembled for each type of<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; processor architecture.<br>&nbsp; &nbsp; &nbsp; Processor Architecture &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Value <br>&nbsp; &nbsp; &nbsp; Intel 80386 or 80486 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; A value of the form xxyz. <br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; If xx is equal to 0xFF, y - 0xA is<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; the model number, and z is the stepping<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; identifier. For example, an Intel<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 80486-D0 system returns 0xFFD0.<br><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; If xx is not equal to 0xFF, xx +<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'A' is the stepping letter and yz<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; is the minor stepping. <br>&nbsp;<br>&nbsp; &nbsp; &nbsp; &nbsp; Intel Pentium, <br>&nbsp; &nbsp; &nbsp; &nbsp; Cyrix, or NextGen 586 &nbsp; &nbsp; A value of the form xxyy, where<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xx is the model number and yy is<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; the stepping. For example, a value<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; of 0x0201 indicates Model 2,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Stepping 1. <br>&nbsp; &nbsp; &nbsp; &nbsp; MIPS &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;A value of the form 00xx, where<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xx is the 8-bit revision number<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; of the processor (the low-order<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 8 bits of the PRId register). <br>&nbsp; &nbsp; &nbsp; &nbsp; ALPHA &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; A value of the form xxyy, where<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xxyy is the low-order 16 bits of<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; the processor revision number from<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; the firmware. Display this value as<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; follows: <br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Model 'A'+xx, Pass yy<br>&nbsp;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;PPC &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;A value of the form xxyy, where<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xxyy is the low-order 16 bits of<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; the Processor Version Register.<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Display this value as a fixed<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; point number:<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;xx.yy<br>&nbsp;<br>Remarks<br>&nbsp; &nbsp;Beginning with Windows NT 3.51 and the initial release<br>of Windows 95, the SYSTEM_INFO structure has changed as follows: <br><br>The dwOemId member has been changed to a union. The union supports a new way to describe processor architecture used by Windows NT, while maintaining compatibility with Windows 95 and previous versions of Windows NT. <br>The dwProcessorType member is now obsolete on Windows NT. It is still used on Windows 95. <br>A previously reserved DWORD member at the end of the structure has been replaced by the wProcessorLevel and wProcessorRevision members. Windows 95 does not use these members. <br>
 
这是我写的一篇文章,很全的你去看看<br>http://www.delphibbs.com/delphibbs/dispq.asp?lid=2002449
 
后退
顶部