[1] | 1 | ' api_wininet.sbp
|
---|
| 2 |
|
---|
[141] | 3 | #ifdef UNICODE
|
---|
| 4 | Const _FuncName_InternetOpen = "InternetOpenW"
|
---|
| 5 | Const _FuncName_InternetConnect = "InternetConnectW"
|
---|
| 6 | Const _FuncName_FtpGetFile = "FtpGetFileW"
|
---|
| 7 | Const _FuncName_FtpGetCurrentDirectory = "FtpGetCurrentDirectoryW"
|
---|
| 8 | Const _FuncName_FtpSetCurrentDirectory = "FtpSetCurrentDirectoryW"
|
---|
| 9 | Const _FuncName_FtpFindFirstFile = "FtpFindFirstFileW"
|
---|
| 10 | Const _FuncName_InternetFindNextFile = "InternetFindNextFileW"
|
---|
| 11 | #else
|
---|
| 12 | Const _FuncName_InternetOpen = "InternetOpenA"
|
---|
| 13 | Const _FuncName_InternetConnect = "InternetConnectA"
|
---|
| 14 | Const _FuncName_FtpGetFile = "FtpGetFileA"
|
---|
| 15 | Const _FuncName_FtpGetCurrentDirectory = "FtpGetCurrentDirectoryA"
|
---|
| 16 | Const _FuncName_FtpSetCurrentDirectory = "FtpSetCurrentDirectoryA"
|
---|
| 17 | Const _FuncName_FtpFindFirstFile = "FtpFindFirstFileA"
|
---|
| 18 | Const _FuncName_InternetFindNextFile = "InternetFindNextFileA"
|
---|
| 19 | #endif
|
---|
[1] | 20 |
|
---|
| 21 | TypeDef HINTERNET = VoidPtr
|
---|
| 22 |
|
---|
| 23 | TypeDef INTERNET_PORT = Word
|
---|
| 24 |
|
---|
| 25 |
|
---|
| 26 | Const INTERNET_FLAG_RELOAD = &H80000000 'retrieve the original item
|
---|
| 27 |
|
---|
| 28 |
|
---|
| 29 | Const FTP_TRANSFER_TYPE_UNKNOWN = &H00000000
|
---|
| 30 | Const FTP_TRANSFER_TYPE_ASCII = &H00000001
|
---|
| 31 | Const FTP_TRANSFER_TYPE_BINARY = &H00000002
|
---|
| 32 |
|
---|
| 33 |
|
---|
| 34 | Const INTERNET_OPEN_TYPE_PRECONFIG = 0 'use registry configuration
|
---|
| 35 | Const INTERNET_OPEN_TYPE_DIRECT = 1 'direct to net
|
---|
| 36 | Const INTERNET_OPEN_TYPE_PROXY = 3 'via named proxy
|
---|
| 37 | Const INTERNET_OPEN_TYPE_PRECONFIG_WITH_NO_AUTOPROXY = 4 'prevent using java/script/INS
|
---|
| 38 |
|
---|
[141] | 39 | Declare Function InternetOpen Lib "wininet.dll" Alias _FuncName_InternetOpen (
|
---|
| 40 | lpszAgent As LPCTSTR,
|
---|
[1] | 41 | dwAccessType As DWord,
|
---|
[141] | 42 | lpszProxy As LPCTSTR,
|
---|
| 43 | lpszProxyBypass As LPCTSTR,
|
---|
[1] | 44 | dwFlags As DWord) As HINTERNET
|
---|
| 45 |
|
---|
| 46 | Const INTERNET_SERVICE_FTP = 1
|
---|
| 47 | Const INTERNET_SERVICE_GOPHER = 2
|
---|
| 48 | Const INTERNET_SERVICE_HTTP = 3
|
---|
| 49 |
|
---|
| 50 | Const INTERNET_FLAG_PASSIVE = &H08000000 'used for FTP connections
|
---|
| 51 |
|
---|
| 52 | Const INTERNET_INVALID_PORT_NUMBER = 0 'use the protocol-specific default
|
---|
| 53 | Const INTERNET_DEFAULT_FTP_PORT = 21 'default for FTP servers
|
---|
| 54 | Const INTERNET_DEFAULT_GOPHER_PORT = 70 ' " " gopher "
|
---|
| 55 | Const INTERNET_DEFAULT_HTTP_PORT = 80 ' " " HTTP "
|
---|
| 56 | Const INTERNET_DEFAULT_HTTPS_PORT = 443 ' " " HTTPS "
|
---|
| 57 | Const INTERNET_DEFAULT_SOCKS_PORT = 1080 'default for SOCKS firewall servers.
|
---|
| 58 |
|
---|
[141] | 59 | Declare Function InternetConnect Lib "wininet.dll" Alias _FuncName_InternetConnect (
|
---|
[1] | 60 | hInternet As HINTERNET,
|
---|
[141] | 61 | lpszServerName As LPCTSTR,
|
---|
[1] | 62 | nServerPort As INTERNET_PORT,
|
---|
[141] | 63 | lpszUserName As LPCTSTR,
|
---|
| 64 | lpszPassword As LPCTSTR,
|
---|
[1] | 65 | dwService As DWord,
|
---|
| 66 | dwFlags As DWord,
|
---|
| 67 | dwContext As DWORD_PTR) As HINTERNET
|
---|
| 68 |
|
---|
| 69 | Declare Function InternetCloseHandle Lib "wininet.dll" (hInternet As HINTERNET) As BOOL
|
---|
| 70 |
|
---|
| 71 |
|
---|
| 72 |
|
---|
| 73 | '----------------
|
---|
| 74 | ' FTP
|
---|
| 75 | '----------------
|
---|
| 76 |
|
---|
[141] | 77 | Declare Function FtpGetFile Lib "wininet.dll" Alias _FuncName_FtpGetFile (
|
---|
[1] | 78 | hConnect As HINTERNET,
|
---|
[141] | 79 | lpszRemoteFile As LPCTSTR,
|
---|
| 80 | lpszNewFile As LPCTSTR,
|
---|
[1] | 81 | fFailIfExists As BOOL,
|
---|
| 82 | dwFlagsAndAttributes As DWord,
|
---|
| 83 | dwFlags As DWord,
|
---|
| 84 | dwContext As DWORD_PTR) As BOOL
|
---|
| 85 |
|
---|
[141] | 86 | Declare Function FtpGetCurrentDirectory Lib "wininet.dll" Alias _FuncName_FtpGetCurrentDirectory (
|
---|
[1] | 87 | hConnect As HINTERNET,
|
---|
[141] | 88 | lpszCurrentDirectory As LPTSTR,
|
---|
[1] | 89 | lpdwCurrentDirectory As DWord) As BOOL
|
---|
| 90 |
|
---|
[141] | 91 | Declare Function FtpSetCurrentDirectory Lib "wininet.dll" Alias _FuncName_FtpSetCurrentDirectory (
|
---|
[1] | 92 | hConnect As HINTERNET,
|
---|
[141] | 93 | lpszDirectory As LPCTSTR) As BOOL
|
---|
[1] | 94 |
|
---|
[141] | 95 | Declare Function FtpFindFirstFile Lib "wininet.dll" Alias _FuncName_FtpFindFirstFile (
|
---|
[1] | 96 | hConnect As HINTERNET,
|
---|
[141] | 97 | lpszSearchFile As LPCTSTR,
|
---|
| 98 | ByRef FindFileData As WIN32_FIND_DATA,
|
---|
[1] | 99 | dwFlags As DWord,
|
---|
| 100 | dwContext As DWORD_PTR) As HINTERNET
|
---|
| 101 |
|
---|
[141] | 102 | Declare Function InternetFindNextFile Lib "wininet.dll" Alias _FuncName_InternetFindNextFile (
|
---|
[1] | 103 | hFind As HINTERNET,
|
---|
[141] | 104 | ByREf vFindData As Any) As BOOL
|
---|