What is the direct object in this sentence I gave her some advice?
The direct object is 'some advice'. That is the thing that you
gave.
The indirect object is 'her'. That is the person to whom you
gave the thing.
In this context it means 'to her', and indeed if you reversed
the order of the direct and indirect objects that is what you would
say: 'I gave some advice to her.'