source: branch/egtra-gdiplus/api_wininet.sbp@ 338

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

#50 API宣言の変更完了

File size: 3.8 KB
Line 
1' api_wininet.sbp
2
3
4#ifndef _INC_WININET
5#define _INC_WININET
6
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
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
75
76
77'----------------
78' FTP
79'----------------
80
81Declare 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
90Declare Function FtpGetCurrentDirectory Lib "wininet.dll" Alias _FuncName_FtpGetCurrentDirectory (
91 hConnect As HINTERNET,
92 lpszCurrentDirectory As LPTSTR,
93 lpdwCurrentDirectory As DWord) As BOOL
94
95Declare Function FtpSetCurrentDirectory Lib "wininet.dll" Alias _FuncName_FtpSetCurrentDirectory (
96 hConnect As HINTERNET,
97 lpszDirectory As LPCTSTR) As BOOL
98
99Declare 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
106Declare 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
Note: See TracBrowser for help on using the repository browser.