Foros Club Delphi

Foros Club Delphi (https://www.clubdelphi.com/foros/index.php)
-   API de Windows (https://www.clubdelphi.com/foros/forumdisplay.php?f=7)
-   -   Inventario de Hardware (https://www.clubdelphi.com/foros/showthread.php?t=17285)

vichovi 03-01-2005 11:59:31

Inventario de Hardware
 
Hola a tod@s:

Necesito hacer hacer un inventario del hardware instalado en un equipo, para Windows 9x encontre lo siguiente en TMania:

Código:

procedure TForm1.Button1Click(Sender: TObject);
 
  procedure GetHardwareList(DisplayStrings : TStrings);
  var
    RegHKDD, RegHKLM: TRegistry;
    SLKeys, SLHWL: TStringList;
    i: Integer;
    RegDataInfo : TRegDataInfo;
  begin
    try
      RegHKDD := TRegistry.Create;
      RegHKDD.RootKey := HKEY_DYN_DATA;
      RegHKLM := TRegistry.Create;
      RegHKLM.RootKey := HKEY_LOCAL_MACHINE;
      SLKeys := TStringList.Create;
      SLHWL := TStringList.Create;
      SLHWL.Sorted := true;
      if RegHKDD.OpenKey('\Config Manager\Enum', false) then begin
        RegHKDD.GetKeyNames(SLKeys);
        for i := 0 to SLKeys.Count - 1 do
          if RegHKDD.OpenKey('\Config Manager\Enum\' + SLKeys[i], false)then
            if RegHKLM.OpenKey('\Enum\' + RegHKDD.ReadString('HardWareKey'), false) then
              if RegHKLM.GetDataInfo('Class', RegDataInfo) then
                SLHWL.Add(RegHKLM.ReadString('Class')
                              + ': '
                              + RegHKLM.ReadString('DeviceDesc'));
      end; {if RegHKDD.OpenKey('\Config Manager\Enum', false)}
    finally
      SLKeys.Free;
      RegHKLM.Free;
      RegHKDD.Free;
    end;
    DisplayStrings.Assign(SLHWL);
    SLHWL.Free;
  end;
 
begin
  GetHardwareList(Memo1.Lines);
end;

Este codigo accede a la Key HKEY_DYN_DATA, la cual no existe en Windows con tecnologia NT.

Agradeceria una ayudita.

Gracias.

Neftali [Germán.Estévez] 03-01-2005 12:33:53

Revisa ésta página:
http://www.torry.net/pages.php?id=240

Ahí puedes encontrar bastantes componentes que te facilitan el trabajo de obtener información acerca del Sistema.

vichovi 03-01-2005 12:52:30

La informacion que me gustaria obtener (mas o menos) es la que se muestra en la pestaña Hardware de las propiedades del sistema.

En la direccion que me comentas (ya habia echado un vistazo en Torry.net) no veo nada que haga lo que te comento.

Aun asi muchas gracia por tu respuesta.

Neftali [Germán.Estévez] 03-01-2005 15:35:10

Revisa bien.
Éste componente (por ejemplo) hace lo que necesitas y mucho, mucho más...

MiTeC System Information Component v.8.7.3


La franja horaria es GMT +2. Ahora son las 01:06:35.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi