TextGRAB SDK Documentation | ITextGRABSDK::CaptureFromHWND

Captures formatted text from target window.

HRESULT   CaptureFromHWND(

    INT_PTR hwnd,
    BSTR*   text

[Visual Basic]

   ByVal hwnd As INT_PTR,
   ByRef text As String

void   ITextGRABSDK.CaptureFromHWND(

    INT_PTR    hwnd,
    ref string text



[in] target window handle.
[out] captured formatted text.


This method captures all visible text which can be captured in specified window.

Return Value(s)


Return Value(s) Definitions
S_OK (0x00000000) Operation was completed successfully.
E_FAIL (0x80004005) Error.
E_INVALIDARG (0x80070057) The hwnd parameter is not a valid window handle.
S_FALSE (0x00000001) The text could not be captured. Empty string was returned.
E_POINTER (0x80004003) The text parameter is NULL.
FAILED(hr) Appropriate error message.

See Also

ITextGRABSDK interface