  We establish a generalization of the Dunkl--Williams inequality and its
inverse in the framework of Hilbert $C^*$-modules and characterize the equality
case. As applications, we get some new results and some known results due to
Pe\v{c}ari\'c and Raji\'c [Linear Algebra Appl. 425 (2007), no. 1, 16--25].
