Syntax 

int PCMSStateListItem (PCMServerID, int index, char *buffer, int bufSize, bool bAddCountry)


Parameters 

PCMServerID serv – The PC*MILER server ID.

int index – The index of the element to return.

char *buffer – Reference buffer to store the name and state code.

int bufSize – Available size of the buffer.

bool bAddCountry – Set to True to append the country name and abbreviation to the buffer. Default is false.


Description

Prints the name and state code for the given index into the user-supplied buffer, delimited by tabs. 


Return Values 

Returns the number of bytes written to the buffer.


Sample Code

Log_Pcmstest("Show State List: ");
int nStates = PCMSStateList(server);
for (int iState = 0; iState < nStates; ++iState)
    {
        PCMSStateListItem(server, iState, buf, BUFLEN);
        Log_Pcmstest("  %d) %s", iState, buf);
    }


Supported Since:PC*MILER|Connect 20

Category: Administration