OpenItem

Opens an item.

Synopsis

Item OpenItem( Item FoundItem, void *args )

Description

This procedure opens an item for access.

Arguments

item
The number of the item to open. To find the item number of a system item, use FindItem(), FindDevice(), FindFolio(), or FindNamedItem().
args
A pointer to an array of tag arguments. Currently, there are no system items that require tag arguments; for these and for any future items you're not sending tag arguments to, this argument must be NULL. If you send tag arguments (for any items in the future that use them), the tag arguments can be in any order, and the last element of the array must be the value TAG_END. For a list of tag arguments for each item type, see the "Portfolio Items" chapter.

Return Value

The procedure returns the number of the item that was opened or an error code if an error occurs.

Note: The item number for the opened item is not always the same as the item number returned by FindItem(). When accessing the opened item you should use the return from OpenItem(), not the return from FindItem(). You can also call the FindAndOpenItem() function for to do both a search and an open operation in an atomic manner.

Implementation

SWI implemented in kernel folio V20.

Associated Files

item.h
ANSI C Prototype

Notes

To close an opened item, use CloseItem().

See Also

CloseItem(), FindItem()