"We were able to keep at it tonight and make some plays," said Buffalo head coach Lindy Ruff. "We need to get some more of these wins to get back in the hunt. But that was an important point for us."
Ryder and Tomas Vincour each had a goal for the Stars, who have dropped two of three. Lehtonen made 30 stops in the loss.
"I think we played a pretty good game overall," said Ryder. "I think we maybe sat back a little too much in the third and gave them the momentum. It was a big point for us, but it would have been nice to get two."
Dallas scored on the power play with 2:07 left in the first as a slap shot from Alex Goligoski up high was deflected into the net by Ryder parked in the low slot.
After a scoreless second period, the Stars took a 2-0 lead just 4:17 into the third. Good forecheck work deep caused a turnover that saw Jamie Benn get the puck and use a backhand pass from behind the net to center the puck for Vincour, who buried his one-timer.
Buffalo, though, scored just 50 seconds later on the man advantage when a slap-pass from Jason Pominville at the top of the right circle went to the slot where Vanek redirected it for his 20th of the season.
With Miller pulled for the extra attacker, a right circle faceoff win saw the puck eventually come to Tyler Myers, who cranked a shot from the high slot that saw Roy slam home the rebound at the right side with just 39 seconds left.
Buffalo hosts Tampa bay on Saturday...Dallas hosts Los Angeles on Sunday...Dallas has won two straight against Buffalo after dropping its previous five...Vanek has notched at least 20 goals in each of his seven seasons. His career-high is 43 in 2006-07 and career-low is 25 in his rookie campaign of 2005-06.