#pragma once #include struct SubProcessData { HRESULT hr; HPCON hPC; PROCESS_INFORMATION pi; HANDLE hInput; HANDLE hOutput; }; SubProcessData CreateSubProcess(LPCTSTR cmd, LPCTSTR wdir, COORD zsCon, bool bUseConPty); void CleanupSubProcess(const SubProcessData* spd); UINT GetIcon(const SubProcessData* spd, HICON *phIconLarge, HICON *phIconSmall);