deadpool42
Programmer
- May 24, 2004
- 40
The code I have right now (copied from Microsoft's website) is this:
but Visual Basic tells me the function InternetOpen isn't defined. I've tried adding wininet.dll to the project's references, but that doesn't work either. I just need to send a GET request, I don't even care about the page being returned. Does anyone know the best way to do this?
Code:
Dim hInternetSession As Long
Dim hInternetConnect As Long
Dim hHttpOpenRequest As Long
Dim sBuffer As String * 1024
Dim lBufferLength As Long
lBufferLength = Len(sBuffer)
hInternetSession = InternetOpen(scUserAgent, _
INTERNET_OPEN_TYPE_PRECONFIG, vbNullString, vbNullString, 0)
hInternetConnect = InternetConnect(hInternetSession, _
"team.monkeycrap.com", INTERNET_DEFAULT_HTTP_PORT, _
vbNullString, vbNullString, INTERNET_SERVICE_HTTP, 0, 0)
hHttpOpenRequest = HttpOpenRequest(hInternetConnect, "GET", _
"/cgi-bin/clan.pl?action=setserver&player=" + clanMember + "&server=" + serverIP + "&port=" + serverPort, "HTTP/1.0", vbNullString, 0, _
INTERNET_FLAG_RELOAD, 0)
HttpSendRequest hHttpOpenRequest, vbNullString, 0, 0, 0
but Visual Basic tells me the function InternetOpen isn't defined. I've tried adding wininet.dll to the project's references, but that doesn't work either. I just need to send a GET request, I don't even care about the page being returned. Does anyone know the best way to do this?