On a trip to Beijing a decade ago, Bill Gates was asked by a senior government official how much money Microsoft Corp made in China. The official asked the interpreter to double check Gates' reply as he couldn't believe the figure was so low.
It's a problem that hasn't gone away. Indeed, Microsoft's current issues in China conceal a deeper problem for the U.S. software giant - despite the popularity of its Windows operating system and Office suite, few people in emerging markets are willing to pay for legitimate copies.
This not only costs Microsoft in lost revenue, but is also holding back the spread of its newest Windows 8 version - analysts say even buyers of pirate software prefer older versions. According to StatCounter, a website that tracks what software is loaded on Internet-connected computers, more than 90 percent of PCs in China - now the world's biggest market - are running pre-8 versions of Windows.
Microsoft is trying to tackle this. This year it's offering Windows 8 at a discount to PC manufacturers who install its Bing search engine as the default. And it's giving away versions of Windows 8 for phones and some tablets.
But, as the industry shifts from desktop to mobile, the cloud and free or cheap software, China sums up both the old and new challenges Microsoft faces in making money in emerging markets - and, increasingly, in developed ones.
"The great danger for the company is that what has happened to them in emerging markets - basically no revenue from new PCs because of piracy - is not far off what's happening everywhere," said Ben Thompson, the Taiwan-based author of stratechery.com, a popular technology blog.
For sure, China is a major, and unique, headache for Microsoft. Many of the problems are tied to a broader push by the Chinese government to limit foreign firms' dominance and encourage local technology firms to become viable competitors.
After years of healthy relations with Beijing, Microsoft last month was suddenly targeted by anti-monopoly regulators who raided its China offices as part of a price-fixing investigation.
But the spats mask the fact that Microsoft has never really cracked how to get people in emerging markets to pay for its software. The company rarely breaks out revenues by geography, but it has provided clues about the size of the problem.
In 2011, then CEO Steve Ballmer reportedly told employees that, because of piracy, Microsoft earned less revenue in China than in the Netherlands - with 1 percent of its population - even though China bought as many computers as the United States.
According to the BSA anti-piracy lobby group that Microsoft co-founded, emerging markets account for 56 percent of all PCs in use, and 73 percent of software piracy. Of the $77.8 billion revenue Microsoft generated in its 2013 financial year, China, Brazil and Russia each "exceeded" $1 billion, according to a Microsoft presentation. For comparison, Apple Inc generated $27 billion in Greater China, which includes Hong Kong and Taiwan, in its 2013 financial year.
For Microsoft, that's a lot of lost revenue from the heart of its business. "Windows and Office are still very much the core of Microsoft," says Sameer Singh, an India-based analyst.
The most recent breakdown by Microsoft of its results by product line - for the first quarter of fiscal 2014 - shows that 56 percent of its global revenue and 78 percent of operating profit came from Windows and Office.
Microsoft doesn't just lose the revenue from pirate copies, it also loses access to customers who might buy other Microsoft products that work with or on top of Windows and Office.
Across most markets, Windows and Office account for more than half of revenues, says Andrew Pickup, Microsoft's Asia PR chief. This, analysts say, is because many of Microsoft's other products, such as Exchange and Windows servers, depend on customers already using Windows and Office.
"The Microsoft ecosystem is obviously pretty interconnected," says Jan Dawson of U.S.-based Jackdaw Research. "So it makes sense that the proportion of revenue would be similar in emerging markets."
Part of the intractability of piracy in emerging markets is that each part of the chain poses a problem.
For PC makers working on wafer-thin margins the operating system is one of the costliest parts of the machine, while mom-and-pop shops which form the bulk of retailers in such markets can't afford to turn away price-sensitive customers who are comfortable buying pirate software.
The problem, therefore, starts with computer makers, Singh says, since "convincing them to ship every PC with Windows pre-installed is difficult." Margins on PCs for a company like Lenovo Group Ltd are "near single digits," says Bryan Wang, an analyst at Gartner.
The result is that up to 60 percent of PCs shipped in the emerging markets of Asia, says IDC research manager Handoko Andi, have no Windows operating system pre-installed - so-called 'naked PCs', which usually instead carry some free, open source operating system like Linux. That compares with about 25 percent in the region's developed markets like Japan and Australia.
A quick scan of Taobao, the popular Chinese e-commerce site operated by Alibaba, shows a vast selection of PCs shipped with Linux rather than Windows. Once the machines hit the retailers, it's hard to tell where legitimate software stops and piracy begins.
On a recent morning in Zhongguancun, a teeming electronics hub in north Beijing, shopkeepers offered to bundle what they said were legitimate versions of Windows with a new laptop, either for free or the equivalent of about $30.
Microsoft began lobbying Lenovo in 2004 to stop shipping naked PCs, but the Chinese firm countered that its margins were too low, a person familiar with the negotiations said. Two years later - just days before then-President Hu Jintao visited Gates' U.S. home - China announced a new law requiring PCs to be shipped with operating systems. That merely dented piracy rates, which fell to 79 percent in 2009 from 92 percent in 2004, according to the BSA.
Lenovo said it reached an agreement with Microsoft in June of this year to ensure that Lenovo PCs sold in China would come pre-installed with a genuine Windows operating system.
Microsoft's new approach is to push the price of Windows low enough to make it worth a PC maker's while. The cost of a Windows licence has fallen to below $50 from as high as $150, said IDC's Andi, taking Microsoft down to "levels where they've never competed before."
Microsoft's Pickup said it was too early to gauge take-up.
In any case, making Windows cheaper for PCs is just part of a broader response to deeper shifts in the industry. The rise of mobile, tablets, cloud-based services and free operating systems has marginalised Microsoft and challenged its business model.
While Windows is on more than 90 percent of traditional computers - according to data compiled by analyst Ben Bajarin - that figure drops to below 14 percent once mobile devices such as phones and tablets are factored in, estimates Gartner.
More than half those devices run Google's Android mobile OS, which is effectively free to handset and tablet makers. Apple, a key player in all types of devices, gives away upgrades to its operating systems for free.
Pickup says Microsoft has listened to phone makers' complaints and relaxed what hardware they need to install the mobile version of Windows. It has also made the operating system free on any mobile device of 9 inches or less.
Taken together, the moves are "about bringing down the cost as more and more of the populations in these emerging markets are having their first computing experience," Pickup said.
These are significant concessions, analysts say, but Microsoft will have to learn to be a bit player, where its software and services run on other people's operating systems.
"The biggest threat to Microsoft," Dawson said, "is the shift from a PC-based world where Microsoft dominated to a mobile world where Microsoft is an also-ran."