AnObj: IUnknown;
ShellLink: IShellLink;
AFile: IPersistFile;
FileName: WideString;
begin
if UpperCase(ExtractFileExt(LinkPath)) 〈〉 ′.LNK′ then //检查扩展名是否正确
begin
raise Exception.Create(′快捷方式的扩展名必须是 ′′LNK′′!′);/
/若不是则产生异常
end;
try
文章来源于领测软件测试网 https://www.ltesting.net/