|
@@ -61,15 +61,15 @@ begin
|
|
fd:=FileOpen(KernelUUID,fmOpenRead);
|
|
fd:=FileOpen(KernelUUID,fmOpenRead);
|
|
Result:=(Fd>=0);
|
|
Result:=(Fd>=0);
|
|
if Result then
|
|
if Result then
|
|
- begin
|
|
|
|
|
|
+ try
|
|
SetLength(S,UUIDLen);
|
|
SetLength(S,UUIDLen);
|
|
SetLength(S,FileRead(fd,S[1],UUIDLen));
|
|
SetLength(S,FileRead(fd,S[1],UUIDLen));
|
|
Result:=(Length(S)=UUIDLen);
|
|
Result:=(Length(S)=UUIDLen);
|
|
If Result then
|
|
If Result then
|
|
- begin
|
|
|
|
GUID:=StringToGUID('{'+S+'}');
|
|
GUID:=StringToGUID('{'+S+'}');
|
|
- //Writeln('Kernel ID = ',GuidToString(GUID));
|
|
|
|
- end;
|
|
|
|
|
|
+ finally
|
|
|
|
+ FileClose(FD);
|
|
|
|
+ end;
|
|
end;
|
|
end;
|
|
end;
|
|
end;
|
|
|
|
|