'--------------------------------------------------------------------------- ' ' GetAcceptTypes() - Create the array of accept type structs ' ' Enumerate the keys in the [Accept] section of the profile file, ' then get the value for each of the keys. '--------------------------------------------------------------------------- Private Sub GetAcceptTypes() Dim sList As String Dim i As Integer, j As Integer, l As Integer, n As Integer sList = GetProfile("Accept", "") ' Get key list l = Len(sList) ' Length incl. trailing null i = 1 ' Start at 1st character n = 0 ' Index in array Do While ((i < l) And (n < MAX_ACCTYPE)) ' Safety stop here j = InStr(i, sList, Chr$(0)) ' J -> next null CGI_AcceptTypes(n).key = Mid$(sList, i, j - i) ' Get Key, then value CGI_AcceptTypes(n).value = GetProfile("Accept", CGI_AcceptTypes(n).key) i = j + 1 ' Bump pointer n = n + 1 ' Bump array index Loop CGI_NumAcceptTypes = n ' Fill in global count End Sub