Both functions should note that the Szcookiename parameter is not very good, preferably set to NULL, and then write the cookie manually in the content:
"My_cookie_name=my_cookie_value; path=/; expires=wed, 30-mar-11 09:00:00 GMT; Domain=.csdn.net "
Read the whole thing and then parse it yourself.
In addition, the Internetgetcookieex dwflag parameter, for IE8, it is best to add internet_cookie_httponly to read out the COOKIE field value with the HttpOnly attribute. If the SDK is older, without this macro, you can getprocaddress the two functions directly from the DLL, and then define this value for 0x00002000 use. For IE6 and IE7, to get the HttpOnly cookie, you have to manually read the cookie file and parse it.
Cookie file Format:
_ntes_nnid//Field name
456f74e9863f8f4b1a1e37774b0c464d,0//Field value
163.com///field-owned domain
3584//Logo bit
3205176064//Expiration Time (Low)
37425091//Expiration Time (high)
2444768976//creation time (Low)
30082544//Creation time (high)