Ver Mensaje Individual
  #3  
Antiguo 08-08-2008
Avatar de Neftali [Germán.Estévez]
Neftali [Germán.Estévez] Neftali [Germán.Estévez] is online now
[becario]
 
Registrado: jul 2004
Ubicación: Barcelona - España
Posts: 19.437
Reputación: 10
Neftali [Germán.Estévez] Es un diamante en brutoNeftali [Germán.Estévez] Es un diamante en brutoNeftali [Germán.Estévez] Es un diamante en bruto
El código de Ares debería funcionar si lo bajas del lugar correcto. Es más, el programa está funcionando correctamente. Hay que leerse la documentación y tener muy presente las directivas de tipo DEFINE.

En cuanto a la pregunta, échale un vistazo a procedimientos del tipo: Seek, Read,... y demás procedimientos de acceso a ficheros. Puedes probar algo así:

Código Delphi [-]
procedure TForm1.Button1Click(Sender: TObject);
var
  f: file of Byte;
  size: Longint;
  S:String;
  ch:Char;
  b:Byte;
  i:Integer;
begin
  if OpenDialog1.Execute then begin
    AssignFile(f, OpenDialog1.FileName);
    Reset(f);
    try
      size := FileSize(f);
      S := 'Tamaño del fichero: ' + IntToStr(size);
      MessageDlg(S, mtInformation, [mbOK], 0);

      memo1.Lines.Add('--------------------------');
      // Leer 100
      for i := 0 to 100 do begin
        Read(f, b);
        memo1.Lines.Text := memo1.Lines.Text + IntToStr(b) + ' ';

        // Guardarlo en otro
        //...
      end;

      Seek(f, size div 2);
      S := 'Position actual: ' + IntToStr(FilePos(f));
      MessageDlg(S, mtInformation, [mbOK], 0);
      
      memo1.Lines.Add('--------------------------');

      // Leer otros 100
      for i := 0 to 100 do begin
        Read(f, b);
        memo1.Lines.Text := memo1.Lines.Text + IntToStr(b) + ' ';

        // Guardarlo en otro
        //...
      end;

    finally
      CloseFile(f);
    end;
  end;
end;

Para enviarlos sí que puedes utilizar Streams; Hace no muchos días estuvimos hablando de cómo enviar cosas a travñés de Indy, e incluso Seoane colocó código para hacerlo (no más de 2 o 3 semanas -el hilo hablaba de enciar imágenes-).

Junto con el trozo que envías deberías enviar información que te permita identificar o ubicar posteriormente ese trozo. Ya sea posicion de inicio y tamaño, algun identificador del número de la parte, tamaño y número de parte,... (hay muchas posibiliodades).
__________________
Germán Estévez => Web/Blog
Guía de estilo, Guía alternativa
Utiliza TAG's en tus mensajes.
Contactar con el Clubdelphi

P.D: Más tiempo dedicado a la pregunta=Mejores respuestas.
Responder Con Cita