Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > API de Windows
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

 
 
Herramientas Buscar en Tema Desplegado
  #12  
Antiguo 14-01-2007
Avatar de seoane
[seoane] seoane is offline
Miembro Premium
 
Registrado: feb 2004
Ubicación: A Coruña, España
Posts: 3.717
Poder: 26
seoane Va por buen camino
Bueno, puede que esto te sirva de ayuda:

Coloca un TMemo en el form
Código Delphi [-]
uses SetupApi;

procedure TForm4.FormCreate(Sender: TObject);
var
  DevInfo: HDEVINFO;
  DevInfoData: SP_DEVINFO_DATA;
  i: integer;
  Data: Pointer;
  Size: DWORD;
begin
  DevInfo:= SetupDiGetClassDevs(nil,nil,0,DIGCF_ALLCLASSES or DIGCF_PROFILE);
  if DevInfo <> HDEVINFO(INVALID_HANDLE_VALUE) then
  begin
    FillChar(DevInfoData,Sizeof(DevInfoData),0);
    DevInfoData.cbSize:= Sizeof(DevInfoData);
    for i:= 0 to MAXINT do
    begin
      if not SetupDiEnumDeviceInfo(DevInfo,i,DevInfoData) then
        break;
      SetupDiGetDeviceRegistryProperty(DevInfo,DevInfoData,SPDRP_DEVICEDESC,
        nil,nil,0,@Size);
      if GetLastError = ERROR_INSUFFICIENT_BUFFER then
      begin
        GetMem(Data,Size);
        try
          if SetupDiGetDeviceRegistryProperty(DevInfo,DevInfoData,
            SPDRP_DEVICEDESC,nil,Data,Size,@Size) then
          begin
            // Recuerda colcoar el memo
            Memo1.Lines.Add(String(PChar(Data)));
          end;
        finally
          FreeMem(Data);
        end;
      end;
    end;
    SetupDiDestroyDeviceInfoList(DevInfo);
  end;
end;

Espero que este código en Delphi te aclare algo las cosas
Responder Con Cita
 



Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
Utilizar Mem[] jsamuelsv Varios 0 14-10-2006 17:58:13
¿Existe algún problema si quiero utilizar 2 TQuery para la misma base de datos ? nuri SQL 4 28-07-2005 09:40:54
Utilizar La Web Cam jostrix Varios 5 29-05-2005 15:03:13
Utilizar Substring idatejo SQL 1 27-12-2004 17:50:06
Problema al utilizar dos bases de datos MySQL encontradas en diferentes Serveres FernandoFAI MySQL 3 16-04-2004 12:00:49


La franja horaria es GMT +2. Ahora son las 20:37:53.


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