Opening an Item


When a task uses a system- supplied item such as a device or a folio, it opens the item instead of creating it. To open an item, use these calls:

Item OpenItem( Item FoundItem, void *args )
Item FindAndOpenItem( int32 cType, const TagArg *tags)
Item FindAndOpenItemVA( int32 cType, uint32 tags, ...)

OpenItem() accepts the item number of the resource to be opened (which is found with FindItem()) and a pointer. Currently, NULL should always be passed in for this argument.

FindAndOpenItem() finds an item and opens it with one call. It works just like FindItem(), except that it automatically opens the item before returning it to you.