function GetComPortList: TStrings;
var
Reg: TRegistry;
sts1,sts2: TStrings;
i: Integer;
RegPath: string; //×¢²á±íÖдæ·Å´®¿Ú·¾¶
begin
Result := nil;
Reg := TRegistry.Create;
try
sts1 := TStringList.Create;
try
sts2 := TStringList.Create;
Reg.RootKey := HKEY_LOCAL_MACHINE;
RegPath := 'hardware/devicemap/SerialComm';
if Reg.OpenKey(RegPath, False) then
begin
Reg.GetValueNames(sts1);
for i := 0 to sts1.Count-1 do
sts2.Add(Reg.ReadString(sts1.Strings[i]));
end;
Result := sts2;
sts2 := nil;
finally
FreeAndNil(sts1);
end;
finally
Reg.CloseKey;
FreeAndNil(Reg);
end;
end;
得到串口
最新推荐文章于 2022-10-20 11:04:05 发布
部署运行你感兴趣的模型镜像
您可能感兴趣的与本文相关的镜像
Linly-Talker
AI应用
Linly-Talker是一款创新的数字人对话系统,它融合了最新的人工智能技术,包括大型语言模型(LLM)、自动语音识别(ASR)、文本到语音转换(TTS)和语音克隆技术
1428

被折叠的 条评论
为什么被折叠?



