> + hproc = OpenProcess(PROCESS_QUERY_INFORMATION, 0, pid); After reading MSDN and guessing from the API name shouldn't it simply fetch GWL_HINSTANCE and call GetModuleFileName on it? -- Dmitry.