Results 1 to 4 of 4

Thread: WININIT Sample to do FTP QUOTE-command?

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2001
    Location
    Bruchsal, Germany
    Posts
    4

    Question

    Hi!

    Has somebody a sample for passing an QUOTE-command
    using WININET.DLL?

    Thanks

    Andi Goering
    Andi Goering, Bruchsal - Germany

  2. #2
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359
    Why not just use the winsock control and do it all manually ?

    - jamie
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

  3. #3

    Thread Starter
    New Member
    Join Date
    Jan 2001
    Location
    Bruchsal, Germany
    Posts
    4
    Hi Jamie!

    I've not much experience with winsock. (And WININET also), but i found a lot of samples on WININET, so the only point
    missing is to QUOTE something.
    But if You have some examples on winsock directly, would you please give me a tip?

    regards

    Andi Goering
    Andi Goering, Bruchsal - Germany

  4. #4
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359
    Well,

    You'll have to read some RFCs or something, but here's how you would use the winsock control ;
    (it assumes you have a winsock control called Winsock1)

    Code:
    Private Sub Command1_Click()
        With Winsock1
            .Protocol = sckTCPProtocol         'Use TCP
            .RemoteHost = "ftp.something.com"  'Server's Address
            .RemotePort = 21                   'FTP Port
            .Connect
        End With
    End Sub
    
    Private Sub Winsock1_Connect()
        'Here's where you put the stuff to log in
        Winsock1.SendData ".... FTP protocol stuff goes here ...."
    End Sub
    
    Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
        Dim var_sockdat As String
        Winsock1.GetData var_sockdata, vbString
    End Sub
        'var_sockdata how holds the data that came back from the server
        'you'll have to read up on ftp to find out what bits do what in an ftp session
    - jamie.
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width