IIS 6.0

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

HRESULT put_Item(
      VARIANT key,
      BSTR bstrValue


[in] A VARIANT that contains the name of the cookie.


[in] A binary string that contains the cookie value.

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.

Client: Requires Windows XP Professional, Windows 2000 Professional, or Windows NT Workstation 4.0.

Server: Requires Windows Server 2003, Windows 2000 Server, or Windows NT Server 4.0.

Product: IIS