Captures formatted text from target window.
[C/C++]
HRESULT CaptureFromHWND(
INT_PTR hwnd,
BSTR* text
);
[Visual Basic]
object.CaptureFromHWND(
ByVal hwnd As INT_PTR,
ByRef text As String
)
[C#]
void ITextGRABSDK.CaptureFromHWND(
INT_PTR hwnd,
ref string text
);
Parameters
- hwnd
- [in] target window handle.
- text
- [out] captured formatted text.
Remarks
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. |