What is the meaning of [Barking up the wrong tree]

Doing something that won’t give you the results you want. “If you think she’s going to lend you money, you’re barking up the wrong tree. She never lends anyone anything.”