But MSDN tells us that the cookies that InternetSetCookie set are valid only within this process and cannot be accessed across processes. New IE, of course, belongs to the new process, so even if you call the InternetSetCookie set cookies, it cannot commit the cookie content to the server side.
From: http://www.cnblogs.com/michaellee/archive/2009/02/05/1383743.html//Know the above content can be good enough, and then plan.
InternetGetCookie This function does not explain, search it.
BOOL Breturn;
Create a session cookie. Read English;
Breturn = InternetSetCookie ("Http://www.qyjz.net", NULL, "TestData = Data");
Create a persistent cookie.//see English;
Breturn = InternetSetCookie ("Http://www.qyjz.net", NULL, "TestData = Data;expires = Sat, 31-dec-2007 14:00:00 G" MT ");
After countless attempts, I finally got a clue. These two brothers functions are a little special, I think it is wrong to publish online examples, but it may be different in the way various languages are used.
For Delphi 7, when you use the InternetSetCookie function to set up Cookeis, you append a string to the original cookie. See the blue string above, the preceding should not be preceded by a semicolon ";", otherwise invalid ("; TestData = Data;expires = Sat, 31-dec-2007 14:00:00 GMT ") This is wrong. A lot of code on the Internet is a semicolon, hehe,,,, and, on the network of these two functions of the code is wrong. If this function InternetSetCookie can be completely replaced instead of appending strings in the back, it is done correctly, but it seems impossible to do oh ~~~~~ or, I have not fully understood.
This is more information on the function of language, easy language to write this on the function I have followed ~ "" The same problem,
So internetsetcookie this function can only append strings to the original cookie.
The correct use of the method I already know, do not explain, the veteran flew over, rookie station contact me ... ^-^ ``