title: Why doesn't my Delphi function get my comm ports from the registry?
body: <p>My code:</p>
  
  <pre><code>procedure EnumCommPorts(aStrings: TStrings);
  var
    Registry: TRegistry;
  begin
    Registry := TRegistry.Create;
    try
      Registry.RootKey := HKEY_LOCAL_MACHINE;
      Registry.OpenKey('hardware\devicemap\serialcomm', False);
      Registry.GetKeyNames(aStrings);
    finally
      Registry.Free;
    end;
  end;
  
  procedure TForm1.Button1Click(Sender: TObject);
  begin
    EnumCommPorts(Memo1.Lines);
  end;
  </code></pre>
  
  <p>The screenshot below shows that there are 2 comm ports defined:</p>
  
  <p><img src="https://i.stack.imgur.com/juXgD.png" alt="enter image description here"></p>
  
  <p>However, when I click the button Memo1 remains empty. How do I fix this?</p>