source: branch/egtra-stream-without-en_dec/api_wininet.sbp@ 676

Last change on this file since 676 was 540, checked in by dai, 16 years ago

InternetOpenUrl関数、HttpQueryInfo関数の定義を追加。その他必要な定数を追加。

File size: 7.1 KB
Line 
1' api_wininet.sbp
2
3#ifdef UNICODE
4Const _FuncName_InternetOpen = "InternetOpenW"
5Const _FuncName_InternetConnect = "InternetConnectW"
6Const _FuncName_FtpGetFile = "FtpGetFileW"
7Const _FuncName_FtpGetCurrentDirectory = "FtpGetCurrentDirectoryW"
8Const _FuncName_FtpSetCurrentDirectory = "FtpSetCurrentDirectoryW"
9Const _FuncName_FtpFindFirstFile = "FtpFindFirstFileW"
10Const _FuncName_InternetFindNextFile = "InternetFindNextFileW"
11Const _FuncName_InternetOpenUrl = "InternetOpenUrlW"
12Const _FuncName_HttpQueryInfo = "HttpQueryInfoW"
13#else
14Const _FuncName_InternetOpen = "InternetOpenA"
15Const _FuncName_InternetConnect = "InternetConnectA"
16Const _FuncName_FtpGetFile = "FtpGetFileA"
17Const _FuncName_FtpGetCurrentDirectory = "FtpGetCurrentDirectoryA"
18Const _FuncName_FtpSetCurrentDirectory = "FtpSetCurrentDirectoryA"
19Const _FuncName_FtpFindFirstFile = "FtpFindFirstFileA"
20Const _FuncName_InternetFindNextFile = "InternetFindNextFileA"
21Const _FuncName_InternetOpenUrl = "InternetOpenUrlA"
22Const _FuncName_HttpQueryInfo = "HttpQueryInfoA"
23#endif
24
25TypeDef HINTERNET = VoidPtr
26
27TypeDef INTERNET_PORT = Word
28
29
30Const INTERNET_FLAG_RELOAD = &H80000000 'retrieve the original item
31
32
33Const FTP_TRANSFER_TYPE_UNKNOWN = &H00000000
34Const FTP_TRANSFER_TYPE_ASCII = &H00000001
35Const FTP_TRANSFER_TYPE_BINARY = &H00000002
36
37
38Const INTERNET_OPEN_TYPE_PRECONFIG = 0 'use registry configuration
39Const INTERNET_OPEN_TYPE_DIRECT = 1 'direct to net
40Const INTERNET_OPEN_TYPE_PROXY = 3 'via named proxy
41Const INTERNET_OPEN_TYPE_PRECONFIG_WITH_NO_AUTOPROXY = 4 'prevent using java/script/INS
42
43Declare 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
50Const INTERNET_SERVICE_FTP = 1
51Const INTERNET_SERVICE_GOPHER = 2
52Const INTERNET_SERVICE_HTTP = 3
53
54Const INTERNET_FLAG_PASSIVE = &H08000000 'used for FTP connections
55
56Const INTERNET_INVALID_PORT_NUMBER = 0 'use the protocol-specific default
57Const INTERNET_DEFAULT_FTP_PORT = 21 'default for FTP servers
58Const INTERNET_DEFAULT_GOPHER_PORT = 70 ' " " gopher "
59Const INTERNET_DEFAULT_HTTP_PORT = 80 ' " " HTTP "
60Const INTERNET_DEFAULT_HTTPS_PORT = 443 ' " " HTTPS "
61Const INTERNET_DEFAULT_SOCKS_PORT = 1080 'default for SOCKS firewall servers.
62
63Declare 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
73Declare Function InternetCloseHandle Lib "wininet.dll" (hInternet As HINTERNET) As BOOL
74
75Declare Function InternetOpenUrl Lib "wininet.dll" Alias _FuncName_InternetOpenUrl (
76 hInternet As HINTERNET,
77 lpszUrl As LPCTSTR,
78 lpszHeaders As LPCTSTR,
79 dwHeadersLength As DWord,
80 dwFlags As DWord,
81 dwContext As DWORD_PTR ) As HINTERNET
82
83
84
85'----------------
86' HTTP
87'----------------
88
89Const HTTP_QUERY_MIME_VERSION = 0
90Const HTTP_QUERY_CONTENT_TYPE = 1
91Const HTTP_QUERY_CONTENT_TRANSFER_ENCODING = 2
92Const HTTP_QUERY_CONTENT_ID = 3
93Const HTTP_QUERY_CONTENT_DESCRIPTION = 4
94Const HTTP_QUERY_CONTENT_LENGTH = 5
95Const HTTP_QUERY_CONTENT_LANGUAGE = 6
96Const HTTP_QUERY_ALLOW = 7
97Const HTTP_QUERY_PUBLIC = 8
98Const HTTP_QUERY_DATE = 9
99Const HTTP_QUERY_EXPIRES = 10
100Const HTTP_QUERY_LAST_MODIFIED = 11
101Const HTTP_QUERY_MESSAGE_ID = 12
102Const HTTP_QUERY_URI = 13
103Const HTTP_QUERY_DERIVED_FROM = 14
104Const HTTP_QUERY_COST = 15
105Const HTTP_QUERY_LINK = 16
106Const HTTP_QUERY_PRAGMA = 17
107Const HTTP_QUERY_VERSION = 18 ' special: part of status line
108Const HTTP_QUERY_STATUS_CODE = 19 ' special: part of status line
109Const HTTP_QUERY_STATUS_TEXT = 20 ' special: part of status line
110Const HTTP_QUERY_RAW_HEADERS = 21 ' special: all headers as ASCIIZ
111Const HTTP_QUERY_RAW_HEADERS_CRLF = 22 ' special: all headers
112Const HTTP_QUERY_CONNECTION = 23
113Const HTTP_QUERY_ACCEPT = 24
114Const HTTP_QUERY_ACCEPT_CHARSET = 25
115Const HTTP_QUERY_ACCEPT_ENCODING = 26
116Const HTTP_QUERY_ACCEPT_LANGUAGE = 27
117Const HTTP_QUERY_AUTHORIZATION = 28
118Const HTTP_QUERY_CONTENT_ENCODING = 29
119Const HTTP_QUERY_FORWARDED = 30
120Const HTTP_QUERY_FROM = 31
121Const HTTP_QUERY_IF_MODIFIED_SINCE = 32
122Const HTTP_QUERY_LOCATION = 33
123Const HTTP_QUERY_ORIG_URI = 34
124Const HTTP_QUERY_REFERER = 35
125Const HTTP_QUERY_RETRY_AFTER = 36
126Const HTTP_QUERY_SERVER = 37
127Const HTTP_QUERY_TITLE = 38
128Const HTTP_QUERY_USER_AGENT = 39
129Const HTTP_QUERY_WWW_AUTHENTICATE = 40
130Const HTTP_QUERY_PROXY_AUTHENTICATE = 41
131Const HTTP_QUERY_ACCEPT_RANGES = 42
132Const HTTP_QUERY_SET_COOKIE = 43
133Const HTTP_QUERY_COOKIE = 44
134Const HTTP_QUERY_REQUEST_METHOD = 45 ' special: GET/POST etc.
135Const HTTP_QUERY_REFRESH = 46
136Const HTTP_QUERY_CONTENT_DISPOSITION = 47
137
138Declare Function HttpQueryInfo Lib "wininet.dll" Alias _FuncName_HttpQueryInfo (
139 hRequest As HINTERNET,
140 dwInfoLevel As DWord,
141 lpBuffer As VoidPtr,
142 ByRef lpdwBufferLength As DWord,
143 ByRef lpdwIndex As DWord ) As BOOL
144
145
146'----------------
147' FTP
148'----------------
149
150Declare Function FtpGetFile Lib "wininet.dll" Alias _FuncName_FtpGetFile (
151 hConnect As HINTERNET,
152 lpszRemoteFile As LPCTSTR,
153 lpszNewFile As LPCTSTR,
154 fFailIfExists As BOOL,
155 dwFlagsAndAttributes As DWord,
156 dwFlags As DWord,
157 dwContext As DWORD_PTR) As BOOL
158
159Declare Function FtpGetCurrentDirectory Lib "wininet.dll" Alias _FuncName_FtpGetCurrentDirectory (
160 hConnect As HINTERNET,
161 lpszCurrentDirectory As LPTSTR,
162 lpdwCurrentDirectory As DWord) As BOOL
163
164Declare Function FtpSetCurrentDirectory Lib "wininet.dll" Alias _FuncName_FtpSetCurrentDirectory (
165 hConnect As HINTERNET,
166 lpszDirectory As LPCTSTR) As BOOL
167
168Declare Function FtpFindFirstFile Lib "wininet.dll" Alias _FuncName_FtpFindFirstFile (
169 hConnect As HINTERNET,
170 lpszSearchFile As LPCTSTR,
171 ByRef FindFileData As WIN32_FIND_DATA,
172 dwFlags As DWord,
173 dwContext As DWORD_PTR) As HINTERNET
174
175Declare Function InternetFindNextFile Lib "wininet.dll" Alias _FuncName_InternetFindNextFile (
176 hFind As HINTERNET,
177 ByREf vFindData As Any) As BOOL
Note: See TracBrowser for help on using the repository browser.