The realization of a fully electrical semiconductor-based device making use of the electron spin is of fundamental importance for physically studying spinrelated phenomena. We have performed a detailed theoretical analysis of the feasibility of all electrical spin injection and detection in semiconductors by means of ferromagnetic electrodes and including spin-selective interface barriers to overcome the impedance mismatch. Based on the Poisson and diffusion equation, including electric field effects, the expected resistance difference for parallel and anti-parallel configurations of the ferromagnetic electrodes is analytically calculated and the influence of the sample and measurement geometry is extensively investigated. In this paper, we propose a new measurement geometry, for which we predict a clearly larger spin accumulation over a larger distance. Electric fields created in different sample regions via extra bias voltages will compensate spin loss in side branches. Even when the spin diffusion length is orders of magnitude smaller than the semiconductor length, the magnetoresistance in lateral devices closely approaches values for vertical devices.