Cervantes had that sort of fun with his levels of reality in Don Quixote, I think, especially when referencing the apocryphal sequel that preceded his second book.
Lovecraft referenced the Necronomicon a lot, though it was a fictional device of his, even mentioning people finding copies in old libraries and such around the world.
I like ACD a lot for how he explored his storytelling abilities in A Study in Scarlet and The Valley of Fear. The second parts to both novels are beautifully and poignantly written.
-----------------------------------------------------------------------------------------------------------------------------------
Is the foil of a detective a thief or a magician?
My Theory on the Fall:
http://sherlock.boardhost.com/viewtopic.php?pid=21539#p21539