IReadCookie::get_Item

The IReadCookie::get_Item method retrieves the specified item from a cookie object.

HRESULT get_Item(
  VARIANT Var,  //VARIANT that contains the name of the item in the 
                // collection
  VARIANT * pVariantReturn
                //pointer to a VARIANT that receives the item value
);
 

Parameters

Var
A variant that contains the name of the item in the collection.
pVariantReturn
Points to a variant that receives the item value.

Remarks

If Var is a string, the cookie is assumed to be a dictionary cookie, and Var is treated as the key. If Var is a varaint with type VT_ERROR and error code DISP_E_PARAMNOTFOUND, then the cookie is assumed to be a simple cookie and the primary value is returned. (If the cookie is a dictionary, the sequence of key/value pairs are URL-encoded and returned.)

If a dictionary lookup is performed and the item is not found, then pVariantReturn returns VT_EMPTY. Otherwise a VT_BSTR is always returned.

See Also

Cookies