分别用什么函数可以获得进程的用户   
cpu  内存的使用情况 
进程详细的模块信息
系统进程的说明(这个是可以从系统获得还是需要自己手写)?

解决方案 »

  1.   

    列出模块用
    Module32First
    Module32Next进程的说明就是文件本身的说明嘛. 得到了进程路径(GetModuleFileName), 再取文件版本(GetFileVersionInfo)其它暂没研究.
      

  2.   

    1、
    CreateToolhelp32Snapshot
    Process32First
    2、
    GlobalMemoryStatusEx
      

  3.   

    cpu  内存的使用情况 ?可以用GetProcessMemory, 也可以用Performance Couners.
    检举进程的模块列表,可以用Toolhelp APIBOOL ListProcessModules( DWORD dwPID )
    {
      HANDLE hModuleSnap = INVALID_HANDLE_VALUE;
      MODULEENTRY32 me32;  // Take a snapshot of all modules in the specified process.
      hModuleSnap = CreateToolhelp32Snapshot( TH32CS_SNAPMODULE, dwPID );
      if( hModuleSnap == INVALID_HANDLE_VALUE )
      {
        printError( "CreateToolhelp32Snapshot (of modules)" );
        return( FALSE );
      }  // Set the size of the structure before using it.
      me32.dwSize = sizeof( MODULEENTRY32 );  // Retrieve information about the first module,
      // and exit if unsuccessful
      if( !Module32First( hModuleSnap, &me32 ) )
      {
        printError( "Module32First" );  // Show cause of failure
        CloseHandle( hModuleSnap );     // Must clean up the snapshot object!
        return( FALSE );
      }  // Now walk the module list of the process,
      // and display information about each module
      do
      {
        printf( "\n\n     MODULE NAME:     %s",             me32.szModule );
        printf( "\n     executable     = %s",             me32.szExePath );
        printf( "\n     process ID     = 0x%08X",         me32.th32ProcessID );
        printf( "\n     ref count (g)  =     0x%04X",     me32.GlblcntUsage );
        printf( "\n     ref count (p)  =     0x%04X",     me32.ProccntUsage );
        printf( "\n     base address   = 0x%08X", (DWORD) me32.modBaseAddr );
        printf( "\n     base size      = %d",             me32.modBaseSize );  } while( Module32Next( hModuleSnap, &me32 ) );  CloseHandle( hModuleSnap );
      return( TRUE );
    }