screenshots

Directx 9 screen capture c#

Trying to get an image via a hook from DirectX 9. For the hook, I use the EndScene function. Next, using SharpDX, I try to ex ... lem-the screen screen is sometimes flipped. I don't know how to fix it. not strong in DirectX. Tell me what I'm doing wrong.