A new technique based on the detection of the amplitude of the second harmonic was described in a previous paper. To compute the elastic modulus and the hardness of materials, the technique uses only the derivative of the contact radius with respect to the indentation depth. For this reason, this method is applicable only to homogeneous materials. In this paper, the method is extended to any materials with constant Young modulus. The indentation depth value is not needed at all, thus eliminating uncertainties related to the displacement measurement, which are very influent at small penetration depths. Furthermore, we also explain how to compute the indentation depth from the detection of the amplitude of the second harmonic. This new measurement technique was tested on three samples: fused silica, Poly(methyl methacrylate) (PMMA), and calcite, which is expected to exhibit indentation size effect. The obtained results show that mechanical properties and the indentation depth can be determined with good accuracy for penetration depths between 25 and 100 nm using this method.