Thanks for your replies.
@Phil - it wasn't my actual code, I simplified, but it was the basic idea that I couldn't get to work. The second attempt was based on something I read in another forum and didn't think would work as it was (turns out I was right).
@Alvaro - thanks for the sample code. At first I wasn't getting it to work, then realized that I wasn't static casting to a pointer of the base class.
Sometimes one needs to really stop looking at code, then come back with a fresh mind. Appreciate the help! Thanks.