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

Respuesta
 
Herramientas Buscar en Tema Desplegado
  #1  
Antiguo 27-05-2005
Avatar de Lepe
[Lepe] Lepe is offline
Miembro Premium
 
Registrado: may 2003
Posts: 7.424
Poder: 31
Lepe Va por buen camino
Para el escritorio....
Cita:
WINSHELLAPI HRESULT WINAPI SHGetSpecialFolderLocation(;

HWND hwndOwner,
int nFolder,
LPITEMIDLIST *ppidl
);


Parameters

hwndOwner

Handle of the owner window that the client should specify if it displays a dialog box or message box.

nFolder

Value specifying the folder to retrieve the location of. This parameter can be one of the following values:

CSIDL_DESKTOPDIRECTORY File system directory used to physically store file objects on the desktop (not to be confused with the desktop folder itself).
Para el tema del cdrom
Código Delphi [-]
var
  Buffer : array[0..500] of char;
  TmpPC  : PChar;

begin
  GetLogicalDriveStrings(SizeOf(Buffer),Buffer);
  TmpPC := Buffer;
   while TmpPC[0] <> #0 do begin
    if GetDriveType(TmpPC) = Drive_CDROM then showMessage( tmpc + ' es una unidad de CD uuuuuaaaaauuu');
    TmpPC := StrEnd(TmpPC)+1;
   end;
 end;

Un saludo
__________________
Si usted entendió mi comentario, contácteme y gustosamente,
se lo volveré a explicar hasta que no lo entienda, Gracias.
Responder Con Cita
  #2  
Antiguo 27-05-2005
novaten novaten is offline
Miembro
 
Registrado: abr 2005
Posts: 13
Poder: 0
novaten Va por buen camino
ok, muchas gracias
Responder Con Cita
  #3  
Antiguo 11-01-2011
peli peli is offline
Registrado
NULL
 
Registrado: ene 2011
Posts: 2
Poder: 0
peli Va por buen camino
hola el ejemplo me ha servido pero necesito completar algo: necesito saber como puedo copiar el contenido de una carpeta o directorio que tengo en el cd, o sea, o especificamente todo el contenido, sino una carpeta.

por ejemplo he usado este codigo para copiar desde la unidad de cd al disco c:

GetLogicalDriveStrings(SizeOf(Buffer),Buffer);
TmpPC := Buffer;
while TmpPC[0] <> #0 do begin
if GetDriveType(TmpPC) = Drive_CDROM then
WinExec ('xcopy TmpPC carpeta c:\carpeta /s',sw_Hide);
TargetName := 'c:\GESTIONMEDICA\GestionMedica.exe';
TmpPC := StrEnd(TmpPC)+1;
end;

IObject := CreateComObject(CLSID_ShellLink) ;
ISLink := IObject as IShellLink;
IPFile := IObject as IPersistFile;

with ISLink do
begin
SetPath(pChar(TargetName)) ;
SetWorkingDirectory(pChar(ExtractFilePath(TargetName))) ;
end;

SHGetSpecialFolderLocation(0, CSIDL_DESKTOPDIRECTORY, PIDL) ;
SHGetPathFromIDList(PIDL, InFolder) ;
LinkName := InFolder + '\Gestion Medica.lnk';
IPFile.Save(PWChar(LinkName), false) ;

En la linea:

WinExec ('xcopy TmpPC carpeta c:\carpeta /s',sw_Hide);

no se como como especificar el nombre de la campeta que quiero que se compie desde el cd....

por favor ayuda..... y gracias.
Responder Con Cita
Respuesta


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:45:10.


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