GetPromptValue Function

Applies To  

Retrieves the value of a particular prompt.

Syntax
GetPromptValue(
    IPROMPTSET_HANDLE i_hIPromptSet,
    int i_iPromptNum,
    int i_iValueIndex,
    PromptValuesType* o_valueType,
    unsigned short* io_promptValueSize1,
    Char* o_promptValue1,
    unsigned short* io_promptValueSize2,
    Char* o_promptValue2)
    Parameters

i_hIPromptSet [In]

The handle to the IPromptSet interface. See hIPromptSet Variable.

i_iPromptNum [In]

The prompt's index number.

i_iValueIndex [In]

The prompt value's index number.

o_valueType [Out]

The prompt value type.

io_promptValueSize1 [In, Out]

The buffer size for the first prompt value.

o_promptValue1 [Out]

The first prompt value.

io_promptValueSize2 [In, Out]

The buffer size for the second prompt value.

o_promptValue2 [Out]

The second prompt value.

Returns

Each function returns a RET_VALUE that is an error code of type Long. The return value is greater than zero if the call was successful, and zero or less if not. Use RET_OK(x) and RET_ERROR(x) to check for failure.

If the function call fails, check the value of the buffer size parameter. After a successful function call, this parameter contains the size of the buffer that you passed in. However, if the buffer size is too small, then the function returns PROCESSEXTERR_BUFFERSIZETOOSMALL, and the buffer size that is needed is specified in the parameter.

Remarks

The prompt value type will be one of the following:

Constant Value Explanation

pvalue_single

0

A discrete value.

pvalue_range

1

A ranged value.

If the prompt type is a range, and you do not provide enough space for both values, then you must call GetPromptValue twice: once to add a larger value for io_promptValueSize1, and once to add a larger value for io_promptValueSize2.



Crystal Decisions, Inc.
http://www.crystaldecisions.com
Support services:
http://support.crystaldecisions.com