我要获得cpu的个数,连接网络的实际速度。计算机用户名。用什么实现,有现成函数么??急

解决方案 »

  1.   

    GetSystemInfo
    The GetSystemInfo function returns information about the current system. VOID GetSystemInfo(
      LPSYSTEM_INFO lpSystemInfo   // address of system information 
                                   // structure
    );typedef struct _SYSTEM_INFO { // sinf 
        union { 
            DWORD  dwOemId; 
            struct { 
                WORD wProcessorArchitecture; 
                WORD wReserved; 
            }; 
        }; 
        DWORD  dwPageSize; 
        LPVOID lpMinimumApplicationAddress; 
        LPVOID lpMaximumApplicationAddress; 
        DWORD  dwActiveProcessorMask; 
        DWORD  dwNumberOfProcessors; // HERE
        DWORD  dwProcessorType; 
        DWORD  dwAllocationGranularity; 
        WORD  wProcessorLevel; 
        WORD  wProcessorRevision; 
    } SYSTEM_INFO;