I am making a simple Application to collect and represent data over bluetooth serial COM port and I don't want to hard-code the COM ports. So I want to enumerate the COM ports by looking up `HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM`. However I'm fairly new to both wxWidgets and win32 registry terminology(I still don't understand what's supposed to be the "name" and "value" in wxWidgets documentation, they don't work as expected). What I want is to iterate through all the COMM ports and add them to a drop down list. This doesn't work:

```
wxRegKey regKey(wxRegKey::HKLM,"HARDWARE\\DEVICEMAP\\SERIALCOMM");
size_t subkeys;
long k = 1;
regKey.Open(wxRegKey::Read);
regKey.GetKeyInfo(&subkeys, NULL, NULL, NULL);
wxString key_name;
regKey.GetFirstValue(key_name, k);
m_drop_down->Append(key_name);
for (int i = 0; i < subkeys; i++) {
    regKey.GetNextValue(key_name, k);
    m_drop_down->Append(key_name);
}
regKey.Close();

```

It only appends one `\Device\BthModem2` to the dropdown list. I would be grateful if someone cleared the terminologies up and tell me how I should go about making it work. For reference, here's what that registry entry looks to me, I want `COM3`, `COM4`, `COM5`, `COM6` appended to the drop down list:
[![enter image description here](https://i.stack.imgur.com/Da09T.png)](https://i.stack.imgur.com/Da09T.png)