# CreateItem

Creates an item.

### Synopsis

`Item CreateItem( int32 ct, TagArg *p )
Item CreateItemVA( int32 ct, uint32 tags, ... );`

### Description

This macro creates an item.

Note: There are convenience procedures for creating most types of items (such as `CreateMsg()` to create a message and `CreateIOReq()` to create an I/O request). You should use `CreateItem()` only when no convenience procedure is available or when you need to supply additional arguments for the creation of the item beyond what the convenience routine provides.

### Arguments

ct
  Specifies the type of item to create. Use MkNodeID() to generate this value.

p
  A pointer to an array of tag arguments. The tag arguments can be in any order. 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 item number of the new item or an error code if an error occurs.

### Implementation

Macro implemented in item.h V20.

### Associated Files

item.h
  ANSI C Macro

### Notes

When you no longer need an item created with `CreateItem()`, use `DeleteItem()` to delete it.

### See Also

``CheckItem`(), CreateIOReq(), CreateMsg(), CreateMsgPort(), CreateSemaphore(), CreateSmallMsg(), CreateThread(), DeleteItem()`

#