string PredefinedInspector::getBasicInfo(const PropertyList& argList, string& contentType) { contentType = "text/plain"; StrList strList; strList.add(formatString("path: %s", getAppExeName().c_str())); strList.add(formatString("pid: %d", ::getpid())); return strList.getText(); }
string PredefinedInspector::getBasicInfo(const PropertyList& argList, string& contentType) { contentType = "text/plain"; DWORD procId = ::GetCurrentProcessId(); HANDLE handle = ::OpenProcess(PROCESS_QUERY_INFORMATION, false, procId); size_t memorySize = 0; PROCESS_MEMORY_COUNTERS pmc = {0}; pmc.cb = sizeof(pmc); if (::GetProcessMemoryInfo(handle, &pmc, pmc.cb)) memorySize = pmc.WorkingSetSize; ::CloseHandle(handle); StrList strList; strList.add(formatString("path: %s", getAppExeName().c_str())); strList.add(formatString("pid: %u", procId)); strList.add(formatString("memory: %s bytes", addThousandSep(memorySize).c_str())); return strList.getText(); }
//----------------------------------------------------------------------------- // 描述: 返回全部字段名 //----------------------------------------------------------------------------- void DbFieldDefList::getFieldNameList(StrList& list) { list.clear(); for (int i = 0; i < items_.getCount(); i++) list.add(((DbFieldDef*)items_[i])->getName().c_str()); }