单项选择题

In the sentence "He ordered himself a cup of coffee", the italicized word is

A.the predicative.
B.the direct object.
C.the indirect object.
D.the adverbial.