Newsgroups : Microsoft : microsoft.public.inetsdk.programming.wininet : 2005 Mar : HttpOpenRequest brings up error 122: ERROR_INSUFFICIENT_BUFFER (no url limit pro

www.cryer.info
Managed Newsgroup Archive

HttpOpenRequest brings up error 122: ERROR_INSUFFICIENT_BUFFER (no url limit pro

Subject:HttpOpenRequest brings up error 122: ERROR_INSUFFICIENT_BUFFER (no url limit pro
Posted by:dani..@fin.de
Date:27 Mar 2005 12:09:43

Hi there!

According to the Platform SDK these calls shouldn't do any harm:

HINTERNET m_hInternet = InternetOpen(Agent.c_str(),
              PRE_CONFIG_INTERNET_ACCESS, NULL, 0, 0);

HINTERNET m_hConnection =InternetConnect(
    m_hInternet, Server.c_str(), Port, NULL /*username*/, NULL
/*password*/,
    INTERNET_SERVICE_HTTP, 0, 0);

DWORD err =GetLastError(); //returns "no error"

HINTERNET m_hRequest =HttpOpenRequest(m_hConnection, NULL,
"/guard/guard.php\0",
    NULL, "192.168.0.1\0", NULL, INTERNET_FLAG_RELOAD, 0);

err =GetLastError(); //returns Error 122: ERROR_INSUFFICIENT_BUFFER

Unfortunately I have no clue why the call to HttpOpenRequest returns
that error since I don't use any buffers. And m_hRequest is not NULL,
so it should be a correct handle. Anyway all subsequent calls will
fail with an "invalid handle" error.
Anyway the Platform SDK doesn't mention that this error can occur :(

I'd very much appreciate your help!
...theres not much info about this stuff in the web...
Daniel

Replies:

www.cryer.info
Managed Newsgroup Archive