Ver Mensaje Individual
  #9  
Antiguo 31-05-2007
Avatar de cHackAll
[cHackAll] cHackAll is offline
Baneado?
 
Registrado: oct 2006
Posts: 2.159
Reputación: 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