The world's largest maker of PCs wants out of the PC business -- and it's ditching its struggling TouchPad tablet device -- to focus on the high-end server and software markets, the company announced Thursday.

By the end of next year, if it sells or spins off the PC division, HP computers could be sold under another company's name.

The change is remarkable for a company that was the top seller in the second quarter of 2011 of personal computers, with nearly 20 percent of the worldwide computer market, according to market research firm IDC. HP's consumer computer business is also widely credited with introducing the first personal computer way back in 1968 -- though it was IBM's PC that really kicked off the PC revolution.

Dell is the second-biggest maker, with 12.9 percent of the worldwide market. To echo the company's ad campaign, dude, will you be getting one of those instead? In the U.S., Apple held third place in the second quarter with 10.7 percent of the market (an astonishing 14.7 percent growth over last year). 

Why the big move? Though profitable, the consumer business is far less lucrative for HP than its business division.

Never fear, HP fans: The company isn't ending PC sales entirely, just spinning off the computer division -- though plans aren't entirely clear. It's surprising nonetheless, especially for computer users with a head for history: HP made waves in 2002 when it acquired the discount PC business of rival Compaq Computer for a cool $25 billion.

The end of the company's smartphone and tablet divisions is even more surprising news. HP paid $1.8 billion for smartphone maker Palm in 2009, mostly for the webOS software that powered the devices. HP went on to introduce the TouchPad, which has struggled to compete with the iPad and to distinguish itself from the army of Google Android-based gadgets.

HP cut the price for its tablet device in July by 20 percent. On Wednesday, AllThingsD reported that Best Buy was sitting on 270,000 unsold TouchPads -- and was hoping the company would buy them back.

The computer giant makes even less of a stir in the smartphone business. The top 5 manufacturers sold three quarters of the world's smartphones, according to IDC -- and HP wasn't one of them. 

The move echoes one from IBM, HP's rival for the enterprise market, which in 2005 sold off its computer business to Lenovo, the biggest maker of PCs in China.

HP on Thursday posted third-quarter adjusted earnings that topped expectations, but the tech firm lowered its 4Q revenue outlook, Fox Business reported

The company also confirmed it is in talks to buy Autonomy Corp., a business software maker. HP shares, which were halted before the news (the earnings were expected after the bell) were off 6 percent at $29.53.

To learn how this affects HP's bottom line, see FoxBusiness.