IBrowserInfo::SetCookieEx Method
Sets a browser cookie. Unlike SetCookie, it also accepts the cookie path and a string of additional cookie attributes.
Info
Available since Thinfinity VirtualUI 3.6.2.
Syntax
[id(0x000000D2)]
HRESULT _stdcall SetCookieEx(
[in] BSTR Name,
[in] BSTR Value,
[in] BSTR Expires,
[in] BSTR Path,
[in] BSTR Options
);
Parameters
| Parameter | Type | Description |
|---|---|---|
Name |
BSTR | The cookie identifier. |
Value |
BSTR | The cookie data value. |
Expires |
BSTR | The expiration timeframe. If empty, the attribute is omitted and the browser treats it as a session cookie. |
Path |
BSTR | The path for which the cookie is valid. If empty, the attribute is omitted. |
Options |
BSTR | 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.
Return Value
| Type | Description |
|---|---|
| HRESULT | Standard COM return value indicating success or failure. |