In ضَرَبَهُ حَامِدٌ, هُ is the object and حَامِدٌ is the subject.

Attached Object Pronouns in Verbal Sentences