//   .
PVOID Info = NULL; INT Length = 1024;
DosAllocMem ((PPVOID) &Info, Length, PAG_COMMIT | PAG_READ | PAG_WRITE);

//  ᢮⢠ ਫ.
APIRET Result = DosQuerySysState (QS_PROCESS, 0, Process_id, 0, Info, Length);

// ࠥ   㧭  䠩 ਫ.
if (Result == NO_ERROR) 
{
  PQSPTRREC Top = (PQSPTRREC) Info; PQSPREC Process_record = Top->pProcRec;

  CHAR Exe_name[SIZE_OF_PATH] = "";

  if (Process_record->RecType == QS_PROCESS)
    if (Process_record->pid == Process_id)
      DosQueryModuleName (Process_record->hMte, SIZE_OF_PATH, Exe_name);

  ...

}

// ᢮ .
DosFreeMem (Info), Info = NULL;