FindItem

Finds an item by type and tags.

Synopsis

Item FindItem( int32 cType, TagArg *tp )
Item FindItemVA( int32 cType, uint32 tags, ...)

Description

This procedure finds an item of the specified type whose tag arguments match those pointed to by the tp argument. If more than one item of the specified type has matching tag arguments, the procedure returns the item number for the first matching item.

Arguments

cType
Specifies the type of the item to find. Use MkNodeID() to create this value.
tp
A pointer to an array of tag arguments. The tag arguments can be in any order. The array can contain some, all, or none of the possible tag arguments for an item of the specified type; to make the search more specific, include more tag arguments. The last element of the array must be the value TAG_END. If there are no tag arguments, this argument must be NULL. For a list of tag arguments for each item type, see the Portfolio Item's chapter.

Return Value

The procedure returns the number of the first item that matches or an error code if it can't find the item or if an error occurs.

Implementation

SWI implemented in kernel folio V20.

Associated Files

item.h
ANSI C Prototype

Caveats

The procedure currently ignores most tag arguments.

See Also

CheckItem(), FindNamedItem(), FindVersionedItem(), LookupItem(), MkNodeID()