Internet Direct (Indy)
Home
PreviousUpNext
TIdCookies.GetCookieIndex Method (integer, string, string)

Indicates the index position of a Cookie containing specified values.

Pascal
function GetCookieIndex(
    FirstIndex: integer; 
    const AName: string; 
    const ADomain: string
): Integer; overload;
Parameters 
Description 
FirstIndex 
Initial position to be examined in the collection.
 
AName 
Cookie name to be matched.
 
ADomain 
Domain attribute to be matched. 

Integer - Position of the matched Cookie in the collection, or -1 when not found.

GetCookieIndex is an overloaded Integer function that accesses Cookie class instances in the collection to determine the position of the collection item matching the specified search criteria. GetCookieIndex will return the value -1 when a Cookie cannot be located in the collection that matches the specified search criteria. 

FirstIndex specifies the initial position in the container to be used when comparing the values in the AName and ADomain parameters to the CookieName and Domain in Items

AName is the CookieName value desired in a Cookie collection item. 

ADomain is the Domain value desired in a Cookie collection item. 

GetCookieIndex is called from the GetCookie method to locate one of the Items in the collection that match a specified Name and Domain.

Internet Direct (Indy) version 10.1.5
Copyright © 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Website http://www.indyproject.org.
Post feedback to the Indy Documentation newsgroup.