I try to get the gpu usage for a running process programmatically. In previous posts, people refered to D3DKMTQueryStatistics which was part of the d3dkmthk.h header, but it looks like they removed D3DKMTQueryStatistics in one of the newer windows sdk versions. I'm using Windows SDK 10, 10.0.19041.0 and its gone.
see the CollectReports method of gfxWindowsPlatform.cpp from Firefox source.
HMODULE gdi32Handle;
PFND3DKMTQS queryD3DKMTStatistics = nullptr;
if ((gdi32Handle = LoadLibrary(TEXT("gdi32.dll"))))
queryD3DKMTStatistics = (PFND3DKMTQS)GetProcAddress(gdi32Handle, "D3DKMTQueryStatistics");