We have applied grazing incidence X-ray photoemission spectroscopy to the determination of the thickness of SiO2 layers on Si, as well as surface carbon that is present. The measurements take advantage of the different optical constants of the layers. X-rays incident on the surface at grazing angle undergo total external reflection, where the fields in each layer are subject to highly non-linear changes as a function of incidence angle. X-ray photoemission excited by these fields gives information on atomic species, chemical state, and layer thickness. Simultaneous fits are made to the photoemission spectra in each layer. The method is illustrated for a thermally grown oxide layer and a native oxide on Si.