EsbListVariables

入力条件に適合するすべての代替変数をリストします。

構文

            EsbListVariables
             (
            hCtx, pVariable, pItems
            )
ByVal 
            hCtx
                  As Long
      
            pVariable
             As ESB_PVARIABLE_T 
      
            pItems
                As Integer
         
パラメータ説明

hCtx

APIへのコンテキスト・ハンドル。

pVariable

リストされた代替変数の説明を含む構造体を指すポインタ。

  • メンバーVarNameおよびVarValueは無視されます。

  • Serverメンバーは指定されていますが、AppNameおよびDbNameが空の場合は、関数によってサーバー・レベルの代替変数のみがリストされます。

  • ServerおよびAppNameメンバーは指定されていますが、DbNameが空の場合は、指定したサーバーとアプリケーション・レベルの両方のすべての変数がリストされます。

  • ServerAppNameおよびDbNameという3つのメンバーすべてが指定されている場合は、指定した3つのすべてのレベルの変数がリストされます。

  • フィールドが空の場合は、そのフィールドは「無視」するよう処理されます。

pItems

ppVarListパラメータに戻される変数の数を示す、符号なしlong値を指すポインタ。

戻り値

成功の場合はゼロ(0)が戻されます。

         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
      

関連トピック