vb@rchiv
VB Classic
VB.NET
ADO.NET
VBA
C#
Erstellen von dynamischen Kontextmen?s - wann immer Sie sie brauchen!  
 vb@rchiv Quick-Search: Suche startenErweiterte Suche starten   Impressum  | Datenschutz  | vb@rchiv CD Vol.6  | Shop Copyright ©2000-2025
 
zurück

 Sie sind aktuell nicht angemeldet.Funktionen: Einloggen  |  Neu registrieren  |  Suchen

VB.NET - Fortgeschrittene
Re: FTP-Funktionen 
Autor: WaldiMaywood
Datum: 13.04.04 15:28

hhmm, API gibt es ausreichend:
Class ftpAPI
    Structure FILETIME
        Private dwLowDateTime As Int32
        Private dwHighDateTime As Int32
    End Structure
    Structure WIN32_FIND_DATA
        Private dwFileAttributes As Int32
        Private ftCreationTime As FILETIME
        Private ftLastAccessTime As FILETIME
        Private ftLastWriteTime As FILETIME
        Private nFileSizeHigh As Int32
        Private nFileSizeLow As Int32
        Private dwReserved0 As Int32
        Private dwReserved1 As Int32
        Private cFileName As String
        <VBFixedString(14)> Private cAlternate As String
    End Structure
    Declare Sub FtpCommand Lib "wininet.dll" Alias "FtpCommandA" (ByRef _
      hConnect As Int32, ByVal fExpectResponse As Int32, ByVal dwFlags As _
      Int32, ByVal lpszCommand As String, ByRef dwContext As Int32, ByRef _
      phFtpCommand As Int32)
    Declare Sub FtpCreateDirectory Lib "wininet.dll" Alias _
    "FtpCreateDirectoryA" (ByRef hConnect As Int32, ByVal lpszDirectory As _
    String)
    Declare Sub FtpDeleteFile Lib "wininet.dll" Alias "FtpDeleteFileA" (ByRef _
    hConnect As Int32, ByVal lpszFileName As String)
    Declare Sub FtpFindFirstFile Lib "wininet.dll" Alias "FtpFindFirstFileA" ( _
    ByRef hConnect As Int32, ByVal lpszSearchFile As String, ByRef _
    lpFindFileData As WIN32_FIND_DATA, ByVal dwFlags As Int32, ByRef dwContext _
    As Int32)
    Declare Sub FtpGetCurrentDirectory Lib "wininet.dll" Alias _
    "FtpGetCurrentDirectoryA" (ByRef hConnect As Int32, ByVal _
    lpszCurrentDirectory As String, ByRef lpdwCurrentDirectory As Int32)
    Declare Sub FtpGetFile Lib "wininet.dll" Alias "FtpGetFileA" (ByRef _
    hConnect As Int32, ByVal lpszRemoteFile As String, ByVal lpszNewFile As _
    String, ByVal fFailIfExists As Int32, ByVal dwFlagsAndAttributes As Int32, _
    ByVal dwFlags As Int32, ByRef dwContext As Int32)
    Declare Sub FtpGetFileEx Lib "wininet.dll" (ByRef hFtpSession As Int32, _
    ByVal lpszRemoteFile As String, ByVal lpszNewFile As String, ByVal _
    fFailIfExists As Int32, ByVal dwFlagsAndAttributes As Int32, ByVal dwFlags _
    As Int32, ByRef dwContext As Int32)
    Declare Function FtpGetFileSize Lib "wininet.dll" (ByVal hFile As Int32, _
    ByVal lpdwFileSizeHigh As Int32) As Int32
    Declare Sub FtpOpenFile Lib "wininet.dll" Alias "FtpOpenFileA" (ByRef _
    hConnect As Int32, ByVal lpszFileName As String, ByVal dwAccess As Int32, _
    ByVal dwFlags As Int32, ByRef dwContext As Int32)
    Declare Sub FtpPutFile Lib "wininet.dll" Alias "FtpPutFileA" (ByRef _
    hConnect As Int32, ByVal lpszLocalFile As String, ByVal lpszNewRemoteFile _
    As String, ByVal dwFlags As Int32, ByRef dwContext As Int32)
    Declare Sub FtpPutFileEx Lib "wininet.dll" (ByRef hFtpSession As Int32, _
    ByVal lpszLocalFile As String, ByVal lpszNewRemoteFile As String, ByVal _
    dwFlags As Int32, ByRef dwContext As Int32)
    Declare Sub FtpRemoveDirectory Lib "wininet.dll" Alias _
    "FtpRemoveDirectoryA" (ByRef hConnect As Int32, ByVal lpszDirectory As _
    String)
    Declare Sub FtpRenameFile Lib "wininet.dll" Alias "FtpRenameFileA" (ByRef _
    hConnect As Int32, ByVal lpszExisting As String, ByVal lpszNew As String)
    Declare Sub FtpSetCurrentDirectory Lib "wininet.dll" Alias _
    "FtpSetCurrentDirectoryA" (ByRef hConnect As Int32, ByVal lpszDirectory As _
    String)
End Class
... oder, du befasst dich intensiv mit dem FTP Protokoll und d. "System.Net.Sockets.Socket" Klasse, und erstellt deine eigenen FTP-Methoden.

PS: Die API's sind aus dem APIViewer2003.
Steve
alle Nachrichten anzeigenGesamtübersicht  |  Zum Thema  |  Suchen

 ThemaViews  AutorDatum
FTP-Funktionen915sTorKkA12.04.04 17:38
Re: FTP-Funktionen660WaldiMaywood12.04.04 18:27
Re: FTP-Funktionen580sTorKkA13.04.04 15:03
Re: FTP-Funktionen1.070WaldiMaywood13.04.04 15:28
Re: FTP-Funktionen620sTorKkA13.04.04 18:12

Sie sind nicht angemeldet!
Um auf diesen Beitrag zu antworten oder neue Beiträge schreiben zu können, müssen Sie sich zunächst anmelden.

Einloggen  |  Neu registrieren

Funktionen:  Zum Thema  |  GesamtübersichtSuchen 

nach obenzurück
 
   

Copyright ©2000-2025 vb@rchiv Dieter Otter
Alle Rechte vorbehalten.
Microsoft, Windows und Visual Basic sind entweder eingetragene Marken oder Marken der Microsoft Corporation in den USA und/oder anderen Ländern. Weitere auf dieser Homepage aufgeführten Produkt- und Firmennamen können geschützte Marken ihrer jeweiligen Inhaber sein.

Diese Seiten wurden optimiert für eine Bildschirmauflösung von mind. 1280x1024 Pixel