关于InternetSetCookie问题
void CPreferences::SetCookie(LPCSTR strUrl)
{
char* szData = new char[thePrefs.m_csLoginUserId.GetLength()+1];
szData = (LPTSTR)(LPCTSTR)thePrefs.m_csLoginUserId;
char* szBuffer = new char[strlen(szData)*2];
CBase64 b64;
b64.EncodeBase64((const unsigned char*)szData,szBuffer,strlen(szData),strlen(szBuffer));//转成base64
bool bReturn;
CString strData ;
strData.Format("edt_user_id=%s;expires=Sat,01-Jan-2000 00:00:00 GMT ",szBuffer);
bReturn = InternetSetCookie(strUrl,NULL,strData); //设置cookie
delete szBuffer;
}