Abstract: A device for injection-molding and for overmolding objects has an upper element and a lower element, which surround a contiguous volume consisting of a filling space for holding the object and casting material and a sprue for holding casting material. The upper element is movable in relation to the lower element. A piston is arranged within the upper element in an integrated manner and is movable relative to the upper element. The position of the piston can be varied in accordance with a dimension of the object in an axial direction and the piston has a protrusion for changing a volume as filling amount balancing of the casting material within the sprue such that the device is filled with a constant amount of casting material irrespective of the dimension of the object in the axial direction and a volume varying with the dimension of the object in the axial direction.