I found out the answer myself:
The functions of "wininet.dll" are the solution:
The function InternetOpen() more or less corresponds to new WebClient()
.
Downloading data is a bit more complicated; there is no unified API for different protocols (HTTP, FTP, ...), but each protocol type uses different functions.
To download (GET
) or send (POST
) data via HTTP or HTTPS, the APIs InternetCrackUrl(), InternetConnect(), HttpSendRequest() and InternetReadFile() are used.
(Note: On the Microsoft web site documentation, the function declarations are shown as void InternetOpen(...)
although the documentation says that the functions return a value of the type HINTERNET
. HINTERNET
is correct, void
is wrong.)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…