source: trunk/Include/api_wininet.sbp@ 497

Last change on this file since 497 was 497, checked in by イグトランス (egtra), 17 years ago

インクルードガードとその他不要な前処理定義などの削除

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