The diffraction anomalous fine-structure technique is applied to the characterization of the local order around metallic atoms located in binary and ternary iron and cobalt disilicides thin films prepared by molecular-beam epitaxy on Si͑111͒. The study is first performed on binary compounds, namely, cubic CoSi 2 (CaF 2 type͒, and metastable tetragonal FeSi 2 (␣-FeSi 2 -derived type͒. With the crystallographic structure of both phases known, the first-order data analysis proposed by Proietti et al. ͓Phys. Rev. 59, 5479 ͑1999͔͒ is used to reduce the experimental data. The analysis of the Co K-edge fine structure collected on the 111 fundamental diffraction peak of the standard CoSi 2 allows the determination of the short-range order around the unique metallic site, in the same way as extended x-ray-absorption fine structure. In addition, it is shown that recording the Fe K-edge oscillations on a single superstructure peak of iron disilicide can provide further information about the long-range order in the ␣-FeSi 2 -derived-type structure. The value of the long-range-order parameter is found to be 0.9Ϯ0.05. Finally, the method is applied to an epitaxial layer grown at room temperature with the ratio Fe:Si of 0.7:2 and Co:Si of 0.3:2 Si on Si͑111͒ and annealed at 930 K. The analysis of Fe and Co K-edge fine structure collected on the 111 diffraction peak permits to differentiate between Co and Fe local environments in ternary Co 0.6 Fe 0.4 Si 2 grains having a CaF 2 -type structure. These nanostructures are embedded in a Co 0.05 Fe 0.95 Si 2 matrix whose tetragonal lattice is very close to the ␣-FeSi 2 -derived one. The value of the parameter derived from the analysis of the Fe K-edge oscillations on the 001 superstructure peak is found to be 0.8Ϯ0.05.