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
  #1  
Antiguo 07-03-2009
Avatar de kurono
[kurono] kurono is offline
Miembro Premium
 
Registrado: jul 2007
Ubicación: Republica Dominicana
Posts: 1.144
Poder: 20
kurono Va por buen camino
ayuda en hilo

hola amigos tengo un problema con un hilo de ejecucion pues e puesto un codigo ahi y me da un error diciendome que el hilo no es compatible con la clase Tcomponent bueno le muestro el codigo lo q esta en rojo es donde me presenta el error

Código Delphi [-]
unit MyHilo;

interface

uses
  Forms, Controls, StdCtrls, Windows,Classes, Dialogs, SysUtils,
  DCPcrypt2, DCPblockciphers, DCPblowfish, DCPsha512, DCPcast128,
  DCPcast256, DCPidea, DCPice, DCPdes, DCPrc6, DCPrc5, DCPrc4, DCPrc2,
  DCPmisty1, DCPmars, DCPtwofish, DCPtea, DCPserpent, DCPrijndael, DCPtiger,
  DCPsha256, DCPsha1, DCPripemd160, DCPripemd128, DCPmd5, DCPmd4, DCPhaval,
  Buttons, Gauges, ComCtrls, ExtCtrls;

type
  TMyhilo = class(TThread)
  private
    { Private declarations }
  protected
    procedure Execute;override;
    procedure update_frmprincipal;
  end;

implementation
uses
  UfrmPrincipal;
procedure TMyhilo.Execute;
  var
   cifrar:Boolean;
  cifrador: TDCP_cipher;
  fsOrigen, fsDestino: TStream;
begin
  Synchronize(update_frmprincipal);
  fsOrigen := TFileStream.Create(frmPrincipal.edOrigen.Text,fmOpenRead);
  fsDestino := TFileStream.Create(frmPrincipal.edDestino.Text, fmCreate);
  cifrador:= TDCP_cipher.Create(self);
  try
    case cbAlgoritmo.ItemIndex of
       0: cifrador := TDCP_blowfish.Create(Self);
       1: cifrador := TDCP_cast128.Create(Self);
       2: cifrador := TDCP_cast256.Create(Self);
       3: cifrador := TDCP_des.Create(Self);
       4: cifrador := TDCP_3des.Create(Self);
       5: cifrador := TDCP_thinice.Create(Self);
       6: cifrador := TDCP_ice2.Create(Self);
       7: cifrador := TDCP_idea.Create(Self);
       8: cifrador := TDCP_mars.Create(Self);
       9: cifrador := TDCP_misty1.Create(Self);
      10: cifrador := TDCP_rc2.Create(Self);
      11: cifrador := TDCP_rc4.Create(Self);
      12: cifrador := TDCP_rc5.Create(Self);
      13: cifrador := TDCP_rc6.Create(Self);
      14: cifrador := TDCP_rijndael.Create(Self);
      15: cifrador := TDCP_serpent.Create(Self);
      16: cifrador := TDCP_serpent.Create(Self);
      17: cifrador := TDCP_twofish.Create(Self);
    end;
    case cbHash.ItemIndex of
      0: cifrador.InitStr(edContrasena.Text, TDCP_haval);
      1: cifrador.InitStr(edContrasena.Text, TDCP_md4);
      2: cifrador.InitStr(edContrasena.Text, TDCP_md5);
      3: cifrador.InitStr(edContrasena.Text, TDCP_ripemd128);
      4: cifrador.InitStr(edContrasena.Text, TDCP_ripemd160);
      5: cifrador.InitStr(edContrasena.Text, TDCP_sha1);
      6: cifrador.InitStr(edContrasena.Text, TDCP_sha256);
      7: cifrador.InitStr(edContrasena.Text, TDCP_sha384);
      8: cifrador.InitStr(edContrasena.Text, TDCP_sha512);
      9: cifrador.InitStr(edContrasena.Text, TDCP_tiger);
    end;
    if cifrar then
    cifrador.EncryptStream(fsOrigen, fsDestino, fsOrigen.Size)
    else
    cifrador.DecryptStream(fsOrigen, fsDestino, fsOrigen.Size);
    cifrador.Burn;
  finally
    cifrador.Free;
    fsOrigen.Free;
    fsDestino.Free;
      end;
  end;
procedure myhilo.update_frmprincipal;
  begin
    frmPrincipal.Caption:='Encriptador 1.1';
    end;
end.
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
detener un hilo gesjug Varios 4 08-10-2008 08:09:24
cuando llamo ejecutar un hilo dentro del proceso del hilo no lo hace robertosc Varios 1 14-08-2007 22:11:09
Excepcion arrojada por un hilo...ayuda aleph C++ Builder 0 10-09-2006 21:49:04


La franja horaria es GMT +2. Ahora son las 23:35:51.


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