Registry ReadString method is not working in Windows 7 in Delphi 7

前端 未结 6 484
感动是毒
感动是毒 2021-01-12 22:03

The following code sample used to return me windows id before, but now it doesn\'t work, and returns empty string, dunno why.

  function GetWindowsID: string         


        
6条回答
  •  不知归路
    2021-01-12 22:54

    I believe it's because

    str := Registry.ReadString('ProductId');
    

    does not raise an exception when there is no ProductId. In my honest opinion, this is a bug in Delphi.

提交回复
热议问题