/* For example: DisplaySELVariableDataFormatTypes(UINT8 Type, UINT8 Option) has a item: "0x07-0x7F,   Unused" Now define Key = 0x7F07, that is to say: High = 0x7F, Low = 0x07. Then all the Key Value between Low and High gets the same string L"Unused". */
UINT8 QueryTable(IN TABLE_ITEM *Table, IN UINTN Number, IN UINT8 Key, IN OUT CHAR16 *Info, IN UINTN InfoLen)
/* For example: DisplaySELVariableDataFormatTypes(UINT8 Type, UINT8 Option) has a item: "0x07-0x7F,   Unused" Now define Key = 0x7F07, that is to say: High = 0x7F, Low = 0x07. Then all the Key Value between Low and High gets the same string L"Unused". */
UINT8 QueryTable(IN TABLE_ITEM *Table, IN UINTN Number, IN UINT8 Key, IN OUT CHAR16 *Info, IN UINTN InfoLen)
{
  UINTN  Index;
  UINT8  High;
  UINT8  Low;
  for (Index = 0; Index < Number; Index++) {
    High = (UINT8)(Table[Index].Key >> 8);
    Low  = (UINT8)(Table[Index].Key & 0x00FF);
    if (  ((High > Low) && (Key >= Low) && (Key <= High))
       || (Table[Index].Key == Key))
    {
      StrnCpyS (Info, InfoLen, Table[Index].Info, InfoLen - 1);
      StrnCatS (Info, InfoLen, L"\n", InfoLen - 1 - StrLen (Info));
      return Key;
    }
  }
  StrCpyS (Info, InfoLen, L"Undefined Value\n");
  return QUERY_TABLE_UNFOUND;
}