Otevři si v Delphi nápovědu a hledej GetProcessTimes a TerminateProcess. Měly by tam být i příklady použití.