ConvertStringToUnsignedLong

Converts an ASCII string to an unsigned LONG.

Thread Context:Non-Blocking

Syntax

    LONG ConvertStringToUnsignedLong (
       BYTE **string,
       LONG  *value,
       LONG   minValue,
       LONG   maxValue,
       LONG   base
    );
    

Parameters

string
Points to the address of an ASCII string pointer, which contains valid ASCII text.
value
Points to the LONG value that is returned.
minValue
Specifies the minimum value that the number can be.
maxValue
Specifies the maximum value that the number can be.
base
Specifies the base (radix) of the string value, such as 10 or 16.

Return Values

Returns one of the following values:

0

Successful

-1

Invalid number

1

Value is out of range

Remarks

ConvertStringToUnsignedLong can be called during the initialization function and within the HAM_Check_Option function to convert ASCII numbers that are passed in as strings to an unsigned LONG.

See Also

HAM_Check_Option