source: Include/api_wininet.sbp@ 36

Last change on this file since 36 was 1, checked in by (none), 18 years ago
File size: 2.9 KB
Line 
1' api_wininet.sbp
2
3
4#ifndef _INC_WININET
5#define _INC_WININET
6
7
8TypeDef HINTERNET = VoidPtr
9
10TypeDef INTERNET_PORT = Word
11
12
13Const INTERNET_FLAG_RELOAD = &H80000000 'retrieve the original item
14
15
16Const FTP_TRANSFER_TYPE_UNKNOWN = &H00000000
17Const FTP_TRANSFER_TYPE_ASCII = &H00000001
18Const FTP_TRANSFER_TYPE_BINARY = &H00000002
19
20
21Const INTERNET_OPEN_TYPE_PRECONFIG = 0 'use registry configuration
22Const INTERNET_OPEN_TYPE_DIRECT = 1 'direct to net
23Const INTERNET_OPEN_TYPE_PROXY = 3 'via named proxy
24Const INTERNET_OPEN_TYPE_PRECONFIG_WITH_NO_AUTOPROXY = 4 'prevent using java/script/INS
25
26Declare 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
33Const INTERNET_SERVICE_FTP = 1
34Const INTERNET_SERVICE_GOPHER = 2
35Const INTERNET_SERVICE_HTTP = 3
36
37Const INTERNET_FLAG_PASSIVE = &H08000000 'used for FTP connections
38
39Const INTERNET_INVALID_PORT_NUMBER = 0 'use the protocol-specific default
40Const INTERNET_DEFAULT_FTP_PORT = 21 'default for FTP servers
41Const INTERNET_DEFAULT_GOPHER_PORT = 70 ' " " gopher "
42Const INTERNET_DEFAULT_HTTP_PORT = 80 ' " " HTTP "
43Const INTERNET_DEFAULT_HTTPS_PORT = 443 ' " " HTTPS "
44Const INTERNET_DEFAULT_SOCKS_PORT = 1080 'default for SOCKS firewall servers.
45
46Declare 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
56Declare Function InternetCloseHandle Lib "wininet.dll" (hInternet As HINTERNET) As BOOL
57
58
59
60'----------------
61' FTP
62'----------------
63
64Declare 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
73Declare Function FtpGetCurrentDirectory Lib "wininet.dll" Alias "FtpGetCurrentDirectoryA" (
74 hConnect As HINTERNET,
75 lpszCurrentDirectory As LPSTR,
76 lpdwCurrentDirectory As DWord) As BOOL
77
78Declare Function FtpSetCurrentDirectory Lib "wininet.dll" Alias "FtpSetCurrentDirectoryA" (
79 hConnect As HINTERNET,
80 lpszDirectory As LPCSTR) As BOOL
81
82Declare 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
89Declare Function InternetFindNextFile Lib "wininet.dll" Alias "InternetFindNextFileA" (
90 hFind As HINTERNET,
91 lpvFindData As VoidPtr) As BOOL
92
93
94#endif '_INC_WININET
Note: See TracBrowser for help on using the repository browser.