A compound of the formula: wherein: X represents a residue of a ketone-containing opioid, wherein the hydrogen atom of the corresponding enolic group of the ketone is replaced by a covalent bond to -C -NR 5 -(C(R 1)(R 2)) n -NR 3 R 4; R 5 is selected from alkyl, substituted alkyl, arylalkyl, substituted arylalkyl, aryl and substituted aryl; each R 1 is independently selected from hydrogen, alkyl, substituted alkyl, aryl, substituted aryl, acyl, and aminoacyl; each R 2 is independently selected from hydrogen, alkyl, substituted alkyl, aryl, substituted aryl, acyl, and aminoacyl; or R 1 and R 2 together with the carbon to which they are attached form a cycloalkyl, substituted cycloalkyl, aryl, or substituted aryl group; or two R 1 and R 2 groups on adjacent carbon atoms, together with the carbon atoms to which they are attached, form a cycloalkyl, substituted cycloalkyl, aryl, or substituted aryl group; n is an integer from 2 to 4; R 3 is hydrogen; R 4 is each R 6 is independently selected from hydrogen, alkyl, substituted alkyl, aryl, substituted aryl, arylalkyl, substituted arylalk-yl, heteroalkyl, substituted heteroalkyl, heteroaryl, substituted heteroaryl, heteroarylalkyl, and substituted heteroarylalkyl, or optionally, R 6 and R 7 together with the atoms to which they are bonded form a cycloheteroalkyl or substituted cycloheteroalkyl ring; each W is independently -NR 8 -, -O- or -S-; each R 8 is independently selected from hydrogen, alkyl, substituted alkyl, aryl and substituted aryl, or optionally, each R 6 and R 8 independently together with the atoms to which they are bonded form a cycloheteroalkyl or substituted cycloheteroalkyl ring; p is an integer from one to 100; and R 7 is selected from hydrogen, alkyl, substituted alkyl, acyl, substituted acyl, alkoxycarbonyl, substituted alkoxycarbonyl, aryl, substituted aryl, arylalkyl, and substituted arylalkyl; or a salt, hydrate or solvate thereof. X represents a residue of a ketone-containing opioid, wherein the hydrogen atom of the corresponding enolic group of the ketone is replaced by a covalent bond to -C -NR 5 -(C(R 1)(R 2)) n -NR 3 R 4; R 5 is selected from alkyl, substituted alkyl, arylalkyl, substituted arylalkyl, aryl and substituted aryl; each R 1 is independently selected from hydrogen, alkyl, substituted alkyl, aryl, substituted aryl, acyl, and aminoacyl; each R 2 is independently selected from hydrogen, alkyl, substituted alkyl, aryl, substituted aryl, acyl, and aminoacyl; or R 1 and R 2 together with the carbon to which they are attached form a cycloalkyl, substituted cycloalkyl, aryl, or substituted aryl group; or two R 1 and R 2 groups on adjacent carbon atoms, together with the carbon atoms to which they are attached, form a cycloalkyl, substituted cycloalkyl, aryl, or substituted aryl group; n is an integer from 2 to 4; R 3 is hydrogen; R 4 is each R 6 is independently selected from hydrogen, alkyl, substituted alkyl, aryl, substituted aryl, arylalkyl, substituted arylalk-yl, heteroalkyl, substituted heteroalkyl, heteroaryl, substituted heteroaryl, heteroarylalkyl, and substituted heteroarylalkyl, or optionally, R 6 and R 7 together with the atoms to which they are bonded form a cycloheteroalkyl or substituted cycloheteroalkyl ring; each W is independently -NR 8 -, -O- or -S-; each R 8 is independently selected from hydrogen, alkyl, substituted alkyl, aryl and substituted aryl, or optionally, each R 6 and R 8 independently together with the atoms to which they are bonded form a cycloheteroalkyl or substituted cycloheteroalkyl ring; p is an integer from one to 100; and R 7 is selected from hydrogen, alkyl, substituted alkyl, acyl, substituted acyl, alkoxycarbonyl, substituted alkoxycarbonyl, aryl, substituted aryl, arylalkyl, and substituted arylalkyl; or a salt, hydrate or solvate thereof.