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
  #9  
Antiguo 31-05-2007
Avatar de cHackAll
[cHackAll] cHackAll is offline
Baneado?
 
Registrado: oct 2006
Posts: 2.159
Poder: 22
cHackAll Va por buen camino
Cool Entonces...

Bueno en ESE caso te dejo mi misma funcion un poco modificada:

Código Delphi [-]
function GetCardinal(var Buffer): Cardinal;
asm
 mov eax, [eax]
end;
 
const CrLf: Word = $0A0D;
var hFile, Index, Size, Count, Dummy: Cardinal; lpBuffer: PChar;
begin
 hFile := CreateFile('c:\250.b00', GENERIC_READ, 0, nil, OPEN_EXISTING, 0, 0);
 lpBuffer := MapViewOfFile(CreateFileMapping(hFile, nil, PAGE_READONLY, 0, 0, nil), FILE_MAP_READ, 0, 0, 0);
 Size := GetFileSize(hFile, nil);
 CloseHandle(hFile);
 hFile := CreateFile('c:\FileNames.txt', GENERIC_WRITE, 0, nil, CREATE_ALWAYS, 0, 0);
 Index := 0;
 while Index < Size do
  begin
   if GetCardinal(lpBuffer[Index]) = $67706A2E then // '.jpg'
    begin
     Count := 0;
     while lpBuffer[Index - Count - 1] in ['a'..'z', 'A'..'Z', '0'..'9'] do Inc(Count);
     WriteFile(hFile, lpBuffer[Index - Count], Count + 4, Dummy, nil);
     WriteFile(hFile, CrLf, 2, Dummy, nil);
     Inc(Index, 4);
    end
   else
    Inc(Index);
  end;
 CloseHandle(hFile);
end;

Si no te saca todos los nombres es porque hay algunos Unicode, en ese caso nos comentas!

Suerte & 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

Temas Similares
Tema Autor Foro Respuestas Último mensaje
Pasar ficheros de Theos a otro Formato Triton Varios 4 30-10-2007 23:03:33
ficheros binarios e imagenes sapi Varios 2 03-10-2006 16:50:34
Correo Web y Ficheros de Texto. marcoszorrilla Varios 29 06-09-2006 22:51:55
Leer enteros de 32-bits en ficheros binarios elcaracas C++ Builder 2 08-04-2005 21:46:54
Ficheros binarios deimonio Varios 2 29-12-2003 13:38:47


La franja horaria es GMT +2. Ahora son las 18:13:15.


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