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