A total loss of engine power due to fuel exhaustion. Also causal was the pilot's failure to divert earlier in the flight to another airport to ensure that the airplane had an adequate fuel reserve, and the malfunction of the landing gear extension system for reasons that could not be determined with the available information.