For fixedly implanting a device for material or signal delivery or acquisition or a part of such a device in a human or animal body, an opening is provided in hard tissue of the body, the opening reaching through a hard tissue layer, e.g. through a cortical bone layer (2) into cancellous bone (1) underneath. The device comprises a plug portion (P) and/or a cover portion (C) which comprises a ring (7) of a material having thermoplastic properties extending around the plug portion (P) or on a tissue facing surface of the cover portion (C). The opening (9) provided in the hard tissue has a cross section at least in the area of its mouth that is adapted to the plug or cover portion such that the plug portion (P) can be introduced through the mouth of the opening (9) or the cover portion (C) can be positioned over the mouth of the opening (9) such that the ring (7) extends around the opening, along its wall and/or on the hard tissue surface around its mouth. For implantation the device is positioned with the plug portion (P) in the mouth of the opening and/or the cover portion (C) over the opening, the material having thermoplastic properties is then liquefied e.g. through application of vibrational energy and is made to get into contact with the wall of the opening and/or with the hard tissue surface all around the opening. On resolidification the material having thermoplastic properties constitutes a sealing ring (11) between device and hard tissue. The device is e.g. equipped as drug delivery device for intra-osseous or intra-articular drug delivery and is implanted through the cortical bone layer in the vicinity of a joint. The sealing ring (11) fully prevents migration of the drug or other undesired substances along the device surface through the cortical bone layer.