Dispersion forces start to play an important role when the bodies are separated by the distances smaller than 100 nm. Such small gaps characterize modern nano- or microelectromechanical systems. Although the forces were reliably measured and compared to the theory in the range of 30-100 nm, severe problems appear at distances shorter than 30nm due to jump-to-contact instability. In this paper we propose a new measurement method, which does not suffer the short-distance instability. The method is based on the shape of an adhered cantilever that is sensitive to the forces acting near the adhered end. Two values are measured simultaneously: the dispersion pressure at minimal separation (close to contact) and the adhesion energy. Roughness of interacting surfaces plays a crucial role. We discuss possible realization of this experiment and propose the choice of optimal parameters.