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