Wawrinka, a native of Lausanne, Switzerland, and a home favorite, lost 6-4, 6-4 to Bulgaria's Thomaz Bellucci, the 119th-ranked men's player in the world.
Hanescu, the fourth seed, lost the first set 4-6 before an upset stomach forced him to retire in his match against France's Florent Serra.
"I never reached my level of play today," Wawrinka said on the ATP Web site. "It's very disappointing since I wanted to do well here."
Sixth-seeded Nicolas Kiefer of Germany beat Spaniard Ivan Navarro 6-3, 6-7 (3-7), 6-2 and Brazil's Marcos Daniel was a 6-3, 7-6 (10-8) winner over Frenchman Julien Benneteau.
Friday's quarterfinal matchups are Igor Andreev-Jeremy Chardy; Kiefer-Bellucci; Daniel-Serra and Andreas Beck-Victor Crivoi.