views:

25

answers:

2

I am trying to use InternetGetCookie in order to retrieve cookies from IE. The problem I have is that sometimes in a cookie file there may be 2 or even 3 different cookies but InternetGetCookie always retrieves the data associated with only the first cookie. I tried calling InternetGetCookie twice in a row for the same cookie url but it all it does is two retrieve the first cookie data twice. Thanks!

A: 

InternetGetCookie returns all cookies separated by ';' symbol.

spektom
I am afraid id does not: I have tested InternetGetCookie and it only retrieves the first cookie.
A: 

Where (what process) is your code running in? What do you mean when you when you say "same cookie url"?

Some notes:

  • InternetGetCookie will not return HTTPOnly cookies by default
  • InternetGetCookie will return only persistent cookies and session cookies from the current process. It does not see session cookies from other processes.
  • On Vista+, InternetGetCookie will not return cookies from Protected Mode processes

http://blogs.msdn.com/b/ieinternals/archive/2009/08/20/wininet-ie-cookie-internals-faq.aspx

EricLaw -MSFT-