Thanks for your advice lanman92. But my problem lies in the SymFromName() function call's 126 error. The 2 debug libraries are correctly loaded actually.
The key is for kernel32 + CreateProcessW, it works. But for d3d9 + CD3DBase::EndScene, It does not.
Is there a possibility that my d3d9 or dxgi does not have symbols?
On the other hand, is there a way to grab the IDXGISwapChain VTable base address just like the way we grab EndScene() using static pointers? And in this way we can do simple VTable hook instead of a detour hook. That sounds nice~