XtfCaptureScreenshot captures a screenshot of what is currently being displayed by a console. The screen capture includes anything that is currently displayed on the console output, including exclusive apps, shared apps, snapped apps, system UI such as Home or notification pop-ups, and so forth. The screen capture is at the currently selected display resolution for the console.
HRESULT XtfCaptureScreenshot(
LPCWSTR address,
HBITMAP* phBitmap
)
address
Type: LPCWSTR
Pointer to the tools IP address or hostname of the development console whose screen is to be captured.
phBitmap
Type: HBITMAP*
On successful completion, points to the HBITMAP for the captured screen. When you have finished using this bitmap, use DeleteObject to free the resources associated with the HBITMAP.
Type: HRESULT
HRESULT success or error code.
Using XtfCaptureScreenshot takes momentary control of the video output stream. This causes a momentary framerate glitch on the display, and can cause a black-screen segment in video recorded by GameDVR at the time of the capture.
Your code should follow normal good programming practice and use the returned bitmap’s embedded information to determine the size of the resulting bitmap. The expected resolution of the resulting bitmap is that it matches the current screen resolution.
Header: Declared in xtfconsolecontrol.h.
Library: Use xtfconsolecontrol.lib.