access to Zbuffer

Is there anyway to get a pointer to the Zbuffer or in any other way directly access it.

Nope, sorry. This comes up over and over again. There’s no way to get at the Z-buffer directly; you have to use one of the pixel transfer functions to move it somewhere else first.