directx-present-hook
directx-present-hook copied to clipboard
Hooking IDXGISwapChain::Present in another process
Hi, The example works well, it is very useful for me! Now I'm considering to capture window of other processes, and made some changes to test:
// Set the hook object to capture some frames.
hr = HookT::Get()->CaptureFrames(blackBoxDXWindow.GetHandle(), outputFolder, 10);
to
// Set the hook object to capture some frames, but for another window.
HWND hwnd = FindWindowW(NULL, L"Another Window");
hr = HookT::Get()->CaptureFrames(hwnd, outputFolder, 10);
I'm using dx11 and I found the D3D11PresentHook::SwapChainPresent function still only catching the swapchain of the blackbox window created by its own.
I have noticed that the address of presentPointer_ in D3D11PresentHook::Hook is always the same, so I supposed the polyhook will work like some global hook of SetWindowsHook, but it's seems not.
And now I think the problem is cross-process, do you have any idea of this issue or I missed up something?
I have the same question! Can't hooking another process!