25.10.2014 Views

are registered trademarks, the Attachmate logo is a trademark and

are registered trademarks, the Attachmate logo is a trademark and

are registered trademarks, the Attachmate logo is a trademark and

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

WINHLLAPI LANGUAGE REFERENCE<br />

Function 6<br />

Data string<br />

Data length<br />

PS position<br />

Text to be searched for in <strong>the</strong> PS<br />

Length of <strong>the</strong> data string. (Ignored if in EOT mode.)<br />

Start position where <strong>the</strong> search function <strong>is</strong> to begin (SRCHFRWD) or to end<br />

(SRCHBKWD). Th<strong>is</strong> parameter <strong>is</strong> ignored if SRCHALL <strong>is</strong> set.<br />

Return parameters<br />

PS Position<br />

Function replaces <strong>the</strong> value of call parameter Data length with <strong>the</strong> PS position where<br />

specified text was found, or 0 if <strong>the</strong> text was not found.<br />

Result code<br />

Function replaces <strong>the</strong> value of call parameter PS position with one of <strong>the</strong> following<br />

codes:<br />

Code<br />

Description<br />

0 The function was successful (<strong>the</strong> specified text was found).<br />

1 The application was not connected with a host PS.<br />

2 An incorrect parameter was entered.<br />

7 An invalid PS position was specified for beginning <strong>the</strong> search<br />

9 A system error occurred<br />

24 The specified text was not found.<br />

Example<br />

Notes<br />

WORD HllFunc = 6;<br />

char HllDataStr[10];<br />

/* Text to search for: "Hello" */<br />

strcpy (HllDataStr, "Hello");<br />

WORD HllDataLgth = 5;<br />

/* Start search at PS position 199 */<br />

WORD PsPos = 199;<br />

WinHLLAPI(&HllFunc, HllDataStr, &HllDataLgth, &PsPos);<br />

• The SRCHFROM option <strong>is</strong> useful when you <strong>are</strong> searching for a string that may<br />

occur several times.<br />

• The search carried out by th<strong>is</strong> function <strong>is</strong> case-sensitive.<br />

• To determine when <strong>the</strong> host <strong>is</strong> ready for input, <strong>the</strong> application should search<br />

<strong>the</strong> screen for key fields, usually near <strong>the</strong> bottom of <strong>the</strong> screen.<br />

Prep<strong>are</strong>d by <strong>Attachmate</strong> Technical Support 25

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!