How to read from stencil buffer

How can i read stencil values from the stencil buffer, i had tried the following code but failed:
wglMakeCurrent(…);
pStencilPool = (GLushort*)malloc(sizeof(GLushort) * width * height);
glReadPixels(0, 0, width, height, GL_STENCIL_INDEX, GL_UNSIGNED_SHORT, pStencilPool);
p.s. The stencil buffer has 16 bit per pixel.
Thanks for your attention.

Originally posted by Xiaofeng:
p.s. The stencil buffer has 16 bit per pixel.


Never heard about 3D hardware with 16bit stencil buffer…
Maybe it should be - “frame buffer has 16 bit per pixel”?
Most (if not all) of the consummer level 3D cards do not support stencil buffer in 16bit mode.