Club Builder - Foros de discusión Club Builder
Foro de C++Builder en español
 
 FAQFAQ   BuscarBuscar   MiembrosMiembros   Grupos de UsuariosGrupos de Usuarios   RegistrarseRegistrarse 
 PerfilPerfil   Entra para ver tus mensajes privadosEntra para ver tus mensajes privados   EntrarEntrar 

TIdHTTP para Leo

 
Publicar nuevo tema   Responder al tema    Foros de discusión -> Consultas
Ver tema anterior :: Ver tema siguiente  
Autor Mensaje
Mensaje    Asunto: TIdHTTP para Leo Responder citando

Hola Leo...
Tienes publicado este código:
Código:

//! Añadimos la cabecera: #include<memory>
std::unique_ptr<TFileStream> fs(new TFileStream("d:\\PC51.wmv", fmCreate));
IdHTTP1->Get("http://mschnlnine.vo.llnwd.net/d1/pdc08/WMV-HQ/PC51.wmv", fs.get());
ShowMessage("finalizado");


Lo estoy utilizando así:
Código:

                String VersionDescarga = DirUpdate + L"version_update.dat";
   
            std::unique_ptr<TFileStream> fs1(new TFileStream(VersionDescarga.w_str(), fmCreate));//Se necesita #include<memory>
            PBConexionInternet->MaxValue = fs1->Size;
            IdHTTP1->Get("http://www.tpvbarman.com/nzw/version_update.dat"), fs1.get());

            std::unique_ptr<TFileStream> fs2(new TFileStream(UpdateLocal.w_str(), fmCreate));
            PBConexionInternet->MaxValue = fs2->Size;
            IdHTTP1->Get("http://www.tpvbarman.com/nzw/nzw.dll"), fs2.get());

            std::unique_ptr<TFileStream> fs3(new TFileStream(video_ayudaFile.w_str(), fmCreate));
            PBConexionInternet->MaxValue = fs1->Size;
            IdHTTP1->Get(CrMen("http://www.tpvbarman.com/nzw/ayuda.dat"), fs3.get());

            //Pongo los datos de versión y fichero de actualización disponibles
            TStringList* cLineas = new TStringList();
           
            //En la siguiente linea me da error porque el fichero está siendo utilizado y no sé como liberlo despues de usar: std::unique_ptr<TFileStream> fs1(new TFileStream(VersionDescarga.w_str(), fmCreate));
            cLineas->LoadFromFile(VersionDescarga.w_str());//Cargo el contenido del fichero de versión
            fV->SV->VersionUpdate = cLineas->Strings[0];//Capturo la primera Linea del fichero. Versión de la actualización
            fV->SV->VersionUpdateFichero = cLineas->Strings[1];//Capturo la segunda Linea del fichero. Nombre de la actualización
            try
            {//Protección de codigo por si el fichero no tubiese las 3 lineas
                if(!cLineas->Strings[2].IsEmpty())//Capturo la TERCERA Linea del fichero si EXISTE. SERVIDOR DE HORA EN INTERNET
                    IdSNTP_Date->Host = cLineas->Strings[2];
            }
            catch(...)
                {
                    IdSNTP_Date->Host = L"time.windows";//.com
                }

            delete cLineas;
            FicheroActualizacion = DirUpdate + fV->SV->VersionUpdateFichero.w_str();   


Por otra parte me gustaría utilizar IdHTTP para subir un archivo de texto a la Web, pero no sé cual es el mejor método.

Todo ello es porque en mi rutina realizo un TEST al cliente para ver si su PC es capaz de subir y bajar ficheros a través de FTP y HTML.

De todas, todas, gracias de antemano.
_________________
Muchos hombres no se equivocan jamás porque no se proponen nada razonable.
Volver arriba
Ver perfil de usuario Enviar mensaje privado Enviar email Visitar sitio web del autor
Mensaje    Asunto: Responder citando

si utilizo esto:

Código:

                std::unique_ptr<TFileStream> fs1(new TFileStream(VersionDescarga.w_str(), fmCreate));//Se necesita #include<memory>
                PBConexionInternet->MaxValue = fs1->Size;
                IdHTTP1->Get("http://www.tpvbarman.com/nzw/version_update.dat", fs1.get());
                fs1.get()->Free();


O ESTO...
Código:

                std::unique_ptr<TFileStream> fs1(new TFileStream(VersionDescarga.w_str(), fmCreate));//Se necesita #include<memory>
                PBConexionInternet->MaxValue = fs1->Size;
                IdHTTP1->Get("http://www.tpvbarman.com/nzw/version_update.dat", fs1.get());
                fs1->Free();


En ejecución no pasa nada, pero en Compilación me da error:
Código:

Excepción: EExternalException

Descripción:
External exception C0000008


Y SI NO PONGO la liberación del TFileStream, me da este error:
Código:

Projet TPVBarman raised exception class EFOpenError with message
'Cannot open file "C:\version_update.dat" El proceso no tiene acceso al archivo porque está siendo utilizado por otro proceso'.


_________________
Muchos hombres no se equivocan jamás porque no se proponen nada razonable.
Volver arriba
Ver perfil de usuario Enviar mensaje privado Enviar email Visitar sitio web del autor
Mensaje    Asunto: Responder citando

Hola, la forma correcta de liberarlo al usar unique_ptr es:
Código:
fs1.reset();

Otra opción es simplemente ponerlo entre llaves y se liberara automáticamente al salir de las llaves o si ocurriese una excepción:
Código:
{
  std::unique_ptr<TFileStream> fs1(new TFileStream(VersionDescarga.w_str(), fmCreate));
  IdHTTP1->Get("http://www.tpvbarman.com/nzw/version_update.dat", fs1.get());
}

O bien usarlo dentro de otra función que se encargue de descargar cada archivo para no tener que repetir el código.. al salir de la función se liberará también automáticamente.

O simplemente hacerlo a mano sin unique_ptr (aunque yo prefiero prevenir "fugas" de memoria..), pero eso ya depende de cómo prefiera cada uno trabajar
Código:
TFileStream* fs1(new TFileStream(VersionDescarga.w_str(), fmCreate));
IdHTTP1->Get("http://www.tpvbarman.com/nzw/version_update.dat", fs1);
delete fs1;


Y para subir un archivo con TIdHTTP, tienes por ejemplo el método "Post", pero depende como sea el formulario de la web.. por FTP es bastante más sencillo.
Volver arriba
Ver perfil de usuario Enviar mensaje privado
Mensaje    Asunto: Responder citando

Muchísimas gracias Leo.
Estuve probando varios métodos para cerrar o liberar, pero ninguno me funcionaba.
Antes de poner la pregunta, estuve buscando en google, pero no encontré la respuesta.

En cuanto a lo de subir por FTP, ya lo tengo implementado, pero da la casualidad de que en algunos de los ordenadores de mis clientes el FTP no funciona y aun no se el por qué.

Luego tambien he comprobado que el tiempo que emplea TIdHTTP en descargar un fichero es menor que por FTP, quizás sea por el IdFTP->Connect() consume un tiempo de conexión que el TIdHTTP no hace.

En cualquier caso, el método POST me puede interesar para añadir LINEAS a un fichero de texto que ya está en la Web.

Claro... yo estaba intentando el método IdHTTP1->Put() pero no he sabido implementarlo.

Cualquier comentario al respecto, sería de mucha ayuda.
Y si me dices que en el foro está la respuesta, pues entonces lo buscaré...

MUCHAS GRACIAS.

POSDATA:
fs1.reset(); funcionó perfecto para liberar el fichero.
El modo de cerrar entre {} sin fs1.reset(); También
_________________
Muchos hombres no se equivocan jamás porque no se proponen nada razonable.
Volver arriba
Ver perfil de usuario Enviar mensaje privado Enviar email Visitar sitio web del autor
Mensaje    Asunto: Responder citando

Habría que ver antes el código de la web que va a recibir el archivo para adaptar el código a ese formulario. En este momento estoy un poco liado, sino creaba un formulario en algún servidor y te ponía el ejemplo..

¿Esos clientes a los que no les funciona el FTP serán por casualidad clientes con Fibra Óptica con los dos últimos modelos de routers de Movistar, los llamados HGU que integran la ONT en el mismo aparato?

Lo digo porque hay un firmware que trae bloqueado el puerto 21 que es el que usa el FTP por defecto, es fácil de quitar en la configuración del router, o aún más sencillo, prueba a usar otro puerto distinto en tu servidor de FTP y así no tienes que tocar los routers de los clientes.
Volver arriba
Ver perfil de usuario Enviar mensaje privado
Mensaje    Asunto: Responder citando

Leo gracias por tu pronta respuesta.
Efectivamente a los clientes que les falla el FTP son clientes que no pudiendo tener Internet de pago o por ubicación sin Internet...
Contratan los SERVICIOS de INTERNET sin TELEFONO.
Es decir...
Les ponen un Router y mediante una ANTENA PARABOLICA se conectar a otro ROUTER de dicha compañia que les da un rando de descarga.
Imagino que estará cortado el suministro a traves del puerto 21 pero no en el router del cliente sino en el Router de la EMPRESA.

MUCHISIMAS GRACIAS por tu ayuda.
Un saludo...
_________________
Muchos hombres no se equivocan jamás porque no se proponen nada razonable.
Volver arriba
Ver perfil de usuario Enviar mensaje privado Enviar email Visitar sitio web del autor
Mensaje    Asunto: Responder citando

hola jesus..... mira, te posteo aqui mi codigo referente a eso del FTP para que veas como lo implementé yo en un proyecto, quizas puedas orientarte un poco

este seria el FORM, en el fichero de cabeceras includes sobran,...con el componente NMFTP te sobra para esto que quieres



en el TFTP component tienes que poner la propiedad "Parse_List = true"

un saludo

FICHERO .cpp
Código:
//---------------------------------------------------------------------------

#include <vcl.h>
#pragma hdrstop

#include "Unit_FTP_Server.h"
#include "Unit1.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm3 *Form3;
int X =0;
int Y =0;
extern Form3closed;
//---------------------------------------------------------------------------
__fastcall TForm3::TForm3(TComponent* Owner)
        : TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm3::Button1Click(TObject *Sender)
{
    if (NMFTP1->Connected)
    { NMFTP1->Disconnect(); Button1->Caption = "FTP Off"; }
  else
    {
      NMFTP1->Vendor = NMOS_AUTO;
      NMFTP1->TimeOut = 60000;
      NMFTP1->Host = Edit1->Text;
      NMFTP1->UserID = Edit3->Text;
      NMFTP1->Password = Edit2->Text;
      NMFTP1->Port = Edit4->Text.ToInt();
      NMFTP1->Connect();
      if(NMFTP1->Connected == True)
      { Button1->Caption = "FTP On";
        NMFTP1->List();
        Edit_directorioactual->Text = NMFTP1->CurrentDir;
        Edit_directorioactual->Refresh();
        StringGrid1->Refresh();
       }
    }
}
//---------------------------------------------------------------------------
void __fastcall TForm3::Button10Click(TObject *Sender)
{
 NMFTP1->List();
 Edit_directorioactual->Text = NMFTP1->CurrentDir;
 Edit_directorioactual->Refresh();
 StringGrid1->Refresh();
}
//---------------------------------------------------------------------------
void __fastcall TForm3::Button2Click(TObject *Sender)
{
  AnsiString TheDir;
  if (InputQuery("Cambiar de Directorio", "Cual Directorio?", TheDir))
    NMFTP1->ChangeDir(TheDir);
 Edit_directorioactual->Text = NMFTP1->CurrentDir;
 Edit_directorioactual->Refresh();

}
//---------------------------------------------------------------------------
void __fastcall TForm3::Button3Click(TObject *Sender)
{
   AnsiString TheDir;
  if (InputQuery("Crear Directorio", "Nombre del nuevo Directorio?", TheDir))
    NMFTP1->MakeDirectory(TheDir);
       
}
//---------------------------------------------------------------------------
void __fastcall TForm3::Button4Click(TObject *Sender)
{
   AnsiString TheDir;
  if (InputQuery("Eliminar Directorio", "Nombre del Directorio?", TheDir))
    NMFTP1->RemoveDir(TheDir);
       
}
//---------------------------------------------------------------------------
void __fastcall TForm3::Button5Click(TObject *Sender)
{
  AnsiString TheFile;
  if (InputQuery("Borrar Archivo", "Nombre del archivo?", TheFile))
    NMFTP1->Delete(TheFile);
       
}
//---------------------------------------------------------------------------
void __fastcall TForm3::Button6Click(TObject *Sender)
{
  AnsiString OldFile, NewFile;

  if (InputQuery("Renombrar Archivo", "Archivo a Renombrar?", OldFile))
    if (InputQuery("Renombrar Archivo", "Nuevo nombre de Archivo?", NewFile))
      NMFTP1->Rename(OldFile, NewFile);
       
}
//---------------------------------------------------------------------------
void __fastcall TForm3::Button8Click(TObject *Sender)
{
 AnsiString AnID, APass;
  if (InputQuery("Necesitas Autentificarte", "Introduce el Nombre de Usuario", AnID))
    if (InputQuery("Necesitas Autentificarte", "Introduce la Contraseña", APass))
      {
        NMFTP1->DoCommand("USER "+AnID);
        NMFTP1->DoCommand("PASS "+APass);
      }

}
//---------------------------------------------------------------------------
void __fastcall TForm3::Button9Click(TObject *Sender)
{
  ShowMessage(NMFTP1->CurrentDir);
}
//---------------------------------------------------------------------------
void __fastcall TForm3::NMFTP1AuthenticationFailed(bool &Handled)
{
   AnsiString ThePass, TheID;
  if (MessageDlg("Autentificacion Fallida, Reintentar?", mtConfirmation, TMsgDlgButtons() << mbYes << mbNo, 0) == mrYes)
    {
      ThePass = NMFTP1->Password;
      TheID = NMFTP1->UserID;
      InputQuery("Reauthenticate", "Enter User ID", TheID);
      InputQuery("Reauthenticate", "Enter Password", ThePass);

      NMFTP1->Password = ThePass;
      NMFTP1->UserID = TheID;
      Handled = TRUE;
    }
       
}
//---------------------------------------------------------------------------
void __fastcall TForm3::NMFTP1AuthenticationNeeded(bool &Handled)
{
   AnsiString APass, AnID;
  if (NMFTP1->Password == "")
    if (InputQuery("Es necesaria la Password", "Enter password: ", APass))
      {
        NMFTP1->Password = APass;
        Handled = TRUE;
      }
    else
      Handled = FALSE;
  if (NMFTP1->UserID == "")
    if (InputQuery("User ID needed", "Enter User ID: ", AnID))

      {
        NMFTP1->UserID = AnID;
        Handled = TRUE;
      }
    else
      Handled = FALSE;
       
}
//---------------------------------------------------------------------------
void __fastcall TForm3::NMFTP1Connect(TObject *Sender)
{
   Memo1->Lines->Add("Conectado!");
  Button1->Caption = "Desconectado!";
}
//---------------------------------------------------------------------------
void __fastcall TForm3::NMFTP1Disconnect(TObject *Sender)
{
  Memo1->Lines->Add("Desconectado");
  Button1->Caption = "Conectar";
  Button1->Refresh();

}
//---------------------------------------------------------------------------
void __fastcall TForm3::NMFTP1Failure(bool &Handled, TCmdType Trans_Type)
{
   switch(Trans_Type)
  {
    case cmdChangeDir: Memo1->Lines->Add("ChangeDir failed");
    case cmdMakeDir: Memo1->Lines->Add("MakeDir failed");
    case cmdDelete: Memo1->Lines->Add("Delete failed");
    case cmdRemoveDir: Memo1->Lines->Add("RemoveDir failed");
    case cmdList: Memo1->Lines->Add("List failed");

    case cmdRename: Memo1->Lines->Add("Rename failed");
    case cmdUpRestore: Memo1->Lines->Add("UploadRestore failed");
    case cmdDownRestore: Memo1->Lines->Add("DownloadRestore failed");
    case cmdDownload: Memo1->Lines->Add("Download failed");
    case cmdUpload: Memo1->Lines->Add("Upload failed");
    case cmdAppend: Memo1->Lines->Add("UploadAppend failed");
    case cmdReInit: Memo1->Lines->Add("Reinitialize failed");

    case cmdAllocate: Memo1->Lines->Add("Allocate failed");
    case cmdNList: Memo1->Lines->Add("NList failed");
    case cmdDoCommand: Memo1->Lines->Add("DoCommand failed");
    case cmdCurrentDir: Memo1->Lines->Add("CurrentDir failed");
  }
       
}
//---------------------------------------------------------------------------
void __fastcall TForm3::NMFTP1PacketRecvd(TObject *Sender)
{
   StatusBar1->SimpleText = "Recibidos "+IntToStr(NMFTP1->BytesRecvd)+" bytes de "+IntToStr(NMFTP1->BytesTotal)+" total";
}
//---------------------------------------------------------------------------
void __fastcall TForm3::NMFTP1PacketSent(TObject *Sender)
{
  StatusBar1->SimpleText = "Enviados "+IntToStr(NMFTP1->BytesSent)+" bytes de "+IntToStr(NMFTP1->BytesTotal)+" total";

}
//---------------------------------------------------------------------------
void __fastcall TForm3::NMFTP1TransactionStart(TObject *Sender)
{
 Memo1->Lines->Add("Comenzando Transferencia de Datos");
}
//---------------------------------------------------------------------------
void __fastcall TForm3::NMFTP1TransactionStop(TObject *Sender)
{
 Memo1->Lines->Add("Transferencia de Datos Terminada");
 StatusBar1->SimpleText = "";

}
//---------------------------------------------------------------------------
void __fastcall TForm3::NMFTP1Success(TCmdType Trans_Type)
{
  int I;
  switch(Trans_Type)
  {
    case cmdList:
     {
        for (I = 0; I <= (StringGrid1->ColCount - 1);I++) StringGrid1->Cols[I]->Clear();
        StringGrid1->RowCount = NMFTP1->FTPDirectoryList->name->Count+1;
        StringGrid1->ColCount = 4;
        StringGrid1->Cells[0][0] = "Nombre Archivo";
        StringGrid1->Cells[1][0] = "Tamaño";
        StringGrid1->Cells[2][0] = "Fecha";
        StringGrid1->Cells[3][0] = "Atributos";

        I = 0;
        while(I <= NMFTP1->FTPDirectoryList->name->Count-1)
          {
            StringGrid1->Cells[0][I+1] = NMFTP1->FTPDirectoryList->name->Strings[I];
            StringGrid1->Cells[1][I+1] = NMFTP1->FTPDirectoryList->Size->Strings[I];
            StringGrid1->Cells[2][I+1] = NMFTP1->FTPDirectoryList->ModifDate->Strings[I];
            StringGrid1->Cells[3][I+1] = NMFTP1->FTPDirectoryList->Attribute->Strings[I];
            I++;
          }

      }
      break;
    case cmdChangeDir:
      {
        Memo1->Lines->Add("Cambio de directorio con Éxito");
      }
      break;
    case cmdMakeDir: Memo1->Lines->Add("Creado directorio con Éxito"); break;
    case cmdRemoveDir: Memo1->Lines->Add("Eliminacion de Directorio con Éxito"); break;
    case cmdDelete: Memo1->Lines->Add("Borrado con Éxito"); break;
    case cmdRename: Memo1->Lines->Add("Renombrado con Éxito"); break;
    case cmdReInit: Memo1->Lines->Add("Reinicializacion con Éxito"); break;
    case cmdCurrentDir: Memo1->Lines->Add("Directorio Actual con Éxito"); break;
  }
       
}
//---------------------------------------------------------------------------
void __fastcall TForm3::NMFTP1UnSupportedFunction(TCmdType Trans_Type)
{
   switch(Trans_Type)
    {
      case cmdChangeDir: Memo1->Lines->Add("ChangeDir not supported by this server");
      case cmdMakeDir: Memo1->Lines->Add("MakeDir not supported by this server");
      case cmdDelete: Memo1->Lines->Add("Delete not supported by this server");
      case cmdRemoveDir: Memo1->Lines->Add("RemoveDir not supported by this server");

      case cmdList: Memo1->Lines->Add("List not supported by this server");
      case cmdRename: Memo1->Lines->Add("Rename not supported by this server");
      case cmdUpRestore: Memo1->Lines->Add("UploadRestore not supported by this server");
      case cmdDownRestore: Memo1->Lines->Add("DownloadRestore not supported by this server");
      case cmdDownload: Memo1->Lines->Add("Download not supported by this server");
      case cmdUpload: Memo1->Lines->Add("Upload not supported by this server");

      case cmdAppend: Memo1->Lines->Add("UploadAppend not supported by this server");
      case cmdReInit: Memo1->Lines->Add("Reinitialize not supported by this server");
      case cmdAllocate: Memo1->Lines->Add("Allocate not supported by this server");
      case cmdNList: Memo1->Lines->Add("NList not supported by this server");
      case cmdDoCommand: Memo1->Lines->Add("DoCommand not supported by this server");
      case cmdCurrentDir: Memo1->Lines->Add("CurrentDir not supported by this server");

  }
       
}
//---------------------------------------------------------------------------
void __fastcall TForm3::ListarArchivos1Click(TObject *Sender)
{
  NMFTP1->List();
 StringGrid1->Refresh();     
}
//---------------------------------------------------------------------------

void __fastcall TForm3::Autentificar1Click(TObject *Sender)
{
  AnsiString AnID, APass;
  if (InputQuery("Necesitas Autentificarte", "Introduce el Nombre de Usuario", AnID))
    if (InputQuery("Necesitas Autentificarte", "Introduce la Contraseña", APass))
      {
        NMFTP1->DoCommand("USER "+AnID);
        NMFTP1->DoCommand("PASS "+APass);
      }
     
}
//---------------------------------------------------------------------------

void __fastcall TForm3::MostrarDirectorioActual1Click(TObject *Sender)
{
  ShowMessage(NMFTP1->CurrentDir);       
}
//---------------------------------------------------------------------------

void __fastcall TForm3::Button12Click(TObject *Sender)
{
  NMFTP1->Download(StringGrid1->Cells[0][Y].c_str(), StringGrid1->Cells[0][Y].c_str());
}
//---------------------------------------------------------------------------


void __fastcall TForm3::StringGrid1SelectCell(TObject *Sender, int ACol,
      int ARow, bool &CanSelect)
{
  X = ACol;
  Y = ARow;
}
//---------------------------------------------------------------------------

void __fastcall TForm3::Button11Click(TObject *Sender)
{
 AnsiString Fichero;

 Fichero = ExtractFileName(FileListBox1->FileName);
 NMFTP1->Upload(Fichero, Fichero);
}
//---------------------------------------------------------------------------

void __fastcall TForm3::CambiardeDirectorio1Click(TObject *Sender)
{
  NMFTP1->ChangeDir(StringGrid1->Cells[0][Y].c_str());
  Edit_directorioactual->Text = NMFTP1->CurrentDir;
  Edit_directorioactual->Refresh();
  NMFTP1->List();

}
//---------------------------------------------------------------------------



void __fastcall TForm3::FormClose(TObject *Sender, TCloseAction &Action)
{
 Form1->Form3closed = 2;
}
//---------------------------------------------------------------------------



FICHERO CABECERA .h
Código:
//---------------------------------------------------------------------------

#ifndef Unit_FTP_ServerH
#define Unit_FTP_ServerH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <ComCtrls.hpp>
#include <ExtCtrls.hpp>
#include <Grids.hpp>
#include <NMFtp.hpp>
#include <Psock.hpp>
#include <IdBaseComponent.hpp>
#include <IdComponent.hpp>
#include <IdFTP.hpp>
#include <IdTCPClient.hpp>
#include <IdTCPConnection.hpp>
#include <Menus.hpp>
#include <FileCtrl.hpp>
#include <TabNotBk.hpp>
//---------------------------------------------------------------------------
class TForm3 : public TForm
{
__published:   // IDE-managed Components
        TEdit *Edit1;
        TEdit *Edit2;
        TEdit *Edit3;
        TButton *Button1;
        TButton *Button2;
        TButton *Button3;
        TButton *Button4;
        TButton *Button5;
        TButton *Button6;
        TButton *Button8;
        TButton *Button9;
        TEdit *Edit4;
        TPanel *Panel1;
        TLabel *Label1;
        TLabel *Label2;
        TLabel *Label3;
        TLabel *Label4;
        TProgressBar *ProgressBar1;
        TStringGrid *StringGrid1;
        TButton *Button10;
        TNMFTP *NMFTP1;
        TStatusBar *StatusBar1;
        TPopupMenu *PopupMenu1;
        TMenuItem *ListarArchivos1;
        TMenuItem *Autentificar1;
        TMenuItem *BorrarArchivo1;
        TMenuItem *RenombrarArchivo1;
        TMenuItem *EliminarDirectorio1;
        TMenuItem *CambiardeDirectorio1;
        TMenuItem *CrearDirectorio1;
        TMenuItem *MostrarDirectorioActual1;
        TEdit *Edit_directorioactual;
        TTabbedNotebook *TabbedNotebook1;
        TFileListBox *FileListBox1;
        TDirectoryListBox *DirectoryListBox1;
        TDriveComboBox *DriveComboBox1;
        TPanel *Panel2;
        TButton *Button11;
        TButton *Button12;
        TMemo *Memo1;
        void __fastcall Button1Click(TObject *Sender);
        void __fastcall Button10Click(TObject *Sender);
        void __fastcall Button2Click(TObject *Sender);
        void __fastcall Button3Click(TObject *Sender);
        void __fastcall Button4Click(TObject *Sender);
        void __fastcall Button5Click(TObject *Sender);
        void __fastcall Button6Click(TObject *Sender);
        void __fastcall Button8Click(TObject *Sender);
        void __fastcall Button9Click(TObject *Sender);
        void __fastcall NMFTP1AuthenticationFailed(bool &Handled);
        void __fastcall NMFTP1AuthenticationNeeded(bool &Handled);
        void __fastcall NMFTP1Connect(TObject *Sender);
        void __fastcall NMFTP1Disconnect(TObject *Sender);
        void __fastcall NMFTP1Failure(bool &Handled, TCmdType Trans_Type);
        void __fastcall NMFTP1PacketRecvd(TObject *Sender);
        void __fastcall NMFTP1PacketSent(TObject *Sender);
        void __fastcall NMFTP1TransactionStart(TObject *Sender);
        void __fastcall NMFTP1TransactionStop(TObject *Sender);
        void __fastcall NMFTP1Success(TCmdType Trans_Type);
        void __fastcall NMFTP1UnSupportedFunction(TCmdType Trans_Type);
        void __fastcall ListarArchivos1Click(TObject *Sender);
        void __fastcall Autentificar1Click(TObject *Sender);
        void __fastcall MostrarDirectorioActual1Click(TObject *Sender);
        void __fastcall Button12Click(TObject *Sender);
        void __fastcall StringGrid1SelectCell(TObject *Sender, int ACol,
          int ARow, bool &CanSelect);
        void __fastcall Button11Click(TObject *Sender);
        void __fastcall CambiardeDirectorio1Click(TObject *Sender);
        void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
private:   // User declarations
public:      // User declarations
        __fastcall TForm3(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern PACKAGE TForm3 *Form3;
//---------------------------------------------------------------------------
#endif
Volver arriba
Ver perfil de usuario Enviar mensaje privado
Mensaje    Asunto: Responder citando

alpinedor, gracias por tu ayuda, pero la implementacion de FTP ya la tenia implementada, la pregunta no era como implementarlo, sino como hacer lo mismo mediante HTTP.

Además el componente que dices NMFTP ni lo conozco ni es estándar del Builder o es una versión muy antigua.

Un saludo.
_________________
Muchos hombres no se equivocan jamás porque no se proponen nada razonable.
Volver arriba
Ver perfil de usuario Enviar mensaje privado Enviar email Visitar sitio web del autor
Mostrar mensajes de anteriores:   
Cambiar a:  
No puedes publicar temas nuevos en este foro
No puedes responder a temas en este foro
No puedes editar tus mensajes en este foro
No puedes borrar tus mensajes en este foro
No puedes votar en las encuestas de este foro


Hosting WordPress Indedmedia desde 3,99 €
© 2002–2026 Club Builder · Funciona con phpBB.