In the best novels, the resolution is a gradual build up of what has come before. The actions of the characters determine the path they follow, and everything builds towards a logical climax where all the loose ends come together and the reader thinks Oh, yes, of course. Things that maybe didn't make sense earlier on are explained and the twist, if there is one, makes complete sense in the re-interpretation of the story.
So you can't have the murderer being the identical twin brother of the suspect - unless you've set up the premise early on and sibling rivalry, or whatever, is an integral part of the story. You can't have your character waking up and finding that the whole story was a dream - and you've got to be pretty clever to get away with the viewpoint character being dead.
But for me - as a reader - the resolution of a story also has to evolve from the actions of the main characters. Nothing annoys me more than reading a book where the main character sits around passively while things happen to him or her, and then the story ends after somebody else has made everything right again. Passive characters in themselves are fine - not everyone is an action hero - but they shouldn't be your main characters. Elizabeth Bennet doesn't sit around waiting to be married off - she works out what she wants and goes for it. So does Harry Potter.
Whether there's a happy ending or not doesn't really matter. It's the journey that counts. And a journey where the main character is driving is the best journey to take.