SanDisk Corp. reported lower net income and revenue for the third quarter as the company sold fewer of its memory chips to gadget makers. But the results surpassed Wall Street's expectations and SanDisk said it is gaining market share from competitors.

SanDisk's stock advanced in after-market trading following the announcement.

The company said Thursday that it earned $76.5 million, or 31 cents per share, in the July-September period. That's down 67 percent from $233.3 million, or 96 cents per share, in the same period a year earlier. Adjusted earnings were $117.8 million, or 48 cents per share, in the latest quarter.

Revenue fell 10 percent to $1.27 billion from $1.42 billion.

Analysts, on average, were expecting adjusted earnings of 33 cents per share on revenue of $1.22 billion, according to a poll by FactSet.

SanDisk, based in Milpitas, Calif., makes flash-memory chips used in removable USB flash drives and digital media players, solid-state drives used in computers and other high-tech chips. Its products are used in electronics such as phones, cameras and computers.

President and CEO Sanjay Mehrotra said the results show "solid recovery" in its mobile embedded business.

RBC Capital Markets analyst Doug Freedman said the quarter's appeared to have come from improved pricing at the end of the quarter for a type of memory known as NAND flash, SanDisk's increasing presence at Apple Inc., as well as its rising market share. NAND flash memory is used in smartphones and other consumer electronics.

The company's stock rose $1.40, or 3.3 percent, to $44.26 in after-hours trading following the release of the earnings report. The stock had closed down $1.48, or 3.4 percent, to $42.86 in the regular session.