Sun Chili!Soft ASP Sun Chili!Soft
ASP Sun Microsystems



The IRequestDictionary::get_Item method retrieves the specified item from a Request object dictionary

HRESULT get_Item(


VARIANT * pVariantReturn


Parameters: IRequestDictionary::get_Item


A variant that contains the name of the item in the collection.


Points to a variant that receives the item.

Remarks: IRequestDictionary::get_Item

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. For example, if you want to do this with the Var parameter, the value it returns will depend on the object's implementation of the IRequestDictionary interface; the QueryString object will return the entire query string, for example.

              For Request.QueryString, pVariantReturn contains the unparsed query string data.

              For Request.Form, pVariantReturn contains the unparsed form data.

              For Request.Cookies, pVariantReturn contains a URL-encoded list of the cookies.

              Request.ServerVariables and Response.Cookies do not accept an optional variant parameter, and will raise a COM exception if Var is DISP_E_PARAMNOTFOUND.

If Var is not an optional parameter then it must be a VT_BSTR or a VT_DISPATCH pointer with a default value that can be converted to a BSTR. In this case, the BSTR value of Var is looked up in the appropriate dictionary, and the value of Var is returned. If Var is not in the dictionary, then a variant equal to VT_EMPTY is returned if the IRequestDictionary is covering one of the Request object's collections. If the IRequestDictionary pointer is the Response.Cookies collection, a new cookie with the name of Var is created, and that cookie is returned. If Var is not a BSTR (and not DISP_E_PARAMNOTFOUND), then the get_Item method will raise an OLE exception.

Copyright 2002 Sun Microsystems, Inc. All rights reserved. Legal Notice.