In a quarter in which PC sales fell dramatically, Microsoft reported record revenues and earnings per share, confounding expectations. But a surprising uptick from the Windows division was somewhat illusory, and the firm admitted that it would face challenges going forward.

Microsoft delivered net income of $7.61 billion on record revenues of $20.49 billion. But much of the gain was thanks to the delayed recognition of revenues related to Windows 8 and Office upgrades.

“The bold bets we made on cloud services are paying off as people increasingly choose Microsoft services including Office 365, Windows Azure, Xbox LIVE, and Skype,” Microsoft CEO Steve Ballmer said. “While there is still work to do, we are optimistic that the bets we’ve made on Windows devices position us well for the long term.”

For the short term, questions remain. PC sales in the first quarter fell 12.5 percent to 77.75 million units, a historically significant drop-off and the fourth straight quarter in which sales fell, year over year. Net income at microprocessor maker Intel dropped 25 percent in the quarter, reflecting the troubles.

But not so Microsoft. Its Windows division reported posted revenues of $5.70 billion, a 23 percent increase from the same quarter a year earlier. But that increase was entirely due to Windows 8 preorders that were logged in previous quarters. Remove that bump, and Windows revenues were actually flat, year over year. Given the problems the PC industry faces, that’s actually a major accomplishment.

Most of Microsoft’s other businesses also raced forward. Server & Tools delivered $5.04 billion in revenues, an 11 percent increase that Microsoft credits to double-digit percentage revenue growth in SQL Server and System Center. The Business Division, which is responsible for Office, posted revenues of $6.32 billion, an 8 percent increase year-over-year. Like Windows, Office benefited from pre-sale recognition, but even without that bump, the Business Division still would have posted a 5 percent increase.

Entertainment and Devices Division, which sells the Xbox line of video game solutions, saw revenues of $2.53 billion, up 56 percent year-over-year. Microsoft reported that there are now 46 million Xbox LIVE members, though as always it declined to differentiate between paid and free subscribers.

“Our diverse business continues to deliver solid financial results, even as we navigate the evolving device market,” Microsoft CFO Peter Klein said. “Looking ahead, we will continue to invest in long-term growth opportunities to drive our devices and services strategy forward and deliver ongoing value to shareholders.” Mr. Klein is leaving Microsoft at the end of June, the end of Microsoft’s fiscal year, though no reason was given.