A device for use as an endoprosthesis, having a base body (1, 1′), comprising a metallic material, and a function element (3, 3′) that is attached to the base body and has a different metallic material composition in comparison with the material of the base body (1, 1′). To reduce direct metal contact between the base body (1,1′) and the function element (3, 3′), a first layer (5, 5′) is introduced into the borderline area (9, 9′) between the base body (1, 1′) and the function element (3, 3′), extending to the surface, wherein the first layer is produced by plasma-chemical treatment in an aqueous solution containing phosphate ions, or comprises magnesium stearate.