Retrieves one or more values associated with a specified keyword.
ContextKeyword objects
servicereference.GetContextKeywords ( name, values )
Argument |
Description |
---|---|
servicereference |
Reference to the ContextKeyword service instance. |
name |
String specifying the keyword for which the function returns corresponding values. |
values |
Unbounded String array into which the function places the values that correspond to name. This argument is passed by reference. |
Integer. Returns the number of elements in values if the function succeeds and -1 if an error occurs.
Call this function to access environment variables. Environment-variable availability differs by execution context:
PocketBuilder design time The function accesses DOS environment variables, each of which has a unique keyword.
PocketBuilder runtime Retrieves a blank string since there are no DOS environment variables to access on Pocket PC devices.
This example calls the GetContextKeywords function:
String ls_keyword
Integer li_count, li_return
ContextKeyword lcx_key
li_return = this.GetContextService &
("ContextKeyword", lcx_key)
ls_keyword = sle_name.Text
lcx_key.GetContextKeywords &
(ls_keyword, is_values)
FOR li_count = 1 to UpperBound(is_values)
lb_parms.AddItem(is_values[li_count])
NEXT