#include <wininet.h>
#pragma comment(lib, "Ws2_32.lib")
#pragma comment(lib, "WinInet")
_bstr_t bstrName = m_userNameEdit->GetEditText();
_bstr_t bstrPassword = m_passwordEdit->GetEditText();
_bstr_t bstrOption = L"";
bstrOption += L"login=";
bstrOption += bstrName;
bstrOption += "&password=";
bstrOption += bstrPassword;
_bstr_t bstrRequestKey = L"/index.php?";
bstrRequestKey += bstrOption;
LPCWSTR lpszAccept[] =
{
L"*/*"
};
HINTERNET hInet = InternetOpen(L"Mozilla/4.0 (Compatible; MSIE 6.0;)", INTERNET_OPEN_TYPE_PRECONFIG, NULL, NULL, 0);
HINTERNET hConn = InternetConnect(hInet, L"127.0.0.1", INTERNET_DEFAULT_HTTP_PORT, NULL, NULL, INTERNET_SERVICE_HTTP, 0, 0);
HINTERNET hGETs = HttpOpenRequest(hConn, L"GET", bstrRequestKey, NULL, NULL, NULL, INTERNET_FLAG_DONT_CACHE, 0);
BOOL bRequest = HttpSendRequest(hGETs, NULL, 0, 0, 0);
InternetCloseHandle(hGETs);
InternetCloseHandle(hConn);
InternetCloseHandle(hInet);