I found Linux command "hdparm" at
http://www.webmasterworld.com/forum40/957.htm. This command provides a
part of information I need, as follows. Is it possible to retrieve this
information from inside a Lazarus app but without root previledges?
================
#> hdparm -i /dev/hda
/dev/hda:
Model=Maxtor 52049H3, FwRev=JAC61HU0, SerialNo=F3H238ZC
Config={ Fixed }
RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=57
BuffType=DualPortCache, BuffSize=2048kB, MaxMultSect=16, MultSect=8
CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=39102336
IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
PIO modes: pio0 pio1 pio2 pio3 pio4
DMA modes: mdma0 mdma1 *mdma2
UDMA modes: udma0 udma1 udma2 udma3 udma4 udma5
AdvancedPM=yes: disabled (255) WriteCache=enabled
Drive conforms to: ATA/ATAPI-6 T13 1410D revision 0: 1 2 3 4 5 6
================
Panagiotis
Στις 05-03-2006, ημέρα Κυρ, και ώρα 14:18 -0300, ο/η Felipe Monteiro de
Carvalho έγραψε:
> I get Windows version like this:
>
> type
> TVersaoDoWindows =
> (
> vwDesconhecida,
> // Informações simplificadas
> Serie9x, // 32s em 3.11, 95, 98 e Me
> SerieNT, // NT 3.51, NT, 2000 e XP
> // Informações completas
> vwWin32sEm311,
> vwWinNT351,
> vwWin95,
> vwWinNT,
> vwWin98,
> vwWinMe,
> vwWin2000,
> vwWinXP,
> vwWin2003,
> vwWinVista, // Ou superior
> vwWinLongHorn // Ou superior
> );
>
> {*******************************************************************
> * TGlass.VersaoDoWindows ()
> *
> * DESCRIPTION: Returns the Windows Version
> *
> * PARAMETERS:
> *
> * RETURNS:
> *
> *******************************************************************}
> function TGlass.VersaoDoWindows(ApenasSerie: Boolean): TVersaoDoWindows;
> {$IFDEF Win32}
> var
> Versao: TOSVersionInfo;
> {$ENDIF}
> begin
> Result := vwDesconhecida;
>
> {$IFDEF Win32}
> {----------------------------------------------
> Inicializações
> ----------------------------------------------}
> Versao.dwOSVersionInfoSize := SizeOf(TOSVersionInfo);
> if not GetVersionEx(Versao) then Exit;
>
> {----------------------------------------------
> Verifica qual o sistema operacional
> ----------------------------------------------
> Serie 9x
> ----------------------------------------------}
> if Versao.dwPlatformId = VER_PLATFORM_WIN32_WINDOWS then
> begin
> if ApenasSerie then Result := Serie9x
> else
> begin
> if (Win32MajorVersion = 4) and
> (Win32MinorVersion = 90) then
> Result := vwWinMe
> else if (Win32MajorVersion = 4) and
> (Win32MinorVersion = 10) then
> Result := vwWin98
> else Result := vwWin95;
> end;
> end
> {----------------------------------------------
> Série NT
> ----------------------------------------------}
> else if Versao.dwPlatformId = VER_PLATFORM_WIN32_NT then
> begin
> if ApenasSerie then Result := SerieNT
> else
> begin
> if (Win32MajorVersion = 3) and
> (Win32MinorVersion = 10) then
> Result := vwWinNT351
> else if (Win32MajorVersion = 4) then
> Result := vwWinNT
> else if (Win32MajorVersion = 5) and (Win32MinorVersion = 0) then
> Result := vwWin2000
> else if (Win32MajorVersion = 5) and (Win32MinorVersion = 1) then
> Result := vwWinXP
> else if (Win32MajorVersion = 5) and (Win32MinorVersion = 2) then
> Result := vwWin2003
> else if (Win32MajorVersion >= 6) then
> Result := vwWinVista;
> end;
> end
> {----------------------------------------------
> Série 32s operando no 3.11
> (OBS: Se pediu apenas série responde 9x, pois não é da NT,
> mas, na verdade, representa uma série aparte).
> ----------------------------------------------}
> else
> begin
> if ApenasSerie then Result := Serie9x
> else Result := vwWin32sEm311;
> end;
> {$ENDIF}
> end;
>
> --
> Felipe Monteiro de Carvalho
>
> _________________________________________________________________
> To unsubscribe: mail [EMAIL PROTECTED] with
> "unsubscribe" as the Subject
> archives at http://www.lazarus.freepascal.org/mailarchives
>
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives