The coercive force of ultrathin films with a perpendicular easy directon and a domain wall strongly pinned by defects is investigated. The free energy of the film consists of the energy of exchange interactions, perpendicular uniaxial anisotropy, Zeeman and dipole contributions. The magnetization direction within the domain wall is calculated by the spline technique. Additionally, it is shown that the Laplace capillary law can be obtained from the minimum of the free energy with respect to the shape of the wall. The Laplace law is used for estimation of the distance between defects in real films.