Because processing was slow by D3DPOOL_SCRATCH, I wrote the desktop capture program to reference for the report on the Internet. However, a result is a pitch-black picture.
This is nothing related to the application type, if you want to get the data of desktop image, you should use the following function
GetFrontBufferData
So instead of calling
d3ddev->GetRenderTarget(0, &render);
d3ddev->GetRenderTargetData(render, dest);
You should call
d3ddev->GetFrontBufferData(0, dest);