[C++, 3ds max] get/set viewport color/depth framebuffer


I am trying to access current viewport depth and color framebuffers to do some painting with soruce data unrelated to gl/dx. I have my own depth and color data and i want to mix it with the existing viewport, in a typical opengl window i would use glreadpixels/gldrawpixels (or more modern variation) . So far i successfully got called my viewportcallback, but noting from the GraphicWindow ::setBuf / GraphicWindow ::getBuf work (always got FALSE on these calls).

Can someone point me out where i can else go ?

thanks in advance