Since type information is only specified once (when your application is installed), your application needs to only declare its ptype each time it starts.
To declare your ptype, use tt_ptype_declare during your application's ToolTalk initialization routine. The ToolTalk service will create the message patterns listed in your ptype and any otypes that reference the specified ptype.
The message patterns created when you declare your ptype exist in memory until your application exits the ToolTalk session.
The message patterns created when you declare your ptype information cannot be unregistered with tt_pattern_unregister; however, you can unregister these patterns with tt_ptype_undeclare.
The following listing illustrates how a ptype is registered during a program's initialization.