CInternetSession::GetCookie方法获取cookies,怎样搞的?

来源:百度知道 编辑:UC知道 时间:2024/05/15 20:22:11
比如打开百度这个网页后,在临时文件夹中的COOKIES,怎样获取它?
代码:?
难道就没有会的?

这些函数都是可以从MSDN上查到用法的

static BOOL GetCookie(
LPCTSTR pstrUrl,
LPCTSTR pstrCookieName,
LPTSTR pstrCookieData,
DWORD dwBufLen
);
static BOOL GetCookie(
LPCTSTR pstrUrl,
LPCTSTR pstrCookieName,
CString& strCookieData
);
Parameters
pstrUrl
A pointer to a string containing the URL.

pstrCookieName
A pointer to a string containing the name of the cookie to get for the specified URL.

pstrCookieData
In the first overload, a pointer to a string containing the address of the buffer that receives the cookie data. This value can be NULL. In the second overload, a reference to a CString object to receive the cookie data.

dwBufLen
The variable specifying the size of the pstrCookieData buffer. If the function succeeds, the buffer receives the amount of data copied to the pstrCookieData buffer. If pstrCookieData is NULL, this parameter receives a value that