Originally posted by: Czerteak
I've got a problem with HttpQueryInfo(). Whenever I call it, it returns ERROR_HTTP_HEADER_NOT_FOUND. What can I do about this?
Or:
Can you just explain this to me, I'm not native English...
Address of a zero-based header index used to enumerate multiple headers with the same name. When calling the function, this parameter is the index of the specified header to return. When the function returns, this parameter is the index of the next header. If the next index cannot be found, ERROR_HTTP_HEADER_NOT_FOUND is returned.
Thanks....
Originally posted by: Chuck Baker
Is there a way to access Secure Web pages that have the https address?
ReplyOriginally posted by: Vinh-An Trinh
I am having trouble accessing web pages that need to send cookies to the client. For example my.yahoo.com will return something like "browser doesn't support cookies" instead of the usual MyYahoo page when viewed with IE or Netscape.
If you go to http://www.netscape.com/newsref/std/cookie_spec.html and read the cookie spec, they say that the server will send with the http response header something like this:
Set-Cookie: foo=bar; ... /* other cookie info */
And the client must send it back when doing another request.
My problem is that the Set-Cookie header is not in the response. Or maybe I look for it too late?
Anyway, I'll go debug some more.
ReplyOriginally posted by: Musquer Stephane
OK, I tried this exemple, and I have the link error too.
To link this code, I add to the setting of my project, in the "link"
panel, in "Object/Library modules:" the wininet.lib library.
Now it works !
Reply
Originally posted by: kirk
ok, this is very frustrating. it seems that i always get error even when the connection is made and web
content is received.
i have added Contents.ReleaseBuffer(dwBytesRead);
however. it never seems to succeed.
Originally posted by: Abraham Castillo
When I try this sample, I can�t fix these errors:
WebWorld.obj : error LNK2001: unresolved external symbol __imp__InternetOpenA@20
WebWorld.obj : error LNK2001: unresolved external symbol __imp__InternetCloseHandle@4
WebWorld.obj : error LNK2001: unresolved external symbol __imp__InternetReadFile@16
WebWorld.obj : error LNK2001: unresolved external symbol __imp__HttpQueryInfoA@20
WebWorld.obj : error LNK2001: unresolved external symbol __imp__InternetOpenUrlA@24
Debug/browser.exe : fatal error LNK1120: 5 unresolved externals
Error executing link.exe.
browser.exe - 6 error(s), 0 warning(s)
Add the following comment into your source header file. This will make the linker search for the wininet library. #pragma comment(lib,"wininet")Reply
Originally posted by: Scott McPhillips
The sample code returns a CString that is always of zero length
(even when things work). The fix is after the InternetReadFile
call add the line:
Contents.ReleaseBuffer(dwBytesRead);