The two-barrier problem for continuously differentiable processes