Capture the text snapshot from the target window.
[C/C++]
HRESULT CaptureTextSnapshot(
INT_PTR hwnd,
ITextSnapshot** snapshot
);
[Visual Basic]
object.CaptureTextSnapshot(
ByVal hwnd As INT_PTR,
ByRef snapshot As Object
)
[C#]
void ITextGRABSDK.CaptureTextSnapshot(
INT_PTR hwnd,
object snapshot
);
Parameters
- hwnd
- [in] target window handle.
- snapshot
- [out] captured text snapshot.
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 snapshot could not be captured. |
E_POINTER | (0x80004003) The snapshot parameter is NULL. |
FAILED(hr) | Appropriate error message. |