Inhibiting corrosion of metallic material by applying inhibitors to the surface in danger of corrosion or adding them to the corrosive agent