DrNseven / D3D12-Hook-ImGui

d3d12 hook with imgui, directx12 hook, dx12 hook, d3d12 api hook
202 stars 50 forks source link

How to get a Screen shot in D3D12 Game? #5

Open Resbonsiblyat opened 2 years ago

Resbonsiblyat commented 2 years ago

I'm not well experienced actually in D3D12.

I'm writing a tool to get a Screen Shot in Diablo II: Resurrected which uses D3D12.

But I failed with using API in gdi32.dll like

bool PrintWindow( IntPtr hwnd, // Window to copy,Handle to the window that will be copied.
IntPtr hdcBlt, // HDC to print into,Handle to the device context.
UInt32 nFlags // Optional flags,Specifies the drawing options. It can be one of the following values.
);

It gives me a whole black image....

So what should I do?

Thanks for help...