INTERNET_COOKIE2 structure (wininet.h)
The INTERNET_COOKIE2 contains the constituent parts of a cookie. This structure is used with the InternetGetCookieEx2 and InternetSetCookieEx2 functions.
Syntax
typedef struct {
PWSTR pwszName;
PWSTR pwszValue;
PWSTR pwszDomain;
PWSTR pwszPath;
DWORD dwFlags;
FILETIME ftExpires;
BOOL fExpiresSet;
} INTERNET_COOKIE2;
Members
pwszName
Pointer to a string containing the cookie name. May be NULL if value is not NULL.
pwszValue
Pointer to a string containing the cookie value. May be NULL if name is not NULL.
pwszDomain
Pointer to a string containing the cookie domain. May be NULL.
pwszPath
Pointer to a string containing the cookie path. May be NULL.
dwFlags
Flags for additional cookie details. The following flags are available.
Value | Meaning |
---|---|
INTERNET_COOKIE_IS_SECURE | This is a secure cookie. |
INTERNET_COOKIE_IS_SESSION | This is a session cookie. |
INTERNET_COOKIE_IS_RESTRICTED | This cookie is restricted to first-party contexts. |
INTERNET_COOKIE_HTTPONLY | This is an HTTP-only cookie. |
INTERNET_COOKIE_HOST_ONLY | This is a host-only cookie. |
INTERNET_COOKIE_HOST_ONLY_APPLIED | The host-only setting has been applied to this cookie. |
INTERNET_COOKIE_SAME_SITE_STRICT | The SameSite security level for this cookie is "strict". |
INTERNET_COOKIE_SAME_SITE_LAX | The SameSite security level for this cookie is "lax". |
ftExpires
The expiry time of the cookie.
fExpiresSet
Whether or not the expiry time is set.
Remarks
Note
WinINet does not support server implementations. In addition, it should not be used from a service. For server implementations or services use Microsoft Windows HTTP Services (WinHTTP).
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 8.1 [desktop apps only] |
Minimum supported server | Windows Server 2012 R2 [desktop apps only] |
Header | wininet.h |