Measuring masses of long-period planets around F, G, and K stars is necessary to characterize exoplanets and assess their habitability. Imaging stellar astrometry offers a unique opportunity to solve radial velocity system inclination ambiguity and determine exoplanet masses. The main limiting factor in sparse-field astrometry, besides photon noise, is the non-systematic dynamic distortions that arise from perturbations in the optical train. Even space optics suffer from dynamic distortions in the optical system at the sub-μas level. To overcome this limitation we propose a diffractive pupil that uses an array of dots on the primary mirror creating polychromatic diffraction spikes in the focal plane, which are used to calibrate the distortions in the optical system. By combining this technology with a high-performance coronagraph, measurements of planetary systems orbits and masses can be obtained faster and more accurately than by applying traditional techniques separately. In this paper, we present the results of the combined astrometry and and highcontrast imaging experiments performed at NASA Ames Research Center as part of a Technology Development for Exoplanet Missions program. We demonstrated 2.38x10-5 λ/D astrometric accuracy per axis and 1.72x10-7 raw contrast from 1.6 to 4.5 λ/D. In addition, using a simple average subtraction post-processing we demonstrated no contamination of the coronagraph field down to 4.79x10-9 raw contrast.