Daniel Kondermann
2005-03-27 20:09:43 UTC
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
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