EsbListVariables

Lists all substitution variables that conform to the input criteria.

Syntax

EsbListVariables (hCtx, pVariable, pItems)
ByVal hCtx      As Long
      pVariable As ESB_PVARIABLE_T 
      pItems    As Integer
ParameterDescription

hCtx

Context handle to the API.

pVariable

The pointer to the structure containing the description of the substitution variables being listed.

  • The members VarName and VarValue are ignored.

  • If the Server member is given but AppName and DbName are empty, then the function will list substitution variables at the server level only.

  • If the Server and AppName members are given but DbName is empty, it lists all variables at both the given server and application levels.

  • If all three of Server, AppName, and DbName members are given, it lists variables from all three specified levels.

  • If a field is empty, then that field is treated as a "don't care."

pItems

The pointer to an unsigned long value indicating the number of variables being returned in the ppVarList parameter.

Return Value

If successful returns zero (0).

Example

Declare Function EsbListVariables Lib "esbapin" (ByVal hCtx As Long, pVariable As ESB_VARIABLE_T, pItems As Integer) As Long
Public Sub ESB_ListVariables ()
   Dim i As Integer
   Dim nCount As Integer
   Dim sts As Long
   Dim oVariable As ESB_VARIABLE_T
   oVariable.AppName = "Sample"
   sts = EsbListVariables(hCtx, oVariable, nCount)
   If sts = 0 Then
      If nCount <> 0 Then
         For i = 1 To nCount
            sts = EsbGetNextItem(hCtx, ESB_VARIABLE_TYPE, oVariable)
            Debug.Print "Variable Name: " & oVariable.VarName
            Debug.Print "Value: " & oVariable.VarValue
            Debug.Print
         Next
      Else
         MsgBox "No substitution variables found."
      End If
   Else
      MsgBox "Error listing substitution variables."
   End If
End Sub

See Also