IWriteCookie::put_Item

The IWriteCookie::put_Item method adds a specified cookie to the write-only Cookie collection.

HRESULT put_Item(
  VARIANT key,    //VARIANT that contains the name of the cookie
  BSTR bstrValue  //binary string that contains the cookie value
);
 

Parameters

key
A variant that contains the name of the cookie.
bstrValue
A binary string that contains the cookie value.

Remarks

Automation objects can specify that one or more variant parameters are optional. This is done by passing the parameter with the type set to VT_ERROR and a value of DISP_E_PARAMNOTFOUND. If you pass key as an Automation optional parameter, the cookie is treated as a simple cookie and its value is set to bstrValue. Otherwise, the cookie is treated as a dictionary cookie and bstrValue is the value for the cookie's key.

See Also

Cookies