DwmGetDxSharedSurface函数,可用于DirectX窗口后台截图(魔兽世界可截)
Microsoft DirectX Graphics Infrastructure (DXGI) 处理枚举图形适配器、枚举显示模式、选择缓冲区格式、在进程 (之间共享资源,例如,在应用程序和桌面窗口管理器 (DWM) ) 之间共享资源,以及向窗口或监视器显示呈现的帧。可以使用 DXGI 向窗口、监视器或其他图形组件呈现帧,以便最终进行合成和显示。 还可以使用 DXGI 读取监视器上的内容。
|
DXGI 接口 | 本部分包含有关 DXGI 提供的接口的信息。 |
DXGI 的目的是与内核模式Driver和系统Hardware通信 |
DXGI 函数 | 本部分包含有关 DXGI 提供的函数的信息。 | ||
DXGI 结构 | 本部分包含有关 DXGI 提供的结构的信息。 | ||
DXGI 枚举 | 本部分包含有关 DXGI 提供的枚举的信息。 | ||
DXGI 常量 | 本部分包含有关 DXGI 提供的常量的信息。 |
DWM Window capture by DwmGetDxSharedSurface, background windows(excluding minimization) are supported, but some windows are not supported.
BOOL WINAPI DwmGetDxSharedSurface ( HWND hwnd,
HANDLE* phSurface,
LUID* pAdapterLuid,
ULONG* pFmtWindow,
ULONG* pPresentFlags,
ULONGLONG* pWin32kUpdateId
)
Parameters
hwnd:The window to investigate
phSurface:
资源句柄。A pointer that receives a shared handle to the windows' surface. This can be passed IDirect3DDevice9::CreateTexture to make a texture.
- pAdapterLuid:
- Pointer that receives the id of the adapter the window resides on
- pFmtWindow
- The D3DFMT_ format of the window surface
- pPresentFlags
- Pointer that receives the D3DPRESENT_ flags for the window/surface
- pWin32kUpdateId
- 不知道是什么东西
Return Value
Non-zero on success, zero on failure. Use GetLastError() for more information.
Remarks
Any output parameters not required can be set to NULL