It is important to remember that Non-Continuous Verbs cannot be used in any "continuous" tenses.
FORM Past Perfect Continuous
[HAD BEEN] + [VERB+ing]
EXAMPLES:
I had been waiting
there for two hours before she finally arrived.
She had
only been studying
English for two years before she got the job.
NOTE:
When you are using a verb tense with more than one part such as Past Perfect Continuous (had been studying), adverbs often come between the first part and the second part (had only been studying).
USE 1 Duration Before Something in the Past
We use the Past Perfect Continuous to show that something started in the past and continued up until another time in the past. "For five minutes" and "for two weeks" are both durations which can be used with the Past Perfect Continuous. Notice that this is related to the Present Perfect Continuous; however, the duration does not continue until now.
EXAMPLES:
They had
been talking for over an hour before
Tony arrived.
She had
been working at that company for three years
when
it went out of business.
James had been teaching at the University
for more than a year before
he left for Asia.
USE 2 Cause of Something in the Past
Using the Past Perfect Continuous before another action in the past is a good way to show cause and effect.
EXAMPLES:
Jason was tired
because he had been jogging
.
Sam gained
weight because he had been overeating
.
IMPORTANT
If you do not include a duration such as "for five minutes," "for two weeks" or "since Friday", many English speakers choose to use the Past Continuous. There is also a difference in meaning. Compare the examples below.
EXAMPLES:
I was
reading
when my roommate returned. Emphasizes the interruption of "reading."
I had been reading for an hour
when my roommate returned. Emphasizes the amount of time "for an hour."