Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Varios
Registrarse FAQ Miembros Calendario Guía de estilo Buscar Temas de Hoy Marcar Foros Como Leídos

Coloboración Paypal con ClubDelphi

 
 
Herramientas Buscar en Tema Desplegado
  #4  
Antiguo 23-05-2005
[maeyanes] maeyanes is offline
Capo de los Capos
 
Registrado: may 2003
Ubicación: Campeche, México
Posts: 2.732
Poder: 26
maeyanes Va por buen camino
Es solo hacerle algunas modificaciones al código para adaptarlo a lo que necesitas, por ejemplo:

Código Delphi [-]
procedure TNetDrive.GetDriversList(StrList: TStringList);
var
  DriveNum: Integer;
  DriveChar: Char;
  DriveType: TDriveType;
  DriveBits: set of 0..25;

  procedure AddDrive(const VolName: string);
  begin
    StrList.Add(Format('%s: %s', [DriveChar, VolName]))
  end;

begin
  StrList.Clear;
  Integer(DriveBits) := GetLogicalDrives;
  for DriveNum := 0 to 25 do
  begin
    if not (DriveNum in DriveBits) then
      Continue;
    DriveChar := Char(DriveNum + Ord('a'));
    DriveType := TDriveType(GetDriveType(PChar(DriveChar + ':\')));
    if TextCase = tcUpperCase then
      DriveChar := Upcase(DriveChar);
    case DriveType of
      dtFloppy:
        StrList.Add(DriveChar + ':');
      dtFixed:
        AddDrive(VolumeID(DriveChar));
      dtNetwork:
        AddDrive(NetworkVolume(DriveChar));
      dtCDROM:
        AddDrive(VolumeID(DriveChar));
      dtRAM:
        AddDrive(VolumeID(DriveChar))
    end
  end
end;

Así solo le pasas el StringList que quieres llenar con los drivers...


Saludos...
Responder Con Cita
 


Herramientas Buscar en Tema
Buscar en Tema:

Búsqueda Avanzada
Desplegado

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


La franja horaria es GMT +2. Ahora son las 09:32:35.


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