CBrowserInfo::SetCookieEx Method
Description
Sets the value of a cookie in the browser. Unlike SetCookie, it also accepts the cookie path and a string of additional cookie attributes.
Info
Available since Thinfinity VirtualUI 3.6.2.
Syntax
void SetCookieEx(const std::wstring& Name, const std::wstring& Value,
const std::wstring& Expires, const std::wstring& Path,
const std::wstring& Options);
Parameters
| Parameter | Type | Description |
|---|---|---|
Name |
std::wstring |
The name of the cookie |
Value |
std::wstring |
The value to assign to the cookie |
Expires |
std::wstring |
The expiration time for the cookie. If empty, the attribute is omitted and the browser treats it as a session cookie |
Path |
std::wstring |
The path for which the cookie is valid. If empty, the attribute is omitted |
Options |
std::wstring |
Additional cookie attributes, appended verbatim to the cookie definition — for example, secure; samesite=strict. If empty, no extra attributes are added |
Info
Name and Value are validated against RFC 6265 (section 4.1.1). If they contain characters not allowed in cookie names or values, the call fails with an invalid-parameter error.