28 FATAL(
"InternetOpenW failed\n");
33 FATAL(
"InternetConnectW failed\n");
67 const WCHAR szHeaders[] =
L"Content-Type: application/x-www-form-urlencoded";
76 FATAL(
"HttpOpenRequestW failed\n");
78 Data.reset(
new char[InputData.size() + 1]);
82 FATAL(
"HttpSendRequestW failed\n");
86 FATAL(
"InternetQueryDataAvailable failed\n");
91 FATAL(
"InternetReadFile failed\n");
95 return Data.release();
112 EXCEPTION(
"CWebService::Finish was called, but not a single result had been submitted!\n");
114 Data =
"action=finish";
116 Data +=
"&testtype=";
125 ss <<
"When finishing the test run, the server responded:" <<
endl <<
Response <<
endl;
141 Data =
"action=gettestid";
144 Data +=
"&testtype=";
184 Data =
"action=getsuiteid";
186 Data +=
"&testtype=";
200 ss <<
"Expected Suite ID, but received:" <<
endl << SuiteID <<
endl;
229 Data =
"action=submit";
231 Data +=
"&testtype=";
244 ss <<
"When submitting the result, the server responded:" <<
endl <<
Response <<
endl;
static const WCHAR szHostname[]
static const WCHAR szServerFile[]
static const INTERNET_PORT ServerPort
basic_ostream< _CharT, _Traits > &_STLP_CALL endl(basic_ostream< _CharT, _Traits > &__os)
int strcmp(const char *String1, const char *String2)
char * strcpy(char *DstString, const char *SrcString)
_In_ ULONG _In_opt_ WDFREQUEST _In_opt_ PVOID _In_ size_t _In_ PVOID _In_ size_t _Out_ size_t * DataLength
void GetTestID(const char *TestType)
void Finish(const char *TestType)
void Submit(const char *TestType, CTestInfo *TestInfo)
PCHAR GetSuiteID(const char *TestType, CTestInfo *TestInfo)
PCHAR DoRequest(const string &InputData)
BOOL WINAPI HttpSendRequestW(HINTERNET hHttpRequest, LPCWSTR lpszHeaders, DWORD dwHeaderLength, LPVOID lpOptional, DWORD dwOptionalLength)
HINTERNET WINAPI HttpOpenRequestW(HINTERNET hHttpSession, LPCWSTR lpszVerb, LPCWSTR lpszObjectName, LPCWSTR lpszVersion, LPCWSTR lpszReferrer, LPCWSTR *lpszAcceptTypes, DWORD dwFlags, DWORD_PTR dwContext)
BOOL WINAPI InternetReadFile(HINTERNET hFile, LPVOID lpBuffer, DWORD dwNumOfBytesToRead, LPDWORD pdwNumOfBytesRead)
BOOL WINAPI InternetCloseHandle(HINTERNET hInternet)
BOOL WINAPI InternetQueryDataAvailable(HINTERNET hFile, LPDWORD lpdwNumberOfBytesAvailable, DWORD dwFlags, DWORD_PTR dwContext)
HINTERNET WINAPI InternetConnectW(HINTERNET hInternet, LPCWSTR lpszServerName, INTERNET_PORT nServerPort, LPCWSTR lpszUserName, LPCWSTR lpszPassword, DWORD dwService, DWORD dwFlags, DWORD_PTR dwContext)
HINTERNET WINAPI InternetOpenW(LPCWSTR lpszAgent, DWORD dwAccessType, LPCWSTR lpszProxy, LPCWSTR lpszProxyBypass, DWORD dwFlags)
#define EXCEPTION(Message)
bool IsNumber(const char *Input)
string EscapeString(const char *Input)
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_INTERRUPT_CONFIG Configuration
#define INTERNET_FLAG_RELOAD
#define INTERNET_FLAG_NO_COOKIES
#define INTERNET_FLAG_NO_CACHE_WRITE
#define INTERNET_FLAG_SECURE
#define INTERNET_OPEN_TYPE_PRECONFIG
#define INTERNET_SERVICE_HTTP