下面的代码:
    if( EnumProcessModules(hProcess, hMods, sizeof(hMods), &cbNeeded))
    {
        for ( i = 0; i < (cbNeeded / sizeof(HMODULE)); i++ )
        {
            char szModName[MAX_PATH];            // Get the full path to the module's file.            if ( GetModuleFileNameEx( hProcess, hMods[i], szModName,
                                      sizeof(szModName)))
            {            }
        }
    }只要一使用就会出错,标准的“出现问题需要关闭程序”,为什么?我怀疑就是GetModuleFileNameEx出错了,但不知道为什么?