EG: She sent James the letter. ('letter' is the direct object as it is directly affected by the action and 'James' is the indirect object as he receives the letter.)
EG: They made him dinner. ('Dinner' is the direct object as it is created by the action and 'him' is the indirect object as the dinner is made for him.)
These sentences can also be written as follows:
EG: She sent the letter to James.
EG: They made dinner for him.
Complement & Object