GetProcVariables()


" "

short GetProcVariables(long ProcID, VARIANT* Variables)

Description

This function returns an array that contains the names of the variables that are in the procedure's text. You should assign values to these variables by calling SetProcVariable() prior to running the procedure using RunProc().

Parameters

Name Description
ProcID The ID of the procedure, as returned from InitializeProc().
Variables

A pointer to a VARIANT in which the result is stored. The result is an array of strings (variant type VT_ARRAY | VT_BSTR), with each string containing the name of one variable. If there are no variables in the procedure, the result is empty (variant type VT_EMPTY).

You must initialize the VARIANT before calling this function. Visual Basic does this automatically. Visual C++ programmers should call VariantInit().

Note:
Due to a bug in Microsoft Excel 7.0 and Microsoft Access 7.0 (and possibly other 32-bit Microsoft products that use Visual Basic for Applications), string data in Variant variables received from QMF for Windows may not be translated from Unicode (used by OLE) to ANSI (used by VBA). When this occurs, only the first character of the string is displayed. To remedy this problem, set the variable equal to an empty string before you call the QMF for Windows function that uses the variable.

Return Value

The return value will be zero if successful or non-zero if unsuccessful. If there are no variables in the procedure, the return value is RS_ERROR_NO_DATA (-1). If the return value is non-zero, you can call GetLastErrorString() or GetLastErrorType() to get additional error information.