次の方法で共有


IWriteCookie::put_Item

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

HRESULT put_Item(
      VARIANT key,
      BSTR bstrValue
);

Parameters

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

  • bstrValue
    [in] 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.

Requirements

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

See Also