Despite alerting investors that it would take a $40 million hit on its OnLive investment earlier today, Taiwanese smartphone giant HTC has announced it will make a $35.4 million “strategic investment” in Silicon Valley enterprise software startup Magnet Systems, for a 17.10 percent stake in the company.

HTC says that the investment will help bring “social, mobile and cloud capabilities to HTC’s portfolio of service offerings to its mobile enterprise customers.” The company says Magnet’s platform provides “ideal foundation for the applications and services that enterprises will be buying and building in the coming years.”

Magnet was founded by Alfred Chuang, who was also a founder of BEA Systems — a software company that was acquired for $8.5 billion by Oracle in 2008. The company specialises in developing platforms that let companies build, scale and deploy their own cloud-based applications, and recently secured $12.6 million Series A funding in a round led by Andreessen Horowitz.

HTC’s deal leads Magnet’s Series B funding, gaining approval from HTC’s Chairman of the Board and at least three other board members.

The investment signals that while HTC is fighting for its share of the consumer market, it is intent on increasing its focus on the enterprise, where employees are increasingly bringing their own devices (BYOD) and working on the go.

The company has been struggling to compete with Apple and Samsung in recent months, issuing second quarter financial results that came in a little over $3 billion (NT$91.04 billion), down from $4.3 billion a year previous.

However, it was its outlook for Q3 that may worry investors, with revenues forecasted to be between $2.34 billion and $2.7 billion (NT$70 billion and NT$80 billion) — a 22 percent drop at the low end of that range. HTC also expects its gross margin to shrink from 27% to 25%, and operating margin from 9% to around 7% compared to the second quarter of 2012.

Over the weekend, OnLive announced it had sold all of its assets, including technology and intellectual property, without carrying over the company’s and its employees’ shares. However, nearly half of the staff were given offers to work for the new company at their current salaries and non-hired staff were offered consulting work in exchange for options. HTC, with its strategic investment in the company, has been forced to book a $40 million loss.

HTC believes the Chinese market will emerge as its key growth driver as its brand awareness grows and operator partnerships remain strong. It says Asia met expectation for growth since the One family launched in 2Q 2012, with sales across North and South Asia inline with expectations.