Forum > Arabic
رقم تسلسلي للقرص الصلب
KodeZwerg:
You need to execute it on the commandline, it is how the original class was designed.
Attached updated version that not raise exceptions.
Added 2 new fields to properly play with this class and easy iterate over, depends what you want choose AvailableDrives or AvailableLetters, or both as in demo.
--- Code: Pascal [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---var HDD: THDDInfo; i: Integer;begin HDD := THDDInfo.Create; try // display logical drive information for i := Low(HDD.AvailableDrives) to High(HDD.AvailableDrives) do HDDInfos(HDD, HDD.AvailableDrives[i]); // display partition serial number for i := Low(HDD.AvailableLetters) to High(HDD.AvailableLetters) do begin HDD.DriveLetter := HDD.AvailableLetters[i]; if HDD.IsInfoAvailable then WriteLn('Serial for Letter ', HDD.AvailableLetters[i], ': ', HDD.SerialLetter) else WriteLn('Drive ', HDD.AvailableLetters[i], ' has no Serial number'); end; finally HDD.Free; end; ReadLn;end.
Al-Eid:
--- Quote from: KodeZwerg on August 24, 2023, 04:46:17 pm ---You need to execute it on the commandline, it is how the original class was designed.
Attached updated version that not raise exceptions.
Added 2 new fields to properly play with this class and easy iterate over, depends what you want choose AvailableDrives or AvailableLetters, or both as in demo.
--- Code: Pascal [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---var HDD: THDDInfo; i: Integer;begin HDD := THDDInfo.Create; try // display logical drive information for i := Low(HDD.AvailableDrives) to High(HDD.AvailableDrives) do HDDInfos(HDD, HDD.AvailableDrives[i]); // display partition serial number for i := Low(HDD.AvailableLetters) to High(HDD.AvailableLetters) do begin HDD.DriveLetter := HDD.AvailableLetters[i]; if HDD.IsInfoAvailable then WriteLn('Serial for Letter ', HDD.AvailableLetters[i], ': ', HDD.SerialLetter) else WriteLn('Drive ', HDD.AvailableLetters[i], ' has no Serial number'); end; finally HDD.Free; end; ReadLn;end.
--- End quote ---
ممتاز
شكرا وألف شكرا
Thanks and a thousand thanks
Thank you very much
Navigation
[0] Message Index
[*] Previous page