:"I would also like to know how frequent you had been using heroin" is an indirect question. (Please note that there is no question mark because it is an indirect question..)
"How frequent had you been using heroin?" is a direct question. (As it is a direct question, a...