SBServerGetStringValue

GameSpy SDK

SBServerGetStringValue

Returns the value associated with the specified key. This value is returned as the appropriate type. SBBool, float, int or string.

const gsi_char * SBServerGetStringValue(
SBServer server,
const gsi_char * keyname,
const gsi_char * def );
RoutineRequired HeaderDistribution
SBServerGetStringValue<sb_serverbrowsing.h>SDKZIP

Return Value

If the key is invalid or missing, the specified default is returned. For an existing key, the value is converted from string form to the appropriate data type. These functions do not perform any type checking.

Parameters

server
[in] A valid SBServer object.
keyname
[in] The value associated with this key will be returned.
def
[in] The value to return if the key is not found.

Remarks

These functions are usefull for converting custom keys to a native data type. No type checking is performed, the string value is simply cast to the appropriate data type. If a key is not found,the supplied default is returned.

Unicode Mappings

RoutineGSI_UNICODE Not DefinedGSI_UNICODE Defined
SBServerGetStringValueSBServerGetStringValueASBServerGetStringValueW

SBServerGetStringValueW and SBServerGetStringValueA are UNICODE and ANSI mapped versions of SBServerGetStringValue. The arguments of SBServerGetStringValueA are ANSI strings; those of SBServerGetStringValueW are wide-character strings.