Поделиться через


CInternetSession::SetCookie

Sets a cookie for the specified URL.

static BOOL SetCookie(
   LPCTSTR pstrUrl,
   LPCTSTR pstrCookieName,
   LPCTSTR pstrCookieData 
);

Параметры

  • pstrUrl
    A pointer to a null-terminated string that specifies the URL for which the cookie should be set.

  • pstrCookieName
    A pointer to a string containing the name of the cookie.

  • pstrCookieData
    A pointer to a string containing the actual string data to associate with the URL.

Возвращаемое значение

Returns TRUE if successful, or FALSE otherwise. To get the specific error code, call GetLastError.

Заметки

This member function implements the behavior of the Win32 message InternetSetCookie, as described in the Windows SDK.

Требования

Header: afxinet.h

См. также

Основные понятия

CInternetSession::GetCookieLength

CInternetSession::GetCookie