所用で「あるプロセスから別のプロセスを終了させるプログラム」を書いていました.終了させる部分の関数は以下のような感じ. #include <string> #include <vector> #include <windows.h> #include <tchar.h> #include <psapi.h> #pragma comment(lib, "psapi.lib") namespace process { std::size_t kill(const std::basic_string<TCHAR>& name) { std::size_t result = 0; std::vector<DWORD> processes(256, 0); DWORD procbytes = 0; while (1) { if (!::EnumProcesses(reinterpret_cast<D