source: trunk/Include/api_wininet.sbp@ 300

Last change on this file since 300 was 300, checked in by dai, 17 years ago

trunkディレクトリを作成。bin、Include、TestCaseをtrunkに移動した。
標準ライブラリのビルドバッチを追加。

File size: 3.8 KB
RevLine 
[1]1' api_wininet.sbp
2
3
4#ifndef _INC_WININET
5#define _INC_WININET
6
[141]7#ifdef UNICODE
8Const _FuncName_InternetOpen = "InternetOpenW"
9Const _FuncName_InternetConnect = "InternetConnectW"
10Const _FuncName_FtpGetFile = "FtpGetFileW"
11Const _FuncName_FtpGetCurrentDirectory = "FtpGetCurrentDirectoryW"
12Const _FuncName_FtpSetCurrentDirectory = "FtpSetCurrentDirectoryW"
13Const _FuncName_FtpFindFirstFile = "FtpFindFirstFileW"
14Const _FuncName_InternetFindNextFile = "InternetFindNextFileW"
15#else
16Const _FuncName_InternetOpen = "InternetOpenA"
17Const _FuncName_InternetConnect = "InternetConnectA"
18Const _FuncName_FtpGetFile = "FtpGetFileA"
19Const _FuncName_FtpGetCurrentDirectory = "FtpGetCurrentDirectoryA"
20Const _FuncName_FtpSetCurrentDirectory = "FtpSetCurrentDirectoryA"
21Const _FuncName_FtpFindFirstFile = "FtpFindFirstFileA"
22Const _FuncName_InternetFindNextFile = "InternetFindNextFileA"
23#endif
[1]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
[141]43Declare Function InternetOpen Lib "wininet.dll" Alias _FuncName_InternetOpen (
44 lpszAgent As LPCTSTR,
[1]45 dwAccessType As DWord,
[141]46 lpszProxy As LPCTSTR,
47 lpszProxyBypass As LPCTSTR,
[1]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
[141]63Declare Function InternetConnect Lib "wininet.dll" Alias _FuncName_InternetConnect (
[1]64 hInternet As HINTERNET,
[141]65 lpszServerName As LPCTSTR,
[1]66 nServerPort As INTERNET_PORT,
[141]67 lpszUserName As LPCTSTR,
68 lpszPassword As LPCTSTR,
[1]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
75
76
77'----------------
78' FTP
79'----------------
80
[141]81Declare Function FtpGetFile Lib "wininet.dll" Alias _FuncName_FtpGetFile (
[1]82 hConnect As HINTERNET,
[141]83 lpszRemoteFile As LPCTSTR,
84 lpszNewFile As LPCTSTR,
[1]85 fFailIfExists As BOOL,
86 dwFlagsAndAttributes As DWord,
87 dwFlags As DWord,
88 dwContext As DWORD_PTR) As BOOL
89
[141]90Declare Function FtpGetCurrentDirectory Lib "wininet.dll" Alias _FuncName_FtpGetCurrentDirectory (
[1]91 hConnect As HINTERNET,
[141]92 lpszCurrentDirectory As LPTSTR,
[1]93 lpdwCurrentDirectory As DWord) As BOOL
94
[141]95Declare Function FtpSetCurrentDirectory Lib "wininet.dll" Alias _FuncName_FtpSetCurrentDirectory (
[1]96 hConnect As HINTERNET,
[141]97 lpszDirectory As LPCTSTR) As BOOL
[1]98
[141]99Declare Function FtpFindFirstFile Lib "wininet.dll" Alias _FuncName_FtpFindFirstFile (
[1]100 hConnect As HINTERNET,
[141]101 lpszSearchFile As LPCTSTR,
102 ByRef FindFileData As WIN32_FIND_DATA,
[1]103 dwFlags As DWord,
104 dwContext As DWORD_PTR) As HINTERNET
105
[141]106Declare Function InternetFindNextFile Lib "wininet.dll" Alias _FuncName_InternetFindNextFile (
[1]107 hFind As HINTERNET,
[141]108 ByREf vFindData As Any) As BOOL
[1]109
110
111#endif '_INC_WININET
Note: See TracBrowser for help on using the repository browser.