cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Generally questions about curl

From: Ryan <meokid2_at_yahoo.com>
Date: Sat, 13 Jul 2013 19:44:32 +0800

On Jul 13, 2013, at 7:16 PM, "gfa_at_trainzland.com" <gfa_at_trainzland.com> wrote:

> Hi everyone,
>
> I read about the curl lib and that exactly what I require. But I'm confused about the different ways the samples are realized.
>
> 1) Some examples talking about "creating a text file" a commit to an exe. (Sending/receive a file to a ftp server)
> 2) Other examples using direct code to send (Send a file to a ftp server)
>
> I must working with (GFABasic32) GB32 Rapid Development Language and the ftp4w32.dll (file transfer dll ) in Win7/8 in asynchronous mode currently.
> GB32 is able to include DLLs into the project code, but its not possible to bind #include <curl/multi.h> stuff.

I'm not quite sure what you're talking about here... :( Are you trying to say that you can use the functions in the DLL but you can't actually call them because you can't access the header files? It's a little difficult to understand what you're asking, at least for me. As for the examples, yes, there are a decent variety to demonstrate usage of various features. The sample code is coded differently to demonstrate features and/or the right and wrong ways to do something.

>
> An easy code snippet in GB32 -send a file-.
> Declare LIB "ftp4w32.DLL"
>
> Declare Function FtpLogin(ByVal Host As String, ByVal User As String, ByVal Password As String, ByVal HWND As Integer, ByVal msge As Integer) As Integer
> Declare Function FtpSendFile(ByVal Lcl As String, ByVal ....) As Integer
> Declare Function FtpRenameFile(ByVal Remote As String, ByVal RemoteTO As String) As Integer
> .....
> FTP_Err = FtpLogin(Ftp, Usr, Pw, FormHwnd, ...)
> FTP_Err = FtpSendFile(Lcl_FileName, SV_FileName, Typ, Notify, ByRef HWND , ByRef msge )
> If FTP_Err = 0
> /* Well Done */
> Else
> /* Error while send a file */
> MsgBox "Remote file error (FtpSendFile) " & FTP_Err
> EndIf
>
> FTP_Err = FTP_LocalClose()
>
> Does anyone know and how I to use the curl-lib in this way like the older VB5 would does?

I'm not familiar with the Visual Basic bindings, but generally if the function calls have changed, then there's not too much you can do about it other than wrap the current functionality into a form that you expect.

> During security reason I want to use the SFTP() functionality of the curl-lib.

I'm afraid that I don't know how to compile SFTP functionality into a Windows DLL (though I know it's in the documentation), or how the Visual Basic bindings work. I'm more of a UNIX guy. However, if SFTP is necessary for security reasons I would consider either a) compiling a DLL yourself with these functions included or b) contacting the maintainer of the bindings and asking him to add this functionality into his binding. curl can certainly access SFTP servers so this certainly is not a problem with curl itself.

>
> Thank you and kind regards
> Roger
>
>
> -------------------------------------------------------------------
> List admin: http://cool.haxx.se/list/listinfo/curl-library
> Etiquette: http://curl.haxx.se/mail/etiquette.html

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2013-07-13