querylayer sample is a console application that outputs text information about loaded layers. It doesn't generate any graphic window. To see the output, run it manually from a command-line terminal instead of double-clicking the icon.