The following code
fRequestHandle = HttpOpenRequestA(
fConnectHandle,
"POST", url.c_str(),
NULL, NULL, NULL,
INTERNET_FLAG_RELOAD|INTERNET_FLAG_NO_CACHE_WRITE,
0);
is returning NULL with GetLastError() returning 122. A search suggests this error is
122 (ERROR_INSUFFICIENT_BUFFER) The data area passed to a system call is too small.
but gives no indication what buffer might be too small.
Which buffer might this relate to, and how can I make it bigger?
Update:
As has been pointed out, and detailed at http://support.microsoft.com/kb/208427, Internet Explorer, and presumably the wininet library, has a url limit of 2083 characters.
However looking at my url I find the url itself is around 40 characters. The 650k of data is in a name/value pair, for which wininet has no limit
See Question&Answers more detail:os