BWIGetString – Return string data

BWIGetString (h, item, string, size)

Use this to return string data, such as institution information, an IBAN or a condition's message. The item input parameter determines what data is returned.

If you have multiple calls to BWIGetString using the same variable, reset the size parameter to the actual length of the string variable between calls. If you do not reset the parameter, then the core could return a truncated string.

Use BWICheck or BWINext to determine the data you want to return.

If the size output parameter is greater than the size input parameter, the data has been truncated. Your application should use the lesser of the input and output size values to determine which portion of string to use.

string is always terminated by a C null character and the size always includes the null, therefore the size output parameter can never be less than 1. The portion ofstring containing string data is:

minimum(input_size,output_size) - 1

Input Parameters

h Handle for the string. You create this using BWICreateHandle.
item Long integer. The string data item to return. This can be one of:
BWI_V_PAR# where # is 1 to 5. Use these to get account and other country related information.
BWI_V_FIELD + n where n is 1 to 999. Returns information for the institution selected using BWICheck or BWINext.
The data available and the value of n is determined by the country and data being used. To determine if there is any data available, call BWIGetValue with an item of BWI_V_Data.
BWI_V_IBAN Returns the International Bank Account Number if the account details are valid.
BWI_V_ISO Returns the ISO country code for the country of the handle. If the country is unknown, an empty string is returned.

If you use BWI_V_ISO before initialising the core, use BWINext to determine whether any fatal conditions have occurred.

BWI_V_NEXT Returns the message associated with the condition called by BWINext. If you do not want your application to interpret the conditions, call this to use the standard condition text.

 

size Long integer. Set this to the number of characters in the string plus 1 for the null character. For example to get a 6 character code, this must be set to 7.

Output parameters

string Char. This is the variable in which the string is returned.
size Long integer. The number of characters actually contained in the string. This includes one extra character for the null terminator.