Based on an inverse function theorem for a system of semismooth equations, this paper establishes several necessary and sufficient conditions for an isolated solution of a complementarity problem defined on the cone of symmetric positive semidefinite matrices to be strongly regular/stable. We show further that for a parametric complementarity problem of this kind, if a solution corresponding to a base parameter is strongly stable, then a semismooth implicit solution function exists whose directional derivatives can be computed by solving certain affine problems on the critical cone at the base solution. Similar results are also derived for a complementarity problem defined on the Lorentz cone. The analysis relies on some new properties of the directional derivatives of the projector onto the semidefinite cone and the Lorentz cone.